// https://syzkaller.appspot.com/bug?id=7ac0a22dad5fe5907c7c5dd72dfa6c9ab6882755
// 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, 0x0};

int main(void)
{
  syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
  intptr_t res = 0;
  memcpy((void*)0x20000100, "/dev/cuse\000", 10);
  res = syscall(__NR_openat, 0xffffffffffffff9c, 0x20000100, 0x82, 0);
  if (res != -1)
    r[0] = res;
  res = syscall(__NR_io_setup, 9, 0x20000180);
  if (res != -1)
    r[1] = *(uint64_t*)0x20000180;
  *(uint64_t*)0x20000440 = 0x20000000;
  *(uint64_t*)0x20000000 = 0;
  *(uint32_t*)0x20000008 = 0;
  *(uint32_t*)0x2000000c = 0;
  *(uint16_t*)0x20000010 = 5;
  *(uint16_t*)0x20000012 = 0;
  *(uint32_t*)0x20000014 = r[0];
  *(uint64_t*)0x20000018 = 0;
  *(uint64_t*)0x20000020 = 0;
  *(uint64_t*)0x20000028 = 0;
  *(uint64_t*)0x20000030 = 0;
  *(uint32_t*)0x20000038 = 0;
  *(uint32_t*)0x2000003c = -1;
  syscall(__NR_io_submit, r[1], 1, 0x20000440);
  return 0;
}