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

#define _GNU_SOURCE
#include <endian.h>
#include <stdint.h>
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>

static void execute_one();
extern unsigned long long procid;

void loop()
{
  while (1) {
    execute_one();
  }
}

uint64_t r[1] = {0xffffffffffffffff};
void execute_one()
{
  long res = 0;
  res = syscall(__NR_socket, 0xf, 3, 2);
  if (res != -1)
    r[0] = res;
  *(uint64_t*)0x20f56000 = 0;
  *(uint32_t*)0x20f56008 = 0;
  *(uint64_t*)0x20f56010 = 0x20f36000;
  *(uint64_t*)0x20f36000 = 0x20333f88;
  memcpy((void*)0x20333f88,
         "\x02\x03\x00\x09\x0c\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x02"
         "\x00\x13\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00"
         "\x06\x00\x00\x00\x00\x00\x02\x00\x4e\x20\xe0\x00\x00\x01\x00\x00\x00"
         "\x00\x00\x00\x00\x24\x02\x00\x01\x00\xf8\xff\xff\xff\x00\x00\x00\x02"
         "\x00\x00\x00\x00\x03\x00\x05\x00\x00\x00\x00\x00\x02\x00\x4e\x20\xe0"
         "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00",
         96);
  *(uint64_t*)0x20f36008 = 0x60;
  *(uint64_t*)0x20f56018 = 1;
  *(uint64_t*)0x20f56020 = 0;
  *(uint64_t*)0x20f56028 = 0;
  *(uint32_t*)0x20f56030 = 0;
  syscall(__NR_sendmsg, r[0], 0x20f56000, 0);
}

int main()
{
  syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
  for (;;) {
    loop();
  }
}