// https://syzkaller.appspot.com/bug?id=26e23e560b6a7a40da9abf2626587349afe2f762
// 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, 0xa, 1, 0);
  if (res != -1)
    r[0] = res;
  *(uint16_t*)0x20000080 = 0x11;
  *(uint8_t*)0x20000084 = 0xac;
  *(uint8_t*)0x20000085 = 0x14;
  *(uint8_t*)0x20000086 = 0x14;
  *(uint8_t*)0x20000087 = 0;
  *(uint16_t*)0x20000088 = htobe16(0);
  *(uint32_t*)0x2000008c = 0;
  memcpy((void*)0x20000090,
         "\x6c\x62\x6c\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
         16);
  *(uint32_t*)0x200000a0 = 0;
  *(uint32_t*)0x200000a4 = 0;
  *(uint32_t*)0x200000a8 = htobe32(0);
  syscall(__NR_setsockopt, r[0], 0, 0x482, 0x20000080, 0x2c);
}

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