// https://syzkaller.appspot.com/bug?id=ae870e8c5da584612949f8de2e5fa5f3e3ea09a3
// autogenerated by syzkaller (https://github.com/google/syzkaller)

#define _GNU_SOURCE

#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>

uint64_t r[1] = {0xffffffffffffffff};

int main(void)
{
  syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul);
  syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
  syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul);
  intptr_t res = 0;
  res = syscall(__NR_socket, 0xful, 3ul, 2);
  if (res != -1)
    r[0] = res;
  *(uint64_t*)0x20000180 = 0;
  *(uint32_t*)0x20000188 = 0;
  *(uint64_t*)0x20000190 = 0x20000000;
  *(uint64_t*)0x20000000 = 0x20000100;
  memcpy((void*)0x20000100, "\x02\x0b\x00\x01\x02", 5);
  *(uint64_t*)0x20000008 = 0x10;
  *(uint64_t*)0x20000198 = 1;
  *(uint64_t*)0x200001a0 = 0;
  *(uint64_t*)0x200001a8 = 0;
  *(uint32_t*)0x200001b0 = 0;
  syscall(__NR_sendmsg, -1, 0x20000180ul, 0ul);
  *(uint64_t*)0x200001c0 = 0x40000000;
  *(uint32_t*)0x200001c8 = 0;
  *(uint64_t*)0x200001d0 = 0x20000240;
  *(uint64_t*)0x20000240 = 0x200004c0;
  memcpy((void*)0x200004c0,
         "\x02\x03\x06\x09\x10\x00\x00\x00\x00\x00\x00\x4c\x9e\x00\x00\x00\x02"
         "\x00\x13\x00\x02\x00\x00\x2d\xdb\x11\x27\x4e\x03\xf2\xbc\x01\x05\x00"
         "\x06\x00\x20\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x05\xdd"
         "\xe4\x00\xe6\x06\x00\x00\x00\x1f\xe5\x31\x02\x00\x00\x00\x03\x00\x00"
         "\x00\x00\x00\x00\x02\x00\x01\x00\xf5\x00\x00\x00\x00\x00\x00\x02\x00"
         "\x00\x00\x00\x05\x00\x05\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00"
         "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17",
         114);
  *(uint64_t*)0x20000248 = 0x80;
  *(uint64_t*)0x200001d8 = 1;
  *(uint64_t*)0x200001e0 = 0;
  *(uint64_t*)0x200001e8 = 0;
  *(uint32_t*)0x200001f0 = 0;
  syscall(__NR_sendmsg, -1, 0x200001c0ul, 0ul);
  syscall(__NR_sendmmsg, r[0], 0x20000180ul, 0x400000000000282ul, 0ul);
  return 0;
}