// https://syzkaller.appspot.com/bug?id=1fbcb607cf49d8b5a3c8e056971f045f9bfa34f3
// 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[2] = {0xffffffffffffffff, 0xffffffffffffffff};

int main(void)
{
  syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 3ul, 0x32ul, -1, 0);
  intptr_t res = 0;
  res = syscall(__NR_socket, 0x10ul, 3ul, 0x14ul);
  if (res != -1)
    r[0] = res;
  *(uint64_t*)0x200031c0 = 0;
  *(uint32_t*)0x200031c8 = 0;
  *(uint64_t*)0x200031d0 = 0x20003180;
  *(uint64_t*)0x20003180 = 0x20003000;
  *(uint32_t*)0x20003000 = 0x38;
  *(uint16_t*)0x20003004 = 0x1403;
  *(uint16_t*)0x20003006 = 1;
  *(uint32_t*)0x20003008 = 0;
  *(uint32_t*)0x2000300c = 0;
  *(uint16_t*)0x20003010 = 9;
  *(uint16_t*)0x20003012 = 2;
  memcpy((void*)0x20003014, "syz1\000", 5);
  *(uint16_t*)0x2000301c = 8;
  *(uint16_t*)0x2000301e = 0x41;
  memcpy((void*)0x20003020, "siw\000", 4);
  *(uint16_t*)0x20003024 = 0x14;
  *(uint16_t*)0x20003026 = 0x33;
  memcpy((void*)0x20003028,
         "lo\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16);
  *(uint64_t*)0x20003188 = 0x38;
  *(uint64_t*)0x200031d8 = 1;
  *(uint64_t*)0x200031e0 = 0;
  *(uint64_t*)0x200031e8 = 0;
  *(uint32_t*)0x200031f0 = 0;
  syscall(__NR_sendmsg, r[0], 0x200031c0ul, 0ul);
  res = syscall(__NR_socket, 0x10ul, 3ul, 0x14ul);
  if (res != -1)
    r[1] = res;
  *(uint64_t*)0x20000240 = 0;
  *(uint32_t*)0x20000248 = 0;
  *(uint64_t*)0x20000250 = 0x20000200;
  *(uint64_t*)0x20000200 = 0x20000180;
  *(uint32_t*)0x20000180 = 0x30;
  *(uint16_t*)0x20000184 = 0x1410;
  *(uint16_t*)0x20000186 = 1;
  *(uint32_t*)0x20000188 = 0;
  *(uint32_t*)0x2000018c = 0;
  *(uint16_t*)0x20000190 = 8;
  *(uint16_t*)0x20000192 = 0x4b;
  *(uint32_t*)0x20000194 = 0x13;
  *(uint16_t*)0x20000198 = 8;
  *(uint16_t*)0x2000019a = 0x4a;
  *(uint32_t*)0x2000019c = 0;
  *(uint16_t*)0x200001a0 = 8;
  *(uint16_t*)0x200001a2 = 1;
  *(uint32_t*)0x200001a4 = 0;
  *(uint16_t*)0x200001a8 = 8;
  *(uint16_t*)0x200001aa = 3;
  *(uint32_t*)0x200001ac = 1;
  *(uint64_t*)0x20000208 = 0x30;
  *(uint64_t*)0x20000258 = 1;
  *(uint64_t*)0x20000260 = 0;
  *(uint64_t*)0x20000268 = 0;
  *(uint32_t*)0x20000270 = 0x20000021;
  syscall(__NR_sendmsg, r[1], 0x20000240ul, 0ul);
  return 0;
}