// https://syzkaller.appspot.com/bug?id=1f3ebc6565458a64930990eb0e866e316f6f8873
// 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, 0xaul, 1ul, 0x84);
  if (res != -1)
    r[0] = res;
  memcpy((void*)0x200002c0, "\x1a\x00\x00\x00\x02\x00\x00\x00", 8);
  syscall(__NR_setsockopt, r[0], 0x84, 0x81, 0x200002c0ul, 8ul);
  *(uint16_t*)0x20000300 = 0xa;
  *(uint16_t*)0x20000302 = htobe16(0x4e23);
  *(uint32_t*)0x20000304 = htobe32(0);
  *(uint64_t*)0x20000308 = htobe64(0);
  *(uint64_t*)0x20000310 = htobe64(1);
  *(uint32_t*)0x20000318 = 0;
  syscall(__NR_setsockopt, r[0], 0x84, 0x64, 0x20000300ul, 0x1cul);
  *(uint8_t*)0x20000340 = 0;
  syscall(__NR_setsockopt, r[0], 0x84, 0x15, 0x20000340ul, 1ul);
  *(uint16_t*)0x200000c0 = 0xa;
  *(uint16_t*)0x200000c2 = htobe16(0x4e23);
  *(uint32_t*)0x200000c4 = htobe32(0);
  *(uint64_t*)0x200000c8 = htobe64(0);
  *(uint64_t*)0x200000d0 = htobe64(1);
  *(uint32_t*)0x200000d8 = 0;
  syscall(__NR_connect, r[0], 0x200000c0ul, 0x1cul);
  *(uint32_t*)0x20000000 = 0;
  *(uint16_t*)0x20000004 = 0;
  *(uint16_t*)0x20000006 = 3;
  memcpy((void*)0x20000008, "\x17\x73\xd0", 3);
  syscall(__NR_setsockopt, r[0], 0x84, 0x17, 0x20000000ul, 0xbul);
  memset((void*)0x20000140, 91, 1);
  syscall(__NR_sendto, r[0], 0x20000140ul, 0xffa0ul, 0ul, 0ul, 0ul);
  return 0;
}