// https://syzkaller.appspot.com/bug?id=29047010c8fc6106059964efd51ff4f88f3b46ba
// autogenerated by syzkaller (https://github.com/google/syzkaller)

#define _GNU_SOURCE

#include <dirent.h>
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <setjmp.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/prctl.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>

#include <linux/futex.h>
#include <linux/loop.h>

#ifndef __NR_memfd_create
#define __NR_memfd_create 279
#endif
#ifndef __NR_mmap
#define __NR_mmap 222
#endif
#ifndef __NR_openat
#define __NR_openat 56
#endif
#ifndef __NR_pwrite64
#define __NR_pwrite64 68
#endif
#ifndef __NR_pwritev2
#define __NR_pwritev2 287
#endif
#ifndef __NR_write
#define __NR_write 64
#endif

static unsigned long long procid;

static void sleep_ms(uint64_t ms)
{
  usleep(ms * 1000);
}

static uint64_t current_time_ms(void)
{
  struct timespec ts;
  if (clock_gettime(CLOCK_MONOTONIC, &ts))
    exit(1);
  return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000;
}

static void use_temporary_dir(void)
{
  char tmpdir_template[] = "./syzkaller.XXXXXX";
  char* tmpdir = mkdtemp(tmpdir_template);
  if (!tmpdir)
    exit(1);
  if (chmod(tmpdir, 0777))
    exit(1);
  if (chdir(tmpdir))
    exit(1);
}

static void thread_start(void* (*fn)(void*), void* arg)
{
  pthread_t th;
  pthread_attr_t attr;
  pthread_attr_init(&attr);
  pthread_attr_setstacksize(&attr, 128 << 10);
  int i = 0;
  for (; i < 100; i++) {
    if (pthread_create(&th, &attr, fn, arg) == 0) {
      pthread_attr_destroy(&attr);
      return;
    }
    if (errno == EAGAIN) {
      usleep(50);
      continue;
    }
    break;
  }
  exit(1);
}

typedef struct {
  int state;
} event_t;

static void event_init(event_t* ev)
{
  ev->state = 0;
}

static void event_reset(event_t* ev)
{
  ev->state = 0;
}

static void event_set(event_t* ev)
{
  if (ev->state)
    exit(1);
  __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE);
  syscall(SYS_futex, &ev->state, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1000000);
}

static void event_wait(event_t* ev)
{
  while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE))
    syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, 0);
}

static int event_isset(event_t* ev)
{
  return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE);
}

static int event_timedwait(event_t* ev, uint64_t timeout)
{
  uint64_t start = current_time_ms();
  uint64_t now = start;
  for (;;) {
    uint64_t remain = timeout - (now - start);
    struct timespec ts;
    ts.tv_sec = remain / 1000;
    ts.tv_nsec = (remain % 1000) * 1000 * 1000;
    syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, &ts);
    if (__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE))
      return 1;
    now = current_time_ms();
    if (now - start > timeout)
      return 0;
  }
}

static bool write_file(const char* file, const char* what, ...)
{
  char buf[1024];
  va_list args;
  va_start(args, what);
  vsnprintf(buf, sizeof(buf), what, args);
  va_end(args);
  buf[sizeof(buf) - 1] = 0;
  int len = strlen(buf);
  int fd = open(file, O_WRONLY | O_CLOEXEC);
  if (fd == -1)
    return false;
  if (write(fd, buf, len) != len) {
    int err = errno;
    close(fd);
    errno = err;
    return false;
  }
  close(fd);
  return true;
}

//% This code is derived from puff.{c,h}, found in the zlib development. The
//% original files come with the following copyright notice:

//% Copyright (C) 2002-2013 Mark Adler, all rights reserved
//% version 2.3, 21 Jan 2013
//% This software is provided 'as-is', without any express or implied
//% warranty.  In no event will the author be held liable for any damages
//% arising from the use of this software.
//% Permission is granted to anyone to use this software for any purpose,
//% including commercial applications, and to alter it and redistribute it
//% freely, subject to the following restrictions:
//% 1. The origin of this software must not be misrepresented; you must not
//%    claim that you wrote the original software. If you use this software
//%    in a product, an acknowledgment in the product documentation would be
//%    appreciated but is not required.
//% 2. Altered source versions must be plainly marked as such, and must not be
//%    misrepresented as being the original software.
//% 3. This notice may not be removed or altered from any source distribution.
//% Mark Adler    madler@alumni.caltech.edu

//% BEGIN CODE DERIVED FROM puff.{c,h}

#define MAXBITS 15
#define MAXLCODES 286
#define MAXDCODES 30
#define MAXCODES (MAXLCODES + MAXDCODES)
#define FIXLCODES 288

struct puff_state {
  unsigned char* out;
  unsigned long outlen;
  unsigned long outcnt;
  const unsigned char* in;
  unsigned long inlen;
  unsigned long incnt;
  int bitbuf;
  int bitcnt;
  jmp_buf env;
};
static int puff_bits(struct puff_state* s, int need)
{
  long val = s->bitbuf;
  while (s->bitcnt < need) {
    if (s->incnt == s->inlen)
      longjmp(s->env, 1);
    val |= (long)(s->in[s->incnt++]) << s->bitcnt;
    s->bitcnt += 8;
  }
  s->bitbuf = (int)(val >> need);
  s->bitcnt -= need;
  return (int)(val & ((1L << need) - 1));
}
static int puff_stored(struct puff_state* s)
{
  s->bitbuf = 0;
  s->bitcnt = 0;
  if (s->incnt + 4 > s->inlen)
    return 2;
  unsigned len = s->in[s->incnt++];
  len |= s->in[s->incnt++] << 8;
  if (s->in[s->incnt++] != (~len & 0xff) ||
      s->in[s->incnt++] != ((~len >> 8) & 0xff))
    return -2;
  if (s->incnt + len > s->inlen)
    return 2;
  if (s->outcnt + len > s->outlen)
    return 1;
  for (; len--; s->outcnt++, s->incnt++) {
    if (s->in[s->incnt])
      s->out[s->outcnt] = s->in[s->incnt];
  }
  return 0;
}
struct puff_huffman {
  short* count;
  short* symbol;
};
static int puff_decode(struct puff_state* s, const struct puff_huffman* h)
{
  int first = 0;
  int index = 0;
  int bitbuf = s->bitbuf;
  int left = s->bitcnt;
  int code = first = index = 0;
  int len = 1;
  short* next = h->count + 1;
  while (1) {
    while (left--) {
      code |= bitbuf & 1;
      bitbuf >>= 1;
      int count = *next++;
      if (code - count < first) {
        s->bitbuf = bitbuf;
        s->bitcnt = (s->bitcnt - len) & 7;
        return h->symbol[index + (code - first)];
      }
      index += count;
      first += count;
      first <<= 1;
      code <<= 1;
      len++;
    }
    left = (MAXBITS + 1) - len;
    if (left == 0)
      break;
    if (s->incnt == s->inlen)
      longjmp(s->env, 1);
    bitbuf = s->in[s->incnt++];
    if (left > 8)
      left = 8;
  }
  return -10;
}
static int puff_construct(struct puff_huffman* h, const short* length, int n)
{
  int len;
  for (len = 0; len <= MAXBITS; len++)
    h->count[len] = 0;
  int symbol;
  for (symbol = 0; symbol < n; symbol++)
    (h->count[length[symbol]])++;
  if (h->count[0] == n)
    return 0;
  int left = 1;
  for (len = 1; len <= MAXBITS; len++) {
    left <<= 1;
    left -= h->count[len];
    if (left < 0)
      return left;
  }
  short offs[MAXBITS + 1];
  offs[1] = 0;
  for (len = 1; len < MAXBITS; len++)
    offs[len + 1] = offs[len] + h->count[len];
  for (symbol = 0; symbol < n; symbol++)
    if (length[symbol] != 0)
      h->symbol[offs[length[symbol]]++] = symbol;
  return left;
}
static int puff_codes(struct puff_state* s, const struct puff_huffman* lencode,
                      const struct puff_huffman* distcode)
{
  static const short lens[29] = {3,  4,  5,  6,   7,   8,   9,   10,  11, 13,
                                 15, 17, 19, 23,  27,  31,  35,  43,  51, 59,
                                 67, 83, 99, 115, 131, 163, 195, 227, 258};
  static const short lext[29] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2,
                                 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0};
  static const short dists[30] = {
      1,    2,    3,    4,    5,    7,    9,    13,    17,    25,
      33,   49,   65,   97,   129,  193,  257,  385,   513,   769,
      1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577};
  static const short dext[30] = {0, 0, 0,  0,  1,  1,  2,  2,  3,  3,
                                 4, 4, 5,  5,  6,  6,  7,  7,  8,  8,
                                 9, 9, 10, 10, 11, 11, 12, 12, 13, 13};
  int symbol;
  do {
    symbol = puff_decode(s, lencode);
    if (symbol < 0)
      return symbol;
    if (symbol < 256) {
      if (s->outcnt == s->outlen)
        return 1;
      if (symbol)
        s->out[s->outcnt] = symbol;
      s->outcnt++;
    } else if (symbol > 256) {
      symbol -= 257;
      if (symbol >= 29)
        return -10;
      int len = lens[symbol] + puff_bits(s, lext[symbol]);
      symbol = puff_decode(s, distcode);
      if (symbol < 0)
        return symbol;
      unsigned dist = dists[symbol] + puff_bits(s, dext[symbol]);
      if (dist > s->outcnt)
        return -11;
      if (s->outcnt + len > s->outlen)
        return 1;
      while (len--) {
        if (dist <= s->outcnt && s->out[s->outcnt - dist])
          s->out[s->outcnt] = s->out[s->outcnt - dist];
        s->outcnt++;
      }
    }
  } while (symbol != 256);
  return 0;
}
static int puff_fixed(struct puff_state* s)
{
  static int virgin = 1;
  static short lencnt[MAXBITS + 1], lensym[FIXLCODES];
  static short distcnt[MAXBITS + 1], distsym[MAXDCODES];
  static struct puff_huffman lencode, distcode;
  if (virgin) {
    lencode.count = lencnt;
    lencode.symbol = lensym;
    distcode.count = distcnt;
    distcode.symbol = distsym;
    short lengths[FIXLCODES];
    int symbol;
    for (symbol = 0; symbol < 144; symbol++)
      lengths[symbol] = 8;
    for (; symbol < 256; symbol++)
      lengths[symbol] = 9;
    for (; symbol < 280; symbol++)
      lengths[symbol] = 7;
    for (; symbol < FIXLCODES; symbol++)
      lengths[symbol] = 8;
    puff_construct(&lencode, lengths, FIXLCODES);
    for (symbol = 0; symbol < MAXDCODES; symbol++)
      lengths[symbol] = 5;
    puff_construct(&distcode, lengths, MAXDCODES);
    virgin = 0;
  }
  return puff_codes(s, &lencode, &distcode);
}
static int puff_dynamic(struct puff_state* s)
{
  static const short order[19] = {16, 17, 18, 0, 8,  7, 9,  6, 10, 5,
                                  11, 4,  12, 3, 13, 2, 14, 1, 15};
  int nlen = puff_bits(s, 5) + 257;
  int ndist = puff_bits(s, 5) + 1;
  int ncode = puff_bits(s, 4) + 4;
  if (nlen > MAXLCODES || ndist > MAXDCODES)
    return -3;
  short lengths[MAXCODES];
  int index;
  for (index = 0; index < ncode; index++)
    lengths[order[index]] = puff_bits(s, 3);
  for (; index < 19; index++)
    lengths[order[index]] = 0;
  short lencnt[MAXBITS + 1], lensym[MAXLCODES];
  struct puff_huffman lencode = {lencnt, lensym};
  int err = puff_construct(&lencode, lengths, 19);
  if (err != 0)
    return -4;
  index = 0;
  while (index < nlen + ndist) {
    int symbol;
    int len;
    symbol = puff_decode(s, &lencode);
    if (symbol < 0)
      return symbol;
    if (symbol < 16)
      lengths[index++] = symbol;
    else {
      len = 0;
      if (symbol == 16) {
        if (index == 0)
          return -5;
        len = lengths[index - 1];
        symbol = 3 + puff_bits(s, 2);
      } else if (symbol == 17)
        symbol = 3 + puff_bits(s, 3);
      else
        symbol = 11 + puff_bits(s, 7);
      if (index + symbol > nlen + ndist)
        return -6;
      while (symbol--)
        lengths[index++] = len;
    }
  }
  if (lengths[256] == 0)
    return -9;
  err = puff_construct(&lencode, lengths, nlen);
  if (err && (err < 0 || nlen != lencode.count[0] + lencode.count[1]))
    return -7;
  short distcnt[MAXBITS + 1], distsym[MAXDCODES];
  struct puff_huffman distcode = {distcnt, distsym};
  err = puff_construct(&distcode, lengths + nlen, ndist);
  if (err && (err < 0 || ndist != distcode.count[0] + distcode.count[1]))
    return -8;
  return puff_codes(s, &lencode, &distcode);
}
static int puff(unsigned char* dest, unsigned long* destlen,
                const unsigned char* source, unsigned long sourcelen)
{
  struct puff_state s = {
      .out = dest,
      .outlen = *destlen,
      .outcnt = 0,
      .in = source,
      .inlen = sourcelen,
      .incnt = 0,
      .bitbuf = 0,
      .bitcnt = 0,
  };
  int err;
  if (setjmp(s.env) != 0)
    err = 2;
  else {
    int last;
    do {
      last = puff_bits(&s, 1);
      int type = puff_bits(&s, 2);
      err = type == 0 ? puff_stored(&s)
                      : (type == 1 ? puff_fixed(&s)
                                   : (type == 2 ? puff_dynamic(&s) : -1));
      if (err != 0)
        break;
    } while (!last);
  }
  *destlen = s.outcnt;
  return err;
}

//% END CODE DERIVED FROM puff.{c,h}

#define ZLIB_HEADER_WIDTH 2

static int puff_zlib_to_file(const unsigned char* source,
                             unsigned long sourcelen, int dest_fd)
{
  if (sourcelen < ZLIB_HEADER_WIDTH)
    return 0;
  source += ZLIB_HEADER_WIDTH;
  sourcelen -= ZLIB_HEADER_WIDTH;
  const unsigned long max_destlen = 132 << 20;
  void* ret = mmap(0, max_destlen, PROT_WRITE | PROT_READ,
                   MAP_PRIVATE | MAP_ANON, -1, 0);
  if (ret == MAP_FAILED)
    return -1;
  unsigned char* dest = (unsigned char*)ret;
  unsigned long destlen = max_destlen;
  int err = puff(dest, &destlen, source, sourcelen);
  if (err) {
    munmap(dest, max_destlen);
    errno = -err;
    return -1;
  }
  if (write(dest_fd, dest, destlen) != (ssize_t)destlen) {
    munmap(dest, max_destlen);
    return -1;
  }
  return munmap(dest, max_destlen);
}

static int setup_loop_device(unsigned char* data, unsigned long size,
                             const char* loopname, int* loopfd_p)
{
  int err = 0, loopfd = -1;
  int memfd = syscall(__NR_memfd_create, "syzkaller", 0);
  if (memfd == -1) {
    err = errno;
    goto error;
  }
  if (puff_zlib_to_file(data, size, memfd)) {
    err = errno;
    goto error_close_memfd;
  }
  loopfd = open(loopname, O_RDWR);
  if (loopfd == -1) {
    err = errno;
    goto error_close_memfd;
  }
  if (ioctl(loopfd, LOOP_SET_FD, memfd)) {
    if (errno != EBUSY) {
      err = errno;
      goto error_close_loop;
    }
    ioctl(loopfd, LOOP_CLR_FD, 0);
    usleep(1000);
    if (ioctl(loopfd, LOOP_SET_FD, memfd)) {
      err = errno;
      goto error_close_loop;
    }
  }
  close(memfd);
  *loopfd_p = loopfd;
  return 0;

error_close_loop:
  close(loopfd);
error_close_memfd:
  close(memfd);
error:
  errno = err;
  return -1;
}

static void reset_loop_device(const char* loopname)
{
  int loopfd = open(loopname, O_RDWR);
  if (loopfd == -1) {
    return;
  }
  if (ioctl(loopfd, LOOP_CLR_FD, 0)) {
  }
  close(loopfd);
}

static long syz_mount_image(volatile long fsarg, volatile long dir,
                            volatile long flags, volatile long optsarg,
                            volatile long change_dir,
                            volatile unsigned long size, volatile long image)
{
  unsigned char* data = (unsigned char*)image;
  int res = -1, err = 0, need_loop_device = !!size;
  char* mount_opts = (char*)optsarg;
  char* target = (char*)dir;
  char* fs = (char*)fsarg;
  char* source = NULL;
  char loopname[64];
  if (need_loop_device) {
    int loopfd;
    memset(loopname, 0, sizeof(loopname));
    snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid);
    if (setup_loop_device(data, size, loopname, &loopfd) == -1)
      return -1;
    close(loopfd);
    source = loopname;
  }
  mkdir(target, 0777);
  char opts[256];
  memset(opts, 0, sizeof(opts));
  if (strlen(mount_opts) > (sizeof(opts) - 32)) {
  }
  strncpy(opts, mount_opts, sizeof(opts) - 32);
  if (strcmp(fs, "iso9660") == 0) {
    flags |= MS_RDONLY;
  } else if (strncmp(fs, "ext", 3) == 0) {
    bool has_remount_ro = false;
    char* remount_ro_start = strstr(opts, "errors=remount-ro");
    if (remount_ro_start != NULL) {
      char after = *(remount_ro_start + strlen("errors=remount-ro"));
      char before = remount_ro_start == opts ? '\0' : *(remount_ro_start - 1);
      has_remount_ro = ((before == '\0' || before == ',') &&
                        (after == '\0' || after == ','));
    }
    if (strstr(opts, "errors=panic") || !has_remount_ro)
      strcat(opts, ",errors=continue");
  } else if (strcmp(fs, "xfs") == 0) {
    strcat(opts, ",nouuid");
  }
  res = mount(source, target, fs, flags, opts);
  if (res == -1) {
    err = errno;
    goto error_clear_loop;
  }
  res = open(target, O_RDONLY | O_DIRECTORY);
  if (res == -1) {
    err = errno;
    goto error_clear_loop;
  }
  if (change_dir) {
    res = chdir(target);
    if (res == -1) {
      err = errno;
    }
  }

error_clear_loop:
  if (need_loop_device)
    reset_loop_device(loopname);
  errno = err;
  return res;
}

#define FS_IOC_SETFLAGS _IOW('f', 2, long)
static void remove_dir(const char* dir)
{
  int iter = 0;
  DIR* dp = 0;
  const int umount_flags = MNT_FORCE | UMOUNT_NOFOLLOW;

retry:
  while (umount2(dir, umount_flags) == 0) {
  }
  dp = opendir(dir);
  if (dp == NULL) {
    if (errno == EMFILE) {
      exit(1);
    }
    exit(1);
  }
  struct dirent* ep = 0;
  while ((ep = readdir(dp))) {
    if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0)
      continue;
    char filename[FILENAME_MAX];
    snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name);
    while (umount2(filename, umount_flags) == 0) {
    }
    struct stat st;
    if (lstat(filename, &st))
      exit(1);
    if (S_ISDIR(st.st_mode)) {
      remove_dir(filename);
      continue;
    }
    int i;
    for (i = 0;; i++) {
      if (unlink(filename) == 0)
        break;
      if (errno == EPERM) {
        int fd = open(filename, O_RDONLY);
        if (fd != -1) {
          long flags = 0;
          if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) {
          }
          close(fd);
          continue;
        }
      }
      if (errno == EROFS) {
        break;
      }
      if (errno != EBUSY || i > 100)
        exit(1);
      if (umount2(filename, umount_flags))
        exit(1);
    }
  }
  closedir(dp);
  for (int i = 0;; i++) {
    if (rmdir(dir) == 0)
      break;
    if (i < 100) {
      if (errno == EPERM) {
        int fd = open(dir, O_RDONLY);
        if (fd != -1) {
          long flags = 0;
          if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) {
          }
          close(fd);
          continue;
        }
      }
      if (errno == EROFS) {
        break;
      }
      if (errno == EBUSY) {
        if (umount2(dir, umount_flags))
          exit(1);
        continue;
      }
      if (errno == ENOTEMPTY) {
        if (iter < 100) {
          iter++;
          goto retry;
        }
      }
    }
    exit(1);
  }
}

static void kill_and_wait(int pid, int* status)
{
  kill(-pid, SIGKILL);
  kill(pid, SIGKILL);
  for (int i = 0; i < 100; i++) {
    if (waitpid(-1, status, WNOHANG | __WALL) == pid)
      return;
    usleep(1000);
  }
  DIR* dir = opendir("/sys/fs/fuse/connections");
  if (dir) {
    for (;;) {
      struct dirent* ent = readdir(dir);
      if (!ent)
        break;
      if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0)
        continue;
      char abort[300];
      snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort",
               ent->d_name);
      int fd = open(abort, O_WRONLY);
      if (fd == -1) {
        continue;
      }
      if (write(fd, abort, 1) < 0) {
      }
      close(fd);
    }
    closedir(dir);
  } else {
  }
  while (waitpid(-1, status, __WALL) != pid) {
  }
}

static void reset_loop()
{
  char buf[64];
  snprintf(buf, sizeof(buf), "/dev/loop%llu", procid);
  int loopfd = open(buf, O_RDWR);
  if (loopfd != -1) {
    ioctl(loopfd, LOOP_CLR_FD, 0);
    close(loopfd);
  }
}

static void setup_test()
{
  prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
  setpgrp();
  write_file("/proc/self/oom_score_adj", "1000");
  if (symlink("/dev/binderfs", "./binderfs")) {
  }
}

struct thread_t {
  int created, call;
  event_t ready, done;
};

static struct thread_t threads[16];
static void execute_call(int call);
static int running;

static void* thr(void* arg)
{
  struct thread_t* th = (struct thread_t*)arg;
  for (;;) {
    event_wait(&th->ready);
    event_reset(&th->ready);
    execute_call(th->call);
    __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED);
    event_set(&th->done);
  }
  return 0;
}

static void execute_one(void)
{
  if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {
  }
  int i, call, thread;
  for (call = 0; call < 10; call++) {
    for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0]));
         thread++) {
      struct thread_t* th = &threads[thread];
      if (!th->created) {
        th->created = 1;
        event_init(&th->ready);
        event_init(&th->done);
        event_set(&th->done);
        thread_start(thr, th);
      }
      if (!event_isset(&th->done))
        continue;
      event_reset(&th->done);
      th->call = call;
      __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED);
      event_set(&th->ready);
      event_timedwait(&th->done,
                      50 + (call == 1 ? 4000 : 0) + (call == 9 ? 4000 : 0));
      break;
    }
  }
  for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++)
    sleep_ms(1);
}

static void execute_one(void);

#define WAIT_FLAGS __WALL

static void loop(void)
{
  int iter = 0;
  for (;; iter++) {
    char cwdbuf[32];
    sprintf(cwdbuf, "./%d", iter);
    if (mkdir(cwdbuf, 0777))
      exit(1);
    reset_loop();
    int pid = fork();
    if (pid < 0)
      exit(1);
    if (pid == 0) {
      if (chdir(cwdbuf))
        exit(1);
      setup_test();
      execute_one();
      exit(0);
    }
    int status = 0;
    uint64_t start = current_time_ms();
    for (;;) {
      sleep_ms(10);
      if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid)
        break;
      if (current_time_ms() - start < 5000)
        continue;
      kill_and_wait(pid, &status);
      break;
    }
    remove_dir(cwdbuf);
  }
}

uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff};

void execute_call(int call)
{
  intptr_t res = 0;
  switch (call) {
  case 0:
    syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0ul,
            /*flags=*/0ul, /*mode=*/0ul);
    break;
  case 1:
    memcpy((void*)0x20000000, "udf\000", 4);
    memcpy((void*)0x20000180,
           "./"
           "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
           "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
           "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
           "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000",
           250);
    memcpy(
        (void*)0x20000700,
        "iocharset=default,noadinicb,gid=forget,gid=ignore,nostrict,gid=", 63);
    sprintf((char*)0x2000073f, "%020llu", (long long)0);
    memcpy(
        (void*)0x20000753,
        "\x2c\x61\x6e\x63\x68\x6f\x72\x3d\x30\x30\x30\x30\x00\x00\x88\xbe\x09"
        "\x00\x30\x30\x30\x30\x30\x30\x30\x30\x30\x31\x2c\x75\x69\x64\x3d\x66"
        "\x6f\x72\x67\x65\x74\x2c\x00\x21\x5e\x8c\x2e\x42\x46\x2f\x3a\xb5\xe1"
        "\xf7\xc0\x52\x7a\xbb\xb4\x22\xbe\x91\x78\xaa\x60\x68\x19\x64\xad\xb0"
        "\x69\xae\x87\x6c\x4a\x59\x9d\x56\x00\x75\xac\x47\xc0\xde\x1a\x9b\xb9"
        "\x14\x6a\xf6\x43\x3e\xfd\xcd\xac\x85\x3a\x8e\x8f\x16\xd6\xba\xd9\x0e"
        "\xcc\xe0\xa1\xfa\xb4\x6f\x48\x33\x1e\x6b\x3c\x32\x5c\x08\xdf\x3c\x33"
        "\x4e\x4d\xa2\x80\x67\xa3\x0b\x3b\x1d\xc6\x4b\xf6\x92\xc7\x12\xfc\x27"
        "\x3b\xc1\x70\x20\x08\xf5\x63\x76\x5c\x6f\x3e\x67\xd9\x7e\x13\x69\x97"
        "\x3c\x2a\x87\xf0\xec\xca\x73\x20\x81\x98\x63\x17\x9f\xb8\x5e\x39\x4a"
        "\x8c\xf1\xd6\x2c\x70\xd8\x30\x66\x33\xb6\x95\x8e\xbf\x99\x8a\x06\x85"
        "\xbc\x5c\xdd\x1f\x97\x29\x13\x28\x74\x3a\xdd\x4c\x86\x71\x15\xfa\xe1"
        "\x08\x2f\x8f\xaf\x48\x2e\x15\xeb\x93\x99\x68",
        215);
    memcpy(
        (void*)0x20001080,
        "\x78\x9c\xec\xdd\x4f\x6c\x1c\xd7\x7d\x07\xf0\xdf\x1b\x2e\x45\xd2\x6e"
        "\x2b\x26\x4e\x54\xbb\x8d\x8b\x4d\x5b\xa4\x32\x63\xb9\xb2\xa4\x98\x8a"
        "\x55\xb8\xab\x9a\x66\x1b\x40\x96\x89\x50\xcc\x2d\x00\x57\xe4\x4a\x5d"
        "\x98\x5a\x12\x24\xd5\xc8\x6e\xda\x30\xbd\xf4\xd0\x43\x80\xa2\xe8\x21"
        "\x27\x02\xad\x51\x20\x45\x03\xa3\x29\x8a\x1e\xd9\xd6\x05\x92\x8b\x0f"
        "\x85\x4f\x3d\x11\x2d\x6c\x04\x45\x0f\x6c\x11\x20\xa7\x80\xc5\xcc\xbe"
        "\x15\x57\xff\x2c\xc9\x24\x25\xca\xfe\x7c\x6c\xea\x3b\x3b\xfb\xde\xcc"
        "\x7b\x33\xe3\x19\x59\xd0\x9b\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x40\xc4\xef\xbc\x72\xf6\xf8\xf3\xe9\x61\xb7\x02"
        "\x00\x78\x90\xce\x4f\x7f\xf5\xf8\x09\xcf\x7f\x00\xf8\x44\xb9\xe0\xff"
        "\xff\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xa0\x4b\x51\xc4"
        "\x13\x91\x62\xe9\xfc\x56\x9a\xad\x3e\x77\x0d\x9f\x6b\x77\xae\x5e\x9b"
        "\x99\x98\xbc\x7d\xb5\x91\x54\xd5\x1c\xa8\xca\x97\x3f\xc3\xcf\x9f\x38"
        "\x79\xea\x4b\x2f\x8c\x9f\xee\xe5\x87\xd7\xdf\x6b\x4f\xc5\x6b\xd3\x17"
        "\xce\xd6\x5f\x5e\xbc\xb2\xb4\xdc\x5a\x59\x69\xcd\xd7\x67\x3a\xed\xb9"
        "\xc5\xf9\xd6\x3d\x6f\x61\xb7\xf5\x6f\x36\x56\x1d\x80\xfa\x95\xd7\xaf"
        "\xce\x5f\xba\xb4\x52\x3f\xf1\xdc\xc9\x1b\xbe\xbe\x36\xfa\xc1\xd0\xe3"
        "\x47\x46\xcf\x8c\x3f\x73\xec\xe9\x5e\xd9\x99\x89\xc9\xc9\xe9\xbe\x32"
        "\xb5\xc1\x8f\xbc\xf7\x5b\xdc\x69\x84\xc7\xa1\x28\xe2\x58\xa4\x78\xf6"
        "\xfb\x3f\x4e\xcd\x88\x28\x62\xf7\xc7\xe2\x2e\xd7\xce\x7e\x1b\xa9\x3a"
        "\x31\x56\x75\x62\x66\x62\xb2\xea\xc8\x42\xbb\xd9\x59\x2d\xbf\x9c\xea"
        "\x1d\x88\x22\xa2\xde\x57\xa9\xd1\x3b\x46\x0f\xe0\x5c\xec\x4a\x23\x62"
        "\xad\x6c\x7e\xd9\xe0\xb1\xb2\x7b\xd3\x4b\xcd\xe5\xe6\xc5\x85\x56\x7d"
        "\xaa\xb9\xbc\xda\x5e\x6d\x2f\x76\xa6\x52\xb7\xb5\x65\x7f\xea\x51\xc4"
        "\xe9\x14\xb1\x1e\x11\x9b\x43\xb7\x6e\x6e\x30\x8a\xa8\x45\x8a\xef\x1e"
        "\xde\x4a\x17\x23\x62\xa0\x77\x1c\xbe\x58\x0d\x0c\xbe\x73\x3b\x8a\x7d"
        "\xec\xe3\x3d\x28\xdb\x59\x1f\x8c\x58\x2f\x1e\x81\x73\x76\x80\x0d\x45"
        "\x11\xaf\x46\x8a\x9f\xbc\x53\xc4\x5c\x79\xcc\xf2\x4f\x7c\x21\xe2\xd5"
        "\x32\xff\x31\xe2\xad\x32\x5f\x8a\x48\xe5\x85\x71\x2a\xe2\xfd\xea\x3a"
        "\x1a\x79\xc8\x2d\x67\x2f\xd4\xa2\x88\x3f\x2b\xcf\xff\x99\xad\x34\x5f"
        "\xdd\x0f\x7a\xf7\x95\x73\x5f\xab\x7f\xa5\x73\x69\xb1\xaf\x6c\xef\xbe"
        "\xf2\xc8\x3f\x1f\x1e\xa4\x03\x7e\x6f\x1a\x8e\x22\x9a\xd5\x1d\x7f\x2b"
        "\x7d\xf4\xdf\xec\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\xb0\xd7\x46\xa2\x88\xa7\x22\xc5\x2b\xff\xfe\x07\xd5\xb8\xe2\xa8\xc6"
        "\xa5\x1f\x3e\x33\xfe\xbb\xa3\x3f\xdf\x3f\x66\xfc\xc9\xbb\x6c\xa7\x2c"
        "\xfb\x5c\x44\xac\x15\xf7\x36\x26\xf7\x50\x1e\x42\x3c\x95\xa6\x52\x7a"
        "\xc8\x63\x89\x3f\xc9\x86\xa3\x88\x3f\xca\xe3\xff\xbe\xfd\xb0\x1b\x03"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x89\x56"
        "\xc4\x7b\x91\xe2\xc5\x77\x8f\xa6\xf5\xe8\x9f\x53\xbc\xdd\xb9\x5c\xbf"
        "\xd0\xbc\xb8\xd0\x9d\x15\xb6\x37\xf7\x6f\x6f\xce\xf4\xed\xed\xed\xed"
        "\x7a\xea\x66\x23\xe7\x6c\xce\xb5\x9c\xeb\x39\x37\x72\x6e\xe6\x8c\x22"
        "\xd7\xcf\xd9\xc8\x39\x9b\x73\x2d\xe7\x7a\xce\x8d\x9c\x9b\x39\x63\x20"
        "\xd7\xcf\xd9\xc8\x39\x9b\x73\x2d\xe7\x7a\xce\x8d\x9c\x9b\x39\xa3\x96"
        "\xeb\xe7\x6c\xe4\x9c\xcd\xb9\x96\x73\x3d\xe7\x46\xce\xcd\x9c\x71\x40"
        "\xe6\xee\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x38"
        "\x29\xa2\x88\x9f\x45\x8a\xef\x7c\x63\x2b\x45\x8a\x88\x46\xc4\x6c\x74"
        "\x73\x63\xa8\x57\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x78\x98\x86\x52\x11\x3f\x88\x14\xf5\xdf\x6b\x5c\x5f\x57\x8b\x88"
        "\x54\xfd\xdb\x75\xb4\xfc\xe5\x54\x34\x0e\x95\xf9\xe9\x68\x8c\x97\xf9"
        "\x52\x34\xce\xe6\x6c\x56\x59\x6b\x7c\xfb\x21\xb4\x9f\xdd\x19\x4c\x45"
        "\xfc\x28\x52\x0c\x0d\xbf\x7d\xfd\x84\xe7\xf3\x3f\xd8\xfd\x74\xfd\x32"
        "\x88\xb7\xbe\xb9\xf3\xe9\x97\x6a\xdd\x1c\xe8\x7d\x39\xfa\xc1\xd0\xe3"
        "\x47\x0e\x9f\x19\x9f\xfc\x95\x27\xef\xb4\x9c\x6e\xd7\x80\xb1\x73\xed"
        "\xce\xd5\x6b\xf5\x99\x89\xc9\xc9\xe9\xbe\xd5\xb5\xbc\xf7\x4f\xf7\xad"
        "\x1b\xcd\xfb\x2d\xf6\xa6\xeb\x44\xc4\xca\x1b\x6f\xbe\xde\x5c\x58\x68"
        "\x2d\x5b\xf8\x64\x2c\xd4\xba\x0b\xb5\xd8\xd3\x2d\x8f\x44\xec\xed\x06"
        "\xf7\x6e\xa1\xd6\x5d\xc8\xf7\xab\x78\xe8\xed\xb9\xc3\x42\xe3\x60\x34"
        "\x63\x67\x21\xaa\x7b\xff\x6d\xef\xd9\x7c\x6c\x94\xcf\xff\xf7\x23\xc5"
        "\x6f\xbe\xfb\x1f\xbd\x07\x7e\xef\xf9\xff\x73\xdd\x4f\xd7\x9f\xf0\xf1"
        "\xd3\x3f\xde\x79\xfe\xbf\x78\xf3\x86\xf6\xe9\xf9\xff\x44\xdf\xba\x17"
        "\xf3\xef\x46\x06\x6b\x11\xc3\xab\x57\x96\x06\x8f\x44\x0c\xaf\xbc\xf1"
        "\xe6\xb1\xf6\x95\xe6\xe5\xd6\xe5\x56\xe7\xd4\xf1\xe3\x5f\x1e\x1f\xff"
        "\xf2\xc9\xe3\x83\x87\x22\x86\x2f\xb5\x17\x5a\x7d\x4b\xbb\x3e\x54\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x56\x2a\xe2\xb7"
        "\x23\x45\xf3\x47\x5b\xa9\x1e\x11\xd7\xaa\xf1\x5a\xa3\x67\xc6\x9f\x39"
        "\xf6\xf4\x40\x0c\x54\xe3\xad\x6e\x18\xb7\xf5\xda\xf4\x85\xb3\xf5\x97"
        "\x17\xaf\x2c\x2d\xb7\x56\x56\x5a\xf3\xf5\x99\x4e\x7b\x6e\x71\xbe\x75"
        "\xaf\xbb\x1b\xae\x86\x7b\xcd\x4c\x4c\xee\x4b\x67\xee\x6a\x64\x9f\xdb"
        "\x3f\x32\xfc\xf2\xe2\xd2\x1b\xcb\xed\xcb\xbf\xbf\x7a\xdb\xef\x1f\x1b"
        "\x3e\x7b\x71\x65\x75\xb9\x39\x77\xfb\xaf\x63\x24\x8a\x88\x46\xff\x9a"
        "\xb1\xaa\xc1\x33\x13\x93\x55\xa3\x17\xda\xcd\x4e\x55\x75\x6a\x8f\x06"
        "\x66\x0e\xa6\x22\xfe\x33\x52\xcc\x9d\xaa\xa7\xcf\xe7\x75\x79\xfc\x5f"
        "\x19\xef\x0d\xf6\x95\xed\x1f\xff\xbf\xd6\xb7\xbe\x5a\xde\xa7\xf1\x7f"
        "\x9f\xba\x69\x3f\x29\x15\xf1\xd3\x48\xf1\x1b\x7f\xfe\x64\x7c\xbe\x6a"
        "\xe7\x63\x71\xcb\x31\xcb\xe5\xfe\x3a\x52\x8c\x9d\xfe\x5c\x2e\x17\x87"
        "\xca\x72\xbd\x36\x74\xdf\x2b\xd0\x1d\x19\x58\x96\xfd\xdf\x48\xf1\xf7"
        "\x3f\xbb\xb1\x6c\xaf\xef\x4f\xec\x94\x7d\xfe\xfe\x8e\xee\xc1\x57\x9e"
        "\xff\xc3\x91\xe2\x07\x7f\xfa\xbd\xf8\xd5\xbc\xee\xc6\xf7\x3f\xec\x8c"
        "\xff\xec\x3f\xff\x8f\xdd\xbc\xa1\x7d\x3a\xff\x9f\xe9\x5b\xf7\xd8\x0d"
        "\xef\x2b\xd8\x75\xd7\xc9\xe7\xff\x58\xa4\x78\xe9\x89\xb7\xe3\xd7\xf2"
        "\xba\x0f\x7b\xff\x47\x11\xdb\xdb\xdb\xdf\x8a\x38\x9a\x0b\x5f\x7f\x3f"
        "\xc7\x3e\x9d\xff\xcf\xf6\xad\x1b\x8d\xee\x7e\x7f\x7d\xef\xba\x0f\x00"
        "\x00\x00\x00\x00\x00\x00\x00\xf0\xc8\x1a\x4c\x45\xfc\x4d\xa4\x78\x7a"
        "\xb2\x96\x5e\xc8\xeb\xee\xe5\xef\xff\xcd\xdf\xbc\xa1\x7d\xfa\xfb\x5f"
        "\xbf\xd8\xb7\x6e\xfe\x01\xcd\x57\xb4\xeb\x83\x0a\x00\x00\x00\x00\x07"
        "\xc4\x60\x2a\xe2\xbd\x48\x71\x79\xf5\xed\xeb\x63\xa8\xfb\xc6\x7f\xdf"
        "\x38\xfe\xf3\xb7\x76\xe6\x5e\x9f\x48\x37\x7d\x5b\xfd\x39\xdf\x2f\x54"
        "\xef\x0d\xd8\xcb\x3f\xff\xeb\x37\x9a\xf7\x3b\xbb\xfb\x6e\x03\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x81\x92\x52\x11"
        "\x2f\xe4\xf9\xd4\x67\xef\x32\x9f\xfa\x46\xa4\x78\xe5\xbf\x9f\xcd\xe5"
        "\xd2\x91\xb2\x5c\x6f\x1e\xf8\xd1\xea\xd7\xe1\xf3\x8b\x9d\x63\x67\x17"
        "\x16\x16\xe7\x9a\xab\xcd\x8b\x0b\xad\xfa\xf4\x52\x73\xae\x55\xd6\xfd"
        "\x4c\xa4\xd8\xfa\xab\xcf\xe5\xba\x45\x35\xbf\x7a\x6f\xbe\xf9\xee\x1c"
        "\xef\xc3\xdb\xbd\xb9\xd8\x97\x23\xc5\xe4\xdf\xf6\xca\x76\xe7\x62\xef"
        "\xcd\x4d\xde\x9d\x0f\xbc\x3b\x17\x7b\x59\xf6\x53\x91\xe2\xbf\xfe\xee"
        "\xc6\xb2\xbd\x79\xac\x3f\xbb\x53\xf6\x44\x59\xf6\x2f\x23\xc5\xd7\xff"
        "\xe9\xf6\x65\x8f\xec\x94\x3d\x59\x96\xfd\x5e\xa4\xf8\xe1\xd7\xeb\xbd"
        "\xb2\x8f\x95\x65\x7b\xef\x47\xed\xbe\x93\x74\xb8\x16\x0b\xad\xe7\xe6"
        "\x16\x17\x6e\x79\x15\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\xdc\xaf\xc1\x54\xc4\x9f\x44\x8a\xff\xb9\xb2\x1e\x6b"
        "\x79\xd8\x7f\x9e\xff\xbf\x37\x03\x7f\xad\x57\xf6\xad\x6f\xf6\xcd\xf7"
        "\x7f\x93\x6b\xd5\x3c\xff\xa3\xd5\xfc\xff\x77\x5a\xfe\x28\xf3\xff\x8f"
        "\xee\x59\x4f\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\xe0\xd1\x91\xa2\x88\x37\x23\xc5\xd2\xf9\xad\xb4\x31\x54\x7e\xee\x1a"
        "\x3e\xd7\xee\x5c\xbd\x36\x33\x31\x79\xfb\x6a\x23\xa9\xaa\x39\x50\x95"
        "\x2f\x7f\x86\x9f\x3f\x71\xf2\xd4\x97\x5e\x18\x3f\xdd\xcb\x0f\xaf\xbf"
        "\xd7\x9e\x8a\xd7\xa6\x2f\x9c\xad\xbf\xbc\x78\x65\x69\xb9\xb5\xb2\xd2"
        "\x9a\xaf\xcf\x74\xda\x73\x8b\xf3\xad\x7b\xde\xc2\x6e\xeb\xef\x1c\xba"
        "\xae\xb1\xea\x00\xd4\xaf\xbc\x7e\x75\xfe\xd2\xa5\x95\xfa\x89\xe7\x4e"
        "\xde\xf0\xf5\xb5\xd1\x0f\x86\x1e\x3f\x32\x7a\x66\xfc\x99\x63\x4f\xf7"
        "\xca\xce\x4c\x4c\x4e\x4e\xf7\x95\xa9\x0d\xde\xc7\xde\xef\xab\x71\x3b"
        "\x0e\x45\x11\x7f\x11\x29\x9e\xfd\xfe\x8f\xd3\x3f\x0f\x45\x14\xb1\xfb"
        "\x63\x71\x97\x6b\x67\xbf\x8d\x54\x9d\x18\xab\x3a\x31\x33\x31\x59\x75"
        "\x64\xa1\xdd\xec\xac\x96\x5f\x4e\xf5\x0e\x44\x11\x51\xef\xab\xd4\xe8"
        "\x1d\xa3\x07\x70\x2e\x76\xa5\x11\xb1\x56\x36\xbf\x6c\xf0\x58\xd9\xbd"
        "\xe9\xa5\xe6\x72\xf3\xe2\x42\xab\x3e\xd5\x5c\x5e\x6d\xaf\xb6\x17\x3b"
        "\x53\xa9\xdb\xda\xb2\x3f\xf5\x28\xe2\x74\x8a\x58\x8f\x88\xcd\xa1\x5b"
        "\x37\x37\x18\x45\xbc\x1e\x29\xbe\x7b\x78\x2b\xfd\xcb\x50\xc4\x40\xef"
        "\x38\x7c\xf1\xfc\xf4\x57\x8f\x9f\xb8\x73\x3b\x8a\x7d\xec\xe3\x3d\x28"
        "\xdb\x59\x1f\x8c\x58\x2f\x1e\x81\x73\x76\x80\x0d\x45\x11\xff\x10\x29"
        "\x7e\xf2\xce\xd1\xf8\xd7\xa1\x88\x5a\x74\x7f\xe2\x0b\x11\xaf\xf6\x17"
        "\x7c\x29\x22\x95\x17\xc6\xa9\x88\xf7\x6f\x73\x1d\xf1\x68\xaa\x45\x11"
        "\xff\x57\x9e\xff\x33\x5b\xe9\x9d\xa1\xf2\x7e\xd0\xbb\xaf\x9c\xfb\x5a"
        "\xfd\x2b\x9d\x4b\x8b\x7d\x65\x7b\xf7\x95\x83\xf4\x7c\xd8\xbe\xff\x6b"
        "\x71\x64\x0f\x76\x7b\xef\x0e\xf8\xbd\x69\x38\x8a\xf8\x61\x75\xc7\xdf"
        "\x4a\xff\xe6\xbf\x6b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\x80\x03\xa4\x88\x5f\x8e\x14\x2f\xbe\x7b\x34\x55\xe3\x83\xaf\x8f\x29"
        "\x6e\x77\x2e\xd7\x2f\x34\x2f\x2e\x74\x87\xf5\xf5\xc6\xfe\xd5\x23\xfe"
        "\xb0\xcc\xed\xed\xed\xed\x7a\xea\x66\x23\xe7\x6c\xce\xb5\x9c\xeb\x39"
        "\x37\x72\x6e\xe6\x8c\x22\xd7\xcf\xd9\xc8\x39\x9b\x73\x2d\xe7\x7a\xce"
        "\x8d\x9c\x9b\x39\x63\x20\xd7\xcf\xd9\xc8\x39\x9b\x73\x2d\xe7\x7a\xce"
        "\x8d\x9c\x9b\x39\xa3\x56\xc5\xf6\xf6\xf6\xb7\xba\xf5\x6b\xb9\x7e\xce"
        "\xb5\x9c\xeb\xb5\x88\xa2\xac\x9f\x3f\x6f\xe6\x8c\x03\x32\x76\x0f\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x78\x29\xaa"
        "\x7f\x52\x7c\xe7\x1b\x5b\xa9\x9a\x4b\xb5\x11\x31\x1b\xdd\xdc\x30\x1f"
        "\xe8\xc7\xde\xff\x07\x00\x00\xff\xff\xde\xc7\xfe\xc4",
        3124);
    syz_mount_image(/*fs=*/0x20000000, /*dir=*/0x20000180,
                    /*flags=MS_NOSUID|MS_DIRSYNC*/ 0x82, /*opts=*/0x20000700,
                    /*chdir=*/0xfd, /*size=*/0xc34, /*img=*/0x20001080);
    break;
  case 2:
    memcpy((void*)0x20000040, "./file1\000", 8);
    res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000040ul,
                  /*flags=O_CREAT|O_RDWR*/ 0x42ul, /*mode=*/0ul);
    if (res != -1)
      r[0] = res;
    break;
  case 3:
    memset((void*)0x20000140, 50, 1);
    syscall(__NR_pwrite64, /*fd=*/r[0], /*buf=*/0x20000140ul, /*count=*/1ul,
            /*pos=*/0x8000c61ul);
    break;
  case 4:
    memcpy((void*)0x20000100, "./file1\000", 8);
    res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000100ul,
                  /*flags=O_SYNC|O_CREAT|FASYNC|O_RDWR*/ 0x103042ul,
                  /*mode=*/0ul);
    if (res != -1)
      r[1] = res;
    break;
  case 5:
    *(uint64_t*)0x20000240 = 0x20001b40;
    memcpy(
        (void*)0x20001b40,
        "\xa7\xb9\xee\x54\x16\x9c\x15\x47\xbd\xef\x4b\x3d\x02\xef\x64\x76\x38"
        "\x56\x55\xea\x58\xc6\xf3\x2e\x3c\xef\x41\x1f\x18\x18\x11\xf7\x52\x75"
        "\xe9\x48\xd1\x58\xe1\xa4\x7d\xa9\xfa\x35\x46\xba\x6d\x3c\x59\xbe\x18"
        "\x50\x21\xdb\x39\x19\x5f\x48\x26\x3d\x9c\xf5\x8d\x4d\x4d\x2e\xb3\x02"
        "\x1c\x9f\xa0\x83\x41\xa9\x47\x9f\xe3\x79\x06\x91\x52\xc5\x3f\x2b\x2f"
        "\xe8\x46\x61\xd5\x18\x3f\xec\x85\xcf\xe6\xfd\x44\x8d\x4d\x57\x87\x58"
        "\x7f\xd0\xef\x48\x65\x50\xd2\x6c\x35\xd2\x1c\x24\x27\xa5\x20\xcc\x09"
        "\x2c\xea\x85\x5e\x56\x37\x82\x7e\x70\xde\xf7\xa6\xe4\x9e\x0c\x7c\xf8"
        "\x00\x92\xa5\x70\x7d\x0a\x81\x82\xd7\x5c\xc1\x37\x16\x72\x8d\x37\x78"
        "\x81\xee\x4c\xc4\x35\xd8\x49\x12\xe0\x36\x6d\xca\x18\x5e\xf5\x2e\x94"
        "\x64\xf9\xbe\xd8\x5b\x30\xdb\x8f\xe6\x00\xb0\x55\x89\xd2\x81\xe6\xbb"
        "\x44\x43\xc8\x6d\xd3\xb5\x8c\xc1\xbd\x5c\x43\xde\x0a\x58\xb1\x18\x8a"
        "\x89\x6d\x62\x44\x81\x3c\xc2\xe6\x17\x34\xc9\x30\xec\x92\x71\x15\x0f"
        "\x87\x9a\x26\xe6\x70\x3e\x48\x51\x0d\x8a\x56\x73\x03\x87\xc6\x7f\xe5"
        "\x8a\x91\xfd\x37\x26\xbc\xd9\xdd\xcb\xb5\xdb\x9b\x1d\xbc\x28\x39\xf7"
        "\x2e\x73\x42\x04\x71\x78\xb1\x83\x39\x57\x2a\xcf\x41\x49\x8b\xb4\xea"
        "\xe4\x9a\x10\x2a\xec\x19\xfa\xc4\xd4\xe6\x1b\xea\x73\x85\x64\x2f\x7c"
        "\x8c\x4c\x27\xb5\x88\x37\x64\x56\x7f\x9d\x17\x93\x9c\xd7\xfb\xee\xc3"
        "\x60\x57\xc8\x5e\xf6\x69\x7a\x8b\xf4\xaa\xd4\xc4\xa3\x71\xd2\x8f\xed"
        "\x2f\xc8\x2e\x7f\xcb\xfb\xa3\xd9\xde\x1e\x13\x6b\x5a\x01\xea\xc5\x15"
        "\x44\x54\x05\x4f\xf9\x66\xde\x60\x75\xc2\x44\x5e\xf4\xd4\xcc\x85\x99"
        "\x81\xaa\x62\x3e\x17\x14\xb8\x01\xaa\x6b\x3c\xf8\xe7\xcb\x83\x01\xda"
        "\x35\x9b\x3d\x75\xda\xae\x6e\x1f\xc3\x59\xa0\x33\xbb\x3e\x4b\x28\x5b"
        "\xd4\x8e\x0c\xcc\x98\xf6\x45\xb9\xf8\x96\x98\x19\x00\x40\x70\x44\x87"
        "\x4e\x1d\x31\x45\x28\x28\x91\xa5\xc1\xb3\xeb\x53\xb0\xa4\xa1\x54\xd8"
        "\x17\x6a\xaf\x5f\x2b\xeb\xf1\x9a\x6b\xd5\xab\x73\xe5\x8b\xbd\x4b\xbe"
        "\x57\xd2\x5c\xa6\x0d\x50\x05\xa5\x05\x32\x01\xd1\xa5\xb2\x11\x50\x49"
        "\xe1\x76\x93\x1d\x59\x4c\xed\x76\x92\xd0\xe3\x4f\x98\xbd\xcf\x68\x5a"
        "\x56\xa0\x76\xe8\x34\x41\x78\x81\x43\x6e\x00\xdf\x27\xc8\xd6\xbc\x6b"
        "\xe5\x87\x23\x8a\xfb\xec\x60\xf8\xb1\x57\x3c\xef\x3b\xec\x2a\x40\x4e"
        "\x99\x1f\x3b\x0c\x94\x55\xd4\x24\x72\x32\x45\x7d\x1e\x83\x13\x84\xa5"
        "\xf1\x63\x8a\x4d\xd4\xc6\x88\x15\xdc\x59\x73\x1f\xee\xea\x13\x89\xd5"
        "\x39\x32\x03\xfd\xe8\x44\x62\x32\x01\xb8\x06\xd6\x66\x5c\x7e\xba\xd8"
        "\x60\x61\xd5\x03\x2a\xd2\x0f\x8d\x8c\xff\xd0\xfa\x44\xd9\xfe\x29\xba"
        "\xc0\x4b\xf0\x4e\x37\x01\xe6\x24\x77\xb5\xf0\xd5\x05\x0a\x0b\xf0\x12"
        "\x39\xaf\xa5\xc8\x6e\x2a\x60\xd1\xa5\x5c\x23\x70\x12\x13\xf0\x3e\xdb"
        "\xb1\x59\x9c\xc3\x3e\x45\xa4\xe1\x4f\xd9\x38\x7c\xb5\x49\xbf\x24\x4b"
        "\x8c\xaf\xe7\x51\x80\x37\x2d\xd0\x12\xa2\xbe\xb1\xe2\x30\x9d\xdb\xe2"
        "\x7e\xb3\x45\x37\xab\x21\x69\xdc\x5b\x1d\x17\xb8\x84\xdd\x1a\x84\x41"
        "\xba\x1d\xb5\x4a\x69\x8e\x84\x93\x07\x27\x49\x9a\x36\x9f\xe1\xf4\x85"
        "\x30\x96\xbc\x14\xbf\x2f\xba\xe3\x6a\x01\xdf\x1b\x3b\xf6\x06\x76\x6d"
        "\x17\x03\xf0\x7f\x46\x29\x30\x7f\xe8\xc3\x5c\x04\xf3\xb5\x7b\x06\xb1"
        "\x0e\x2a\x3e\x91\x78\x2a\x74\x2d\x4a\x25\xff\x0a\xfe\x8f\x38\x6f\xa7"
        "\x81\x64\xf4\x03\xfc\x51\xf2\xd2\x15\x9e\x4d\xdc\x50\x2b\x62\x3f\xe6"
        "\x64\xd7\x22\x4e\x44\xf6\x78\x8f\xf4\xd0\xa5\x79\x61\x15\x15\x9a\xf2"
        "\x43\x2e\x99\x03\xc1\x69\xb6\x78\x57\xa7\x86\xd1\x53\x34\xab\x03\x9b"
        "\x7f\x75\xae\x22\x0c\x45\xab\x5d\xf7\xf3\x18\x00\xc2\x62\x4b\x81\x58"
        "\x5b\x7e\x25\x48\xa9\x18\xa5\x93\x6d\x8e\x71\xfd\xa8\x5b\x4c\x58\x0a"
        "\x12\xfb\x19\x1a\x31\xb2\x75\x4f\xc5\x72\xce\x16\x5e\x00\x82\x64\x2b"
        "\x16\xa8\xb2\xe3\x8e\x80\x45\x12\x14\x52\x7f\xb5\x85\xd6\xd6\x35\x50"
        "\x76\x9a\x29\xbc\x04\x12\x9c\x03\xe1\xa0\xef\xe7\x04\x78\x4c\x10\x62"
        "\x8a\xea\x33\xde\x1f\x99\xfa\xa2\x1b\x30\x11\x0e\x55\xad\x23\x1b\x2a"
        "\xf5\xac\x1e\x70\xa9\x5a\x30\x17\x66\xb4\x08\xb5\x09\x02\x71\x74\xac"
        "\x83\xf1\x05\x67\xef\x97\xcb\xca\xa7\x0e\x90\x81\x12\x39\xf9\xfb\xd2"
        "\x4c\xf8\x3e\x39\xe1\x7f\xe6\x0c\x4d\x2d\xac\x04\xe8\x4c\x0b\x9a\x50"
        "\x3d\x5e\xf6\x93\x68\x7d\xf9\xde\x95\xf1\xec\x5f\xdf\x8a\xa5\x30\xee"
        "\xec\x0f\xf6\x31\xd7\x03\x8e\xae\xb8\x36\x87\x78\x9c\xe6\x59\x44\x8d"
        "\x81\xcf\x05\x9a\xea\x82\x21\x18\x4a\x6b\xc4\x37\x3a\x8e\xf3\xf0\xe1"
        "\x60\x7c\x49\x02\xeb\x18\x5d\x30\x6c\x96\x4e\x5a\xde\x8c\x9c\x05\x08"
        "\x9d\xc7\x1d\xec\x9a\x94\x6b\xf2\x12\x86\xe3\xd5\x2b\x6d\x5c\xa8\x67"
        "\x0f\xf5\x7c\xe4\x01\x30\x4a\x28\x33\x95\x24\x7d\x90\xcb\xc5\x75\xc6"
        "\xdd\x35\xc9\x05\xd9\x6d\xdd\x9c\x04\x14\xf2\x44\x28\x26\x91\x51\x11"
        "\xeb\x85\x1a\xb3\x54\x0e\x16\x50\x10\x08\x44\x62\xe1\x38\xf5\x69\xdb"
        "\xa4\x48\xf4\xb7\x19\x8d\x68\x3e\x50\x3c\xf7\xcc\x53\x48\xd2\x35\x8d"
        "\x4c\x8a\x7c\x5c\x88\x32\x91\x9d\x18\x9b\x2f\x39\xfb\xe5\x23\x0c\x60"
        "\x18\x76\xa0\x63\x3a\xcb\x6f\x80\xff\x3f\x93\xcd\x4f\xa4\x11\xe2\xca"
        "\xa6\x4b\xbf\x9b\xee\x49\x90\xbb\x87\xf4\x25\x95\xd9\x68\x03\x99\xe4"
        "\x28\x13\xff\x0f\x37\x92\xb8\xe9\x8c\x2f\xba\xe6\x47\x88\xb0\x21\x03"
        "\x6f\x58\xdf\x1f\x29\xb0\x30\x96\x74\xe5\x6f\xe1\x15\x6a\xd8\x75\x9e"
        "\x7f\x92\x7f\x92\x66\xc0\x92\x0f\xa3\xa6\x37\x4a\x42\x5d\x2a\x47\x33"
        "\xd3\x32\x1c\xb6\xef\xd2\x54\xeb\x17\x58\x1e\xbf\x3d\x97\xf1\xd3\x09"
        "\x7b\x9d\x2f\x9b\xef\x8c\xed\x0c\xf2\x85\x30\xc8\x10\x39\x26\x68\x6f"
        "\x33\x90\xf1\x46\x0b\x0f\x80\x44\xf8\x77\x5b\xd3\x05\x4c\xcd\xab\xc4"
        "\xc4\xaf\x9f\x18\x3c\xa8\x34\x04\x48\xe7\x47\xa6\xb5\xed\xd4\x2a\x9c"
        "\x02\xc9\x59\xa4\x1f\x02\xd1\xe1\x0e\x86\x1a\x90\x14\xfc\x42\xe6\x6e"
        "\x97\x22\x5a\x25\x13\xe4\x2f\xa1\x92\xf4\x7a\x69\x06\xc1\x2a\x71\x67"
        "\x97\xc9\xd9\xe7\xe6\xe0\x4b\x85\x1f\x39\x0b\x91\x95\x94\xbc\x44\xbb"
        "\xef\x0e\xb4\xb1\xc9\x36\x71\xd0\x52\x80\x1b\xa3\x52\x52\x64\x23\xca"
        "\x3b\x60\xb2\x65\xd9\x54\x18\x14\xe0\x49\x78\xec\xe4\x46\x2d\xf9\x66"
        "\x2c\x97\x1a\x09\x56\x66\x6a\xb8\x69\xb3\x7c\xdd\x30\x2b\x6b\x20\x7a"
        "\x84\xc4\x19\x70\x2d\x2e\xac\xf2\xb2\x2d\x36\x21\x7d\x2a\x7f\x27\xce"
        "\xca\xce\xef\xf8\x0a\xc0\x9c\xc3\xb5\xaa\x43\x2e\x4d\xc4\x53\x34\xef"
        "\x0f\x51\xa9\xb7\x8f\x06\x49\x52\x1d\xd3\x76\x7d\xf0\x57\x8d\x4b\x43"
        "\xfc\xce\xa6\x6d\x9e\xa9\x90\x60\x45\xd9\x87\xc5\xf9\x42\xa1\xcb\x53"
        "\xb6\xe4\xa8\xa5\x92\xf7\xc7\x8f\x97\xf6\x49\x9a\xf7\xbd\x1c\xbb\x03"
        "\x1f\xc5\xa5\x93\xe4\xe5\x76\x17\xe5\x7a\xdb\x88\xc1\xdd\x87\xe6\x4b"
        "\x46\x70\x36\xfe\x56\xde\xba\x59\x64\x64\x68\x80\x49\x28\xcb\xcf\xf3"
        "\xa3\x76\x3f\x4a\xcc\x00\x9a\x43\xb9\x16\xa0\x5a\xbe\xbd\x57\x96\x12"
        "\xc9\x63\xa8\x57\xfa\x14\xc5\x89\x46\x6a\xeb\x08\x56\xf7\x52\x34\x9a"
        "\x5c\x90\x79\x47\x26\xcc\x2a\x46\x3d\x42\xe3\x19\xf3\xad\x2c\x0e\x0c"
        "\x1b\xe8\xd6\xa6\xd2\xcc\x07\xb9\x2e\x19\x21\x6a\xcd\x72\xf2\xd5\x4f"
        "\xeb\x91\x00\xef\x17\x00\x43\x0f\x2c\x37\x24\x68\x56\x15\xb8\x5c\x48"
        "\x6b\x25\x78\x91\x1e\x6d\x59\xe8\x6b\x78\x7d\x99\x13\x65\x99\x56\x2e"
        "\x3d\x11\x26\xff\x1d\x8d\x6d\xac\x5f\x45\x71\xfc\x03\xcf\x9c\x67\x0e"
        "\xe2\x99\x91\x1e\xfb\x28\xae\xf7\xa1\x7c\x4e\x81\x8a\xab\x64\x19\x93"
        "\xfb\x98\x89\x2d\x8f\x39\x3b\x95\x25\xc5\x5b\xe4\xec\x26\xa8\x50\x22"
        "\xaa\xce\xed\x4d\x05\x52\xac\x3c\xbe\x77\xa3\xfc\xff\xb3\xf3\x85\x01"
        "\x3b\xa7\x6a\xf4\x0c\xfd\x05\xc5\xe9\x46\xfb\x54\x1a\xd2\xdf\x07\x89"
        "\xfd\x26\xa1\xba\xbf\xd4\x68\x2b\x8b\x12\x3c\x51\x21\x39\x4c\x44\x64"
        "\xd1\x64\x0c\xf7\xaa\x95\x76\xe3\xa9\x17\x0f\x15\x11\x84\xbf\xfe\x53"
        "\x85\x47\x82\xc0\x40\xc1\x31\xc3\x74\xbb\x03\xaa\xb2\x6e\x5e\x80\xf6"
        "\xcf\x8f\x46\xa4\xd3\x77\xb3\xc5\xbc\xf7\x5d\xa5\x2e\x0c\x9c\x23\xd4"
        "\x94\xd6\x2b\xbd\xf2\x7c\x74\x93\xc1\x67\xfe\x4d\xa9\x5c\x27\xdb\x07"
        "\x85\x5b\x5f\xcb\x7a\x86\xe7\xe2\xcb\x6a\x37\xa4\xca\x16\x9d\x77\xc0"
        "\xc3\xf9\xfa\x1d\x3d\x69\xf5\xdb\xf4\x1e\xdf\x8a\x87\xe9\x76\xe4\x9b"
        "\x5a\xee\x9f\x1d\xed\x5d\x17\x6c\xa4\x68\x89\x16\xed\x25\xca\xe2\xfe"
        "\xdf\x70\xd4\xed\xff\xf1\x8b\x45\x50\x1f\xed\x2a\xe5\x6a\xa2\x8e\xc4"
        "\xdc\xd8\x9d\xf2\x74\x47\xc9\x54\x48\x52\xa0\x94\x9c\xe7\x06\xfe\x67"
        "\x58\xeb\x69\x70\x08\x79\x40\x5f\x34\x39\x23\x42\x5d\xc2\x05\xb1\x93"
        "\xd6\x71\x15\x6f\xe7\x64\x34\x22\x99\x34\x70\x0d\xfe\xcd\x28\x41\x87"
        "\x10\xb3\x7b\x9f\xa5\x16\xb8\xc3\xf3\xe3\x63\xbc\x18\xac\x05\x89\x2d"
        "\x78\x2b\x3a\x1c\x22\x0a\xa3\x41\x57\x50\x36\xc3\x7b\xb6\xff\x8f\x36"
        "\x03\xf6\x53\x0c\x86\x11\xe4\x41\xd1\x7a\xbb\x5e\xec\x0d\x68\xa5\x4e"
        "\x37\xad\x77\xbc\x74\x28\xa0\x57\x18\x4e\x6a\xc5\x90\x7b\x85\x44\xe1"
        "\xdd\x16\x3b\x82\x03\x38\xc0\x4c\x71\xb8\x0c\xa3\x7e\xb8\x54\x55\x9a"
        "\xca\x3b\x1d\x75\xab\x26\x73\xa6\x0f\x15\x38\x89\x99\xd5\x9e\x2f\x2c"
        "\x82\x31\x3a\x34\xee\x77\xe3\xaf\xed\xf3\xe2\xd1\x74\x81\x5e\x56\x8b"
        "\xb7\x6b\x52\xfc\x4e\x16\xa6\x01\x8a\x10\x2c\x4d\xb5\x7f\xb5\x53\xb3"
        "\xdb\xde\x29\x49\x90\x69\xf9\x64\xeb\x4f\xb2\x41\x4a\x78\x03\x95\x79"
        "\xb1\x15\xbc\xa4\xa5\x01\x4b\xe0\x24\x6d\x35\x8a\x5a\xaf\xbe\x43\x09"
        "\xb8\x8a\x88\x91\x13\x86\x04\xed\x99\x11\xda\xe3\xa9\x4d\x8e\x0a\xc9"
        "\x80\xd0\x06\x85\x97\xc9\xe6\xd8\x49\x2b\x4f\xd4\x5c\x5d\x5c\xc8\x39"
        "\xdd\x99\xc9\x38\x51\x67\x72\xd5\x6d\x1c\xef\xe0\xce\x5b\xaa\xed\x5a"
        "\xc5\x76\x1c\x57\x08\x15\xa2\x87\x12\x9f\xe9\xb3\x5d\x00\x8f\x5e\xf9"
        "\x7c\x1d\x75\xb0\xda\xf4\x81\x96\x56\x86\x6d\xbd\x9f\xee\x3c\x4c\xd7"
        "\x60\x00\xb8\x53\xb1\xca\x7e\x27\xd0\xc6\x42\x7c\x28\xe7\xa3\xcf\x14"
        "\x54\x18\x6d\xa9\xb9\xc7\x80\x85\x36\xe6\xb9\xb3\xa7\xa9\xac\xf5\xa0"
        "\x2e\xbb\x3a\x66\x54\x46\x72\xf9\x57\x0f\xac\x7f\x2e\xa0\x2e\x90\xad"
        "\xa4\x5d\xdf\xbf\x84\x04\xaa\xf7\xa7\x6a\xd1\xea\x9c\xfe\x34\x68\xc2"
        "\xdc\xa4\x59\xd7\x02\xe5\x24\xa4\x27\xb4\xb5\x78\xa8\x2a\x0d\xa4\x3f"
        "\x09\x8c\x0e\xdc\xff\x51\xb9\x4b\xf7\xd5\xd2\x9f\x9e\x17\x42\x82\xe5"
        "\xd4\x06\xd0\x42\x3b\x07\x0a\x5f\xcc\xb7\x65\x5a\x34\x68\xc3\xeb\x35"
        "\x7e\x2e\x6e\xf9\xac\x91\x74\xe3\x62\xe1\x79\xe3\x0d\x1b\xec\x52\x63"
        "\x88\xbc\x30\x3c\x42\x4a\x6b\xc1\xd3\x69\x18\xb5\x4b\xdb\x21\x6f\x13"
        "\x88\x44\x0a\xb4\x5c\xcd\xbb\x1b\x9d\x37\x93\x17\x12\xae\x85\xfa\x3f"
        "\x0e\x27\xf9\x66\xbc\xb4\x17\x5c\x65\xe3\x6c\x89\x0f\xa2\x31\x7f\x83"
        "\xcb\xe9\x4e\xfd\x4c\x17\x30\xb7\x5b\xf7\x91\xd1\xb3\x39\x94\x33\xdd"
        "\x41\x34\x96\xc3\x7d\xf5\x6f\x14\xe5\xe6\x4f\x24\x69\x33\x89\x19\xbb"
        "\xb5\x51\x2d\x8a\x9f\x4f\xb5\x1c\x32\x95\xf7\xf6\x66\x29\xbb\x76\x67"
        "\xe0\xad\x58\xe7\xc1\x40\xba\x6c\x9e\xb0\x17\xaa\x77\x57\xfa\xad\x9b"
        "\x63\x71\xf8\x69\xcf\xba\x7f\x09\x80\xcd\x6b\x09\x18\x8d\x8d\x59\x3a"
        "\x35\x77\x6d\x5c\xbc\x3a\xe0\x6b\x4d\x9a\xa9\x40\x5c\x98\xbb\x90\xce"
        "\x05\xe0\x5d\xbd\xc9\xa7\xf2\x66\xf0\xd8\x74\x7d\x8f\x80\x47\x9f\x6a"
        "\xe8\xf7\x10\x82\xb9\xf5\xda\x0e\xe0\x5e\x0e\x13\xd7\x19\x0a\x9f\x99"
        "\x27\xe4\xbc\x13\xf8\xa8\x47\x08\xba\xac\x1c\x64\xc1\x0e\x13\xa3\x4f"
        "\x27\x10\xc6\xf3\x0b\x72\xf2\x22\x71\x50\xf6\x3c\x89\x5c\xa6\xac\x49"
        "\x56\xc1\x4f\x01\xc0\x62\x0d\xd2\xf7\xfd\x5f\xff\x18\xc9\x51\x5f\xa4"
        "\xef\x78\x48\x27\x93\x72\xca\x86\x16\xcc\x46\x9c\x5e\x2a\xbc\xcf\x72"
        "\x46\x62\x70\x3f\x73\x68\xf0\x60\xf1\xcb\x86\xc7\x1b\xba\x93\xa9\xc6"
        "\x8b\x28\x14\x49\x8a\xac\x10\xfc\x3c\x59\xae\xf9\x93\x61\x17\xa3\x73"
        "\x4b\x49\x91\x7b\x6d\x68\x70\x3a\xd3\xf1\x8c\x2e\xe1\x4d\xcb\xfb\xa6"
        "\x66\x81\xce\x08\x7b\xf4\x3d\xb0\x32\x03\x13\x98\x0b\x41\xdd\x66\x6d"
        "\xfb\xaf\x99\x3c\xf1\x2f\xe9\xa4\x38\xb9\x4e\x1c\x88\x1e\x8b\x90\x81"
        "\xf4\xe8\x35\x20\xd3\xa9\x42\x24\x94\x9b\x3a\x02\xff\x48\x5c\xd2\xaa"
        "\x24\xaf\xb5\x18\xda\x52\x91\xff\x95\x36\x2a\x70\xa8\x7c\xe6\x5f\x1b"
        "\x69\x2b\x8e\x7d\x54\xf6\xca\x14\x1c\x5d\xf3\x21\x62\x01\xdf\x8c\xc1"
        "\x22\x68\x5f\x92\x7b\xa9\x9e\x29\x57\x0e\xd7\x34\x89\xe9\x94\x12\xf1"
        "\x03\x1b\x50\xb7\x88\x0b\x0f\x3d\xc8\xa9\x63\xe3\x1d\xf5\x61\xf3\xe2"
        "\x36\x78\xb5\xcb\xda\xb8\x88\xc0\xc2\x9a\xc6\xce\x43\x05\x9c\x9e\xa8"
        "\x7f\x8a\x7e\x22\x22\xa3\xa8\x38\x0e\x70\xbc\x07\x90\xf4\x8f\xba\x7a"
        "\x8e\xa8\x7b\x13\x9a\x66\x65\xe6\xf6\xf6\xf8\xf3\xc4\xc2\xc6\x67\x54"
        "\x1a\xa5\x37\x96\xb9\x4e\xef\x1b\x09\x14\x1f\x0a\x91\xa1\xc9\x50\x66"
        "\x11\xd6\x46\x86\xe8\x79\x15\xb5\x7c\xa3\xf2\x00\x2e\xd3\x04\xb7\xb3"
        "\xea\x61\x71\x9f\x37\x3f\xf1\xf9\x26\x44\x5d\xf4\x40\xbb\x09\x7b\x54"
        "\x76\xf0\x5a\x18\xaa\x45\x53\x8c\x5e\x25\x33\x49\xa3\xbf\x13\x6a\xab"
        "\xab\xaf\xcc\x3b\xfd\x40\x25\xb9\x27\x49\xfd\xee\x02\x1f\x6f\xf3\xa3"
        "\xc4\x05\x94\x88\x51\x3f\x07\x0f\x51\x16\x73\x72\x03\xe8\x1e\x0e\x36"
        "\xad\x71\xe1\x9b\xbf\xe1\x4f\x71\x19\xf5\xee\x48\x16\x3a\xb0\xd6\x13"
        "\xff\x6f\x92\xfc\x1d\x6a\x13\xf6\xc0\x25\x0b\xb2\xa4\x44\x4f\xc8\xd2"
        "\xcc\x5f\xa9\x09\x8a\xec\x5e\x8d\x00\xb5\x0b\x4d\x8a\x43\x52\x11\x2e"
        "\x77\xe0\xca\x53\x4f\x6d\x69\xa4\xae\x1a\x31\x69\x7f\xcf\x76\x4c\x1b"
        "\xd0\x80\x87\xf3\x61\xc0\x80\xda\xb7\x4d\xdc\x77\xec\x4b\x50\xdd\xd9"
        "\xd8\x53\x1f\xba\x89\x0c\x7b\x51\x62\xeb\x41\xb5\x76\xbe\x7f\x57\x8f"
        "\xe6\x72\x30\x35\x9e\xd7\x2f\x79\x70\x51\xc3\x1e\x98\x6e\x23\xec\x93"
        "\x32\xec\x95\xe8\x60\xd1\xaf\xee\xea\x7e\x10\x2d\xaf\xf1\x5e\x84\x60"
        "\xe8\x3a\xf7\x1c\xd3\x39\x4d\x1f\x8f\x09\x1d\x58\x6b\x02\xed\xf9\x89"
        "\x34\x0e\xb2\xfb\xe0\x06\x6f\x7e\x74\x83\x50\x33\x29\x3b\x2f\x23\x23"
        "\x8f\xfa\x10\x85\x31\x62\x8f\x4b\xb3\xc5\xa4\xee\x10\x71\xff\x87\x19"
        "\x0d\x03\x3d\x36\x5f\x5d\xf7\xa4\x36\xc3\x43\x5c\xe8\x25\xe4\x86\x71"
        "\xa8\xc5\x70\x52\xfe\x45\x52\xc8\x13\x30\xe3\xf7\x1b\x25\x77\x1d\x73"
        "\xfc\xbd\xf8\x14\xc4\xc6\xa9\x14\x9b\x72\xc8\x83\x70\xb4\x86\x06\x76"
        "\x1e\x9e\xd2\x3e\x8c\xf3\x7c\xae\x16\xcd\xf6\x47\x44\xc4\x6f\x71\xb4"
        "\x05\xd2\xd7\x8b\x86\xb1\x3f\x1f\xd9\xa3\x76\x17\x61\x7b\x31\x46\xa1"
        "\xa9\x77\xf7\xf7\x67\x06\x7d\xad\x9c\xd5\xc5\x60\x8e\x79\xab\xf0\x4a"
        "\x7b\xf0\xd0\x83\xc7\xa4\x32\x2e\xb0\x53\xce\xd2\x3e\xcd\x58\x98\x52"
        "\x7f\xdd\x5c\xe5\x62\x38\xe5\xf1\xef\x17\x59\x7e\x99\xd3\xd4\xce\x7e"
        "\x96\xe8\x1a\x9e\x44\xdc\x9c\x4b\xf2\x7a\x15\xd7\xd0\x01\x9d\x7f\xc8"
        "\x10\x0d\x31\xba\xf6\x74\x59\x8b\x1b\x94\xb4\x4a\x72\x9c\xe5\x8c\xce"
        "\x08\xc1\xf8\x58\x74\xd8\x29\x03\x70\xee\x7b\xc3\xa9\x5e\xf3\xa0\x2b"
        "\x39\x29\x97\xc5\xd0\xd8\xda\x2f\xc2\xcd\x24\x6d\x43\x48\x24\x3b\xc6"
        "\xe5\xc3\xeb\x2a\x1e\x8a\x42\x57\x6b\xd0\xdd\x2c\x96\xda\x7f\xdb\xd9"
        "\x56\xb3\x4e\x13\x79\xc6\x5b\xaf\x21\x6f\x95\xdf\x7b\xd3\x61\x7f\x74"
        "\x33\xd3\x37\x09\x0a\xb8\x3b\xf9\x67\x08\x96\x41\x36\x45\x8c\xe7\xab"
        "\x2e\x9f\x38\xd8\x2e\x94\x45\xad\x41\x15\xb8\x87\x25\x89\x27\xca\x62"
        "\xd2\x96\xc3\x00\xd1\x25\x2b\x3b\xaa\xd3\x62\xeb\xdc\x72\xa3\x07\xa9"
        "\x14\x51\xfd\x7f\xc3\xbb\x4d\xe2\xbd\xa2\xeb\x5d\x85\xc4\xa1\x8b\xb8"
        "\xda\x62\xa4\xee\x0b\xbd\xba\x6e\xd6\x61\xd9\x1d\x9d\x15\xec\x1d\xbf"
        "\xc4\x0d\xb9\xdc\x52\xac\xfe\x0d\x50\xe0\x1e\x5d\x58\x1b\x0a\xf6\x5a"
        "\x2d\x1b\x87\x54\x2f\x79\xb1\x6d\xf3\xdd\x5b\x29\x02\xc3\xed\xd1\x7d"
        "\xe0\x9a\x71\x1e\x3c\xc4\xfb\xbe\x68\xa6\x50\x1a\xd7\x7f\xd3\xc3\x9a"
        "\x8f\xce\x7c\x2e\xa9\xfb\xed\xd6\xee\xc3\xbe\x79\x7e\xee\x9a\x94\x96"
        "\x92\xa5\x96\x83\x2f\x5f\x26\xe8\x11\x5e\x0b\xfd\x42\x9e\x67\x5d\x20"
        "\xbe\x9e\xf8\x6c\xb5\xb8\x4e\x9f\x34\x10\x89\x4c\x84\x41\xe2\x38\x3e"
        "\xaa\x5f\x7f\x4a\xaf\xe5\xbc\x6f\xc6\xcc\x6b\xc7\x4a\xe2\x2e\xe1\xaa"
        "\x39\x1b\xb7\xb8\x7d\x80\x8b\xce\x48\xc0\xb6\x4d\x90\x09\x07\xfc\x2a"
        "\x17\x97\xb7\x97\x7b\xdb\x25\x65\x73\x14\xdf\x52\xe5\x23\x12\x77\x8b"
        "\x34\x4f\x68\x99\x44\x4f\xf4\xc1\x27\xe1\x1d\xf9\xfc\x17\x62\x72\x3c"
        "\x99\xd6\x8d\x06\x61\x56\x3d\x47\xfb\x71\x4c\x6e\xb7\xcf\xf2\x1c\x09"
        "\x81\xae\x25\x9a\xf4\x4b\x6d\xb1\xb7\xe7\x60\x26\x28\xa9\x75\xc1\x85"
        "\x83\x5e\x18\xa8\x2a\xf1\xb3\xde\x1c\x65\x02\x4c\xb9\x11\x1e\x0f\x2b"
        "\x33\x81\x85\xad\x7e\xe1\x53\xdb\x2c\x09\x57\xc2\xd4\x16\x69\xc0\xda"
        "\xe2\x61\x71\x8c\x89\xe1\x13\xb9\xe5\xab\x9b\x74\x92\x94\x76\x9c\x6c"
        "\xbf\x49\xe1\x18\x72\x5c\xf0\xe3\xaa\x05\x84\xfc\xac\x98\x26\x71\x4e"
        "\x22\x54\x59\x6d\xa1\xf7\x9a\x0f\x7f\x4f\x68\x37\x6b\x5b\x58\x41\x55"
        "\xb7\x25\xc0\xbe\x17\x72\xd6\x99\x92\xd8\x64\xcc\xd2\xc8\x33\x3f\xcf"
        "\xc2\x33\x62\x84\x4f\x1f\xbc\x17\xe3\xe0\xc4\xc4\x17\x95\x77\xe8\x87"
        "\x61\x39\xe3\x18\xa1\x72\x7e\x5e\x8a\x74\xca\x35\x97\x1d\xc0\xd8\x20"
        "\x8a\x0f\x53\xad\x51\x25\xa6\x6a\xac\x81\xd0\xbf\x03\x14\x75\xf3\xe4"
        "\xd1\xfd\xbe\xd1\x0f\x2b\xd0\xb0\x1a\x65\x56\x2b\xf5\xfc\x38\xda\xa0"
        "\x45\x28\x0d\x1c\x1f\x75\x45\x4b\xe9\x71\xbc\xb5\x43\x3a\xb2\xb2\xa8"
        "\x4e\x6b\x4a\x68\x0c\x4b\x53\xc9\x9c\xa1\x59\x09\xcd\x6d\x65\xed\x5f"
        "\x63\xfd\x89\xa6\xaf\xd4\x5a\xbe\x39\x48\xe3\x5d\xe9\xcd\x3d\xb1\xbc"
        "\x68\xd0\x9a\x5a\x14\x5a\x26\xc4\xc2\xc5\x60\xe6\x0a\x0a\x48\x1d\x69"
        "\xb1\xf3\x62\xa9\x9b\x15\xa0\xaf\xe4\xe0\xfe\x1b\x77\x79\xc7\x4b\x90"
        "\xe2\xaa\xb1\x95\x88\x6f\x0f\x17\x0f\xab\x88\x8c\x5f\x52\x41\x3b\x92"
        "\x5d\x5e\x8d\xda\x75\x4e\x5f\xf6\x27\x40\xa0\xc8\x32\x7d\xfc\x48\x2e"
        "\xb6\x75\xd9\xf0\x7d\x5c\x0e\xea\xb5\xab\xe4\x30\x19\x87\x65\x7c\x39"
        "\xa0\x3d\x10\x93\xfc\x1e\xc0\x8f\x8c\x46\x2a\x0f\xa7\x65\xcb\x7f\xa6"
        "\x24\xfa\x42\x49\x21\x09\x9d\x27\x29\x36\xec\x30\x2b\x4c\xd0\xfe\xa0"
        "\xe3\x68\x01\x9b\x82\x5a\x7e\xc0\x98\xa6\x1a\xca\x0a\x01\x1e\x59\x13"
        "\x7a\xe3\x60\x6b\x91\x7a\x5e\xb3\x0b\x35\xdf\x0d\xe0\x24\xc6\xb3\x03"
        "\x8a\x10\x16\x20\x26\x3a\x7d\x41\xdb\x84\x6c\x7d\x9e\x79\x39\x66\xf4"
        "\x44\x1b\xa7\xb9\x79\x7a\x8f\x1b\x74\x76\x91\x8a\xfa\xa5\xd6\x9d\x2a"
        "\xcd\x89\x1d\xa3\x8d\x6f\x82\xfe\x85\xb7\x77\x2a\xed\x1e\x9c\xc9\x22"
        "\x5d\x83\x6a\xb1\xaf\x6a\x54\xd3\x73\x07\x36\xd4\x0c\x90\x6d\x57\x16"
        "\x65\x41\xe6\x76\xc2\x70\x8f\x1d\xca\xbd\x34\x56\x44\x12\xb7\xe1\x5b"
        "\xa4\x3c\x42\x38\x2b\xcb\xc5\xd1\xb7\x36\x35\xef\x9b\x72\x04\xe9\x1c"
        "\xbe\x89\xe5\x9b\x05\xba\xd1\x9c\x5d\xa1\xa5\x04\x1b\x88\xc6\xaa\x66"
        "\x74\xb6\x70\xce\x6b\x9d\xa7\xab\x06\xa5\xfe\x9f\x90\x6a\x89\x92\xcd"
        "\x4e\x6d\x63\x28\x75\x06\xdc\xea\x91\x12\xc1\xa8\x54\x93\x31\x80\xc8"
        "\x11\x6d\x79\xf9\x55\x3e\xbd\x9f\x20\x17\xa8\xb3\xa4\xf7\x09\xd8",
        4096);
    *(uint64_t*)0x20000248 = 0xfffffc49;
    *(uint64_t*)0x20000250 = 0x200007c0;
    memcpy(
        (void*)0x200007c0,
        "\xc3\x00\xef\x54\xa1\x44\x1a\x3a\xb8\x2c\xfd\x81\xe5\x96\x8d\x7d\xab"
        "\x37\x00\xd2\x9b\x56\x0a\x01\x18\x1e\x21\xca\xf0\x15\x6c\xdd\x8f\xdd"
        "\x85\x0c\x05\x48\x8d\x78\x5e\x7f\x62\x34\x90\x55\x8a\x65\x74\xf2\x92"
        "\xac\xf9\x31\x82\x2f\xc6\xd1\x9f\xf7\x72\xb3\x89\x64\x78\x29\x92\x96"
        "\x47\x1d\x00\x84\xa6\x37\xd1\xb6\xb5\x46\xfd\x8b\x86\xcb\xd7\xf5\xce"
        "\xbe\x8c\x74\xe9\x3c\x33\xca\x75\xf6\xb9\xf0\x41\x95\x53\x3c\xe4\x9e"
        "\xc9\xfb\xcb\xc1\xae\x0f\xd5\x52\x21\xd8\x3c\xe7\x5a\x52\xd9\x50\x35"
        "\xff\x51\xbf\xfe\x77\x3c\xb3\x9a\xe8\xe0\xac\x4e\x18\x46",
        133);
    *(uint64_t*)0x20000258 = 0x83;
    *(uint64_t*)0x20000260 = 0x200001c0;
    memcpy((void*)0x200001c0,
           "\x22\x67\x98\x9c\xf3\xf5\xa6\xed\x59\xde\xf9\xcc\xe2\x12\xdf\x5b"
           "\xe1\x95\x34\x1c\xfc\x89\x14\x36\x27\x9b\xa7\x47\x05\x97\x3f\xf2"
           "\xf1\xa6\x36\x21\x58\xca\x57\x87\x34\xa6\xb2\x42\xa6\xbc\xb8\x7d"
           "\xf5\xcf\x82\xcd\x22\x9b\xcc\xad\xf5\x00\x5d\xee\x78\x0f\x56",
           63);
    *(uint64_t*)0x20000268 = 0x3f;
    syscall(__NR_pwritev2, /*fd=*/r[1], /*vec=*/0x20000240ul, /*vlen=*/3ul,
            /*off_low=*/0x8000, /*off_high=*/8, /*flags=*/0ul);
    break;
  case 6:
    res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0ul,
                  /*flags=O_CREAT|O_RDWR*/ 0x42ul, /*mode=*/0ul);
    if (res != -1)
      r[2] = res;
    break;
  case 7:
    syscall(__NR_pwritev2, /*fd=*/r[2], /*vec=*/0ul, /*vlen=*/0ul,
            /*off_low=*/0, /*off_high=*/0, /*flags=*/0ul);
    break;
  case 8:
    syscall(__NR_write, /*fd=*/r[2], /*buf=*/0ul, /*count=*/0ul);
    break;
  case 9:
    memcpy((void*)0x20000100, "./bus\000", 6);
    syz_mount_image(/*fs=*/0, /*dir=*/0x20000100, /*flags=MS_POSIXACL*/ 0x10000,
                    /*opts=*/0, /*chdir=*/0xfd, /*size=*/0, /*img=*/0x20000000);
    break;
  }
}
int main(void)
{
  syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul,
          /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1,
          /*offset=*/0ul);
  syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul,
          /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul,
          /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1,
          /*offset=*/0ul);
  syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul,
          /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1,
          /*offset=*/0ul);
  const char* reason;
  (void)reason;
  use_temporary_dir();
  loop();
  return 0;
}