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

#define _GNU_SOURCE

#include <dirent.h>
#include <endian.h>
#include <errno.h>
#include <fcntl.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/loop.h>

#ifndef __NR_memfd_create
#define __NR_memfd_create 319
#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 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;
retry:
  const int umount_flags = MNT_FORCE | UMOUNT_NOFOLLOW;
  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")) {
  }
}

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[1] = {0xffffffffffffffff};

void execute_one(void)
{
  intptr_t res = 0;
  if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {
  }
  memcpy((void*)0x20000600, "hfsplus\000", 8);
  memcpy((void*)0x20000180, "./file1\000", 8);
  memcpy(
      (void*)0x20000640,
      "\x78\x9c\xec\xdd\xcd\x6b\x1c\xe7\x1d\x07\xf0\xef\xec\xca\x7a\xb1\xc1\x56"
      "\x12\x3b\x49\x5f\xa0\xc2\x85\x52\x62\x6a\x4b\x5a\xbb\x4e\xa1\x50\xb5\x98"
      "\xa2\x83\x29\x09\xbd\xe4\x92\x83\xa8\xe5\x58\x78\xed\x04\x49\x29\x4a\x0e"
      "\xad\x5b\xfc\x87\xa4\x07\xf5\x9a\x9e\x4d\x0f\x3e\x18\x7a\xeb\x3d\x27\x41"
      "\x8f\x85\x42\x2f\x01\xd1\x8b\xca\xcc\xce\xae\x36\xb2\xac\x68\x63\x4b\xbb"
      "\x72\x3e\x1f\xfc\xec\x3c\xcf\x3e\xf3\x3c\xf3\x9b\x9f\xe7\x19\xb4\x23\xc1"
      "\x06\xf8\xd6\x5a\x7c\x2f\xa7\x1e\xa7\xc8\xe2\xa5\x9b\x1b\x65\x7b\x6b\xb3"
      "\xd5\xde\xda\x6c\xdd\xeb\xd6\x93\x4c\x24\x69\x54\xff\x32\x56\x56\xff\x95"
      "\x34\x1f\x26\x33\xe9\x94\x7c\x27\x49\x51\x4f\x57\x3c\xeb\x38\xef\xbe\xff"
      "\xe8\xcb\x2f\x5a\x9f\x9f\x99\xe8\xbd\xd3\xe8\xee\xdf\x3c\x68\xdc\xe1\x3c"
      "\xa8\x4b\x16\xea\x20\x17\xfa\x3a\x27\x9f\x73\xbe\x27\x7b\xe6\x1b\x5c\xd1"
      "\x3b\xc3\x72\xd2\x1b\xdd\xc9\x47\xc1\xce\xd7\xfb\xef\x0b\x3d\x60\xf3\x80"
      "\x16\x43\x53\x3c\xe3\xff\x62\x3a\x39\x5d\xaf\xa1\x6a\xe9\xd6\x17\x6e\xe3"
      "\x78\xa3\x7b\xf1\x46\x66\x01\x02\x00\x00\xc0\x11\x3a\xb7\x9d\xed\x6c\xe4"
      "\xec\xb0\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x93\xa4\xfe\xfe\xff"
      "\xa2\x2e\x8d\x6e\x7d\x26\x45\xf7\xfb\xff\xc7\xeb\xf7\x52\xd7\x4f\xb4\xc7"
      "\xc3\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x80\x1f\x6c\x67\x3b\x1b\x39"
      "\xdb\x6d\xef\x14\xd5\xef\xfc\x2f\x56\x8d\xf3\xd5\xeb\x99\x7c\x9c\xb5\x2c"
      "\x67\x35\x97\xb3\x91\xa5\xac\x67\x3d\xab\x99\x4b\x26\xa7\xfb\x26\x1a\xdf"
      "\x58\x5a\x5f\x5f\x9d\x3b\xc4\xc8\xf9\x24\x4f\x8f\x9c\x3f\x9e\xf3\x05\x00"
      "\x00\x00\x00\x00\x00\x80\x97\xd4\x9f\xb3\xb8\xfb\xfb\x7f\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x18\x05\x45\xd2\xec\x6c\xaa\x72\xbe\x5b\x9f"
      "\x4e\x63\x2c\xc9\x64\x92\xf1\x72\xbf\x07\xc9\xdf\xbb\xf5\x93\xec\xf1\xb0"
      "\x03\x00\x00\x00\x80\x63\x70\x6e\x3b\xdb\xd9\xc8\xd9\x6e\x7b\xa7\xa8\x3e"
      "\xf3\xbf\x5e\x7d\xee\x9f\xcc\xc7\xb9\x9f\xf5\xac\x64\x3d\xed\x2c\xe7\x56"
      "\xf5\x2c\xa0\xf3\xa9\xbf\xb1\xb5\xd9\x6a\x6f\x6d\xb6\xee\x95\xe5\xe9\x79"
      "\x7f\xf9\x9f\x81\xc2\xa8\x66\x4c\xe7\xd9\xc3\xfe\x47\x9e\xad\xf6\xb8\xd0"
      "\x1b\xb1\x98\x5f\xe7\xb7\xb9\x94\x99\xbc\x93\xd5\xac\xe4\xf7\x59\xca\x7a"
      "\x96\x33\x93\x1b\x55\x6d\x29\x45\xa6\xeb\xa7\x17\xd3\xdd\x38\xf7\x8f\x77"
      "\xe1\x2b\xad\x77\xea\x10\x9e\xe9\xcd\x2a\x92\xa9\xdc\xce\x4a\x15\xdb\xe5"
      "\xfc\x2e\x1f\xa6\x9d\x5b\x69\x54\xe7\x50\xed\x73\xf0\x11\xff\x54\x66\xa7"
      "\xf8\x45\xed\x90\x39\xba\x55\x6f\x8b\xa4\xf8\x5e\xb9\xdd\x99\x38\xe4\xc8"
      "\xa3\x36\x5d\x65\xe4\x54\x2f\x23\xb3\x75\xee\xcb\x6c\xbc\x72\x70\x26\x06"
      "\xbc\x4e\xf6\x1e\x69\x2e\x8d\xde\x33\xa8\xf3\x47\x90\xf3\xd3\xf5\xb6\xcc"
      "\xf9\xe4\xc1\x97\xc5\x31\xdb\x9b\x89\xf9\xbe\xab\xef\xf5\x83\x33\x91\x5c"
      "\xbc\xb9\xd5\xbc\xd3\xbe\x7f\xf7\xce\xed\xb5\x4b\xa3\x73\x4a\xdf\x50\x27"
      "\x13\xff\x48\xea\x4c\xb4\xfa\x32\xf1\xc6\x9e\x4c\xfc\x71\xef\xe0\x97\x2a"
      "\x13\xe3\x75\x36\x3a\x77\xd1\xc1\xee\x96\x17\xab\xb1\x67\xb3\x92\xdf\xe4"
      "\xc3\xdc\xca\x72\xae\xe5\x7a\xae\xe5\x6a\xf1\x20\xc9\x5c\xae\x57\x6b\xad"
      "\x9b\xd7\x0b\x87\x58\x6b\x8d\xc1\xd6\xda\x0f\x7f\x5c\x57\x5e\x4d\x8a\xa9"
      "\xce\x76\x44\x94\x79\x7d\xa5\x2f\xaf\xfd\x77\xba\xe9\xaa\xaf\xff\x9d\xdd"
      "\x2c\xbd\xfa\xe2\xef\x48\x63\xdf\xad\x2b\xcd\xa4\x18\xeb\xc5\x34\x0a\xf6"
      "\x66\xa2\xff\x7a\x79\xed\xe0\x4c\xfc\x65\xa7\x7c\x5d\x6b\xdf\xbf\xbb\x7a"
      "\x67\xe9\xa3\x43\x1e\xef\x47\xf5\xb6\xbc\x37\x4f\x8c\xd4\xbd\x79\xbc\xbe"
      "\x7a\xc7\xaa\xd6\x57\xaf\x8e\xb2\xef\xb5\x7d\xfb\xe6\xaa\xbe\xf3\xbd\xbe"
      "\xc6\x53\x7d\x17\x7a\x7d\xfb\xae\xd4\xfc\x34\xad\x7a\xa5\x8e\xd7\x3f\xc3"
      "\x3d\x3d\xd3\x7c\xd5\xf7\xc6\xbe\x7d\xad\xaa\xef\xcd\xbe\xbe\xfd\x7e\xca"
      "\x01\x60\xe4\x9d\x7e\xeb\xf4\xf8\xd4\xbf\xa7\xfe\x39\xf5\xd9\xd4\xc3\xa9"
      "\x3b\x53\x37\x27\x7f\x35\xf1\xf6\xc4\xf7\xc7\x73\xea\xc9\xd8\xa3\xe6\xdf"
      "\x1a\x7f\x6d\xfc\xbc\x78\x2b\x9f\xe5\x0f\xbb\x9f\xff\x01\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x80\x6f\x6e\xed\x93\x4f\xef\x2e\xb5\xdb\xcb\xab\x27\xb3\xd2\xfd\x16\xa4"
      "\x51\x89\x47\x45\xe5\x25\xa9\x0c\xf9\xc6\xc4\xb1\xb8\xb2\x7e\xef\xa3\x2b"
      "\x6b\x9f\x7c\xfa\x93\x95\x7b\x4b\x1f\x2c\x7f\xb0\x7c\xff\xed\xf9\xab\xf3"
      "\x57\xe7\xae\x5f\xfb\xd9\x95\xdb\x2b\xed\xe5\xd9\xce\xeb\xb0\xa3\xe4\xa8"
      "\xec\x2e\xfa\x61\x47\x02\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x20\x8e\xe3"
      "\xcf\x49\x87\x7d\x8e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x1c\x8b\xef\xe5\xd4\xe3"
      "\x14\x99\x9b\xbd\x3c\x5b\xb6\xb7\x36\x5b\xed\xb2\x74\xeb\xbb\x7b\x36\x92"
      "\x8c\x95\xdb\xff\x25\xcd\x87\xc9\x4c\x3a\x25\xd3\x7d\xd3\x15\xcf\x3a\xce"
      "\xbb\xef\x3f\xfa\xf2\x8b\xd6\xe7\x67\x76\xe7\x6a\x74\xf7\x6f\xee\x37\x6e"
      "\xe7\xdc\x20\x67\xf1\xa0\x2e\x59\xa8\x83\x5c\x18\x64\xf4\xd7\xcc\xf7\xe4"
      "\xb9\xe7\x2b\x7a\x67\x58\x4e\x7a\xa3\x3b\x39\x0c\xdb\xff\x03\x00\x00\xff"
      "\xff\x11\x87\x1f\x61",
      1535);
  syz_mount_image(/*fs=*/0x20000600, /*dir=*/0x20000180,
                  /*flags=MS_I_VERSION|MS_NODIRATIME*/ 0x800800,
                  /*opts=*/0x200001c0, /*chdir=*/1, /*size=*/0x5ff,
                  /*img=*/0x20000640);
  memcpy((void*)0x20000040, "hugetlb.2MB.usage_in_bytes\000", 27);
  res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000040ul,
                /*flags=*/0x275aul, /*mode=*/0ul);
  if (res != -1)
    r[0] = res;
  memcpy((void*)0x20000240, "#! ", 3);
  *(uint8_t*)0x20000243 = 0xa;
  syscall(__NR_write, /*fd=*/r[0], /*data=*/0x20000240ul, /*len=*/0x208e24bul);
  memcpy((void*)0x20000000, "hfsplus\000", 8);
  memcpy((void*)0x20002900,
         "./"
         "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
         "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
         "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
         "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\000",
         250);
  memcpy(
      (void*)0x20000e00,
      "\x78\x9c\xec\xdd\xcd\x6f\x1c\x67\x1d\x07\xf0\xef\xac\xd7\xae\x37\x54\xc1"
      "\x69\x13\x1a\xa1\x22\xac\x44\x2a\x48\x11\x89\x13\x2b\x85\x70\xc1\x20\x84"
      "\x72\xa8\x50\x55\x0e\x3d\x5b\x89\xd3\x58\xdd\x24\x55\xe2\x22\xb7\x42\xe0"
      "\x02\x82\x13\x12\x87\xfe\x01\x05\xc9\x37\x0e\x08\x89\x7b\x50\xb8\x70\x29"
      "\xb7\x5e\x7d\xac\x84\xc4\x25\xe2\x10\xf5\xb2\x68\x66\x67\xed\x5d\xef\xfa"
      "\x2d\xf1\x5b\xe0\xf3\x89\xc6\xf3\x3c\xf3\xcc\x3c\xf3\x9b\xdf\x3c\x33\xe3"
      "\x5d\x67\xb5\x01\xfe\x6f\x5d\xbf\x90\xe6\xc3\x14\xb9\x7e\xe1\x8d\xe5\xb2"
      "\xbe\xb6\x3a\xdb\x5e\x5b\x9d\x7d\xa1\x6e\x6e\x27\x29\xcb\x8d\xa4\xd9\x9d"
      "\xa5\xb8\x9b\x14\x8f\x92\xb9\xb2\xbd\xe8\x9b\xd2\x37\x1f\xf2\xf1\xe2\xb5"
      "\xb7\x3e\x7b\xbc\xf6\x79\xb7\xd6\xac\xa7\x6a\xfd\xb1\xed\xb6\x1b\x61\xc4"
      "\xba\x2b\xf5\x94\xe9\xba\xbf\xe9\x91\x5b\x8e\xef\x76\x17\x2b\x75\x78\x79"
      "\x31\xc9\x8d\x7a\x3e\x68\x62\xb7\x7d\x0d\xac\x58\x26\xed\x7c\x3d\x87\x23"
      "\xd7\x19\xb2\xb2\x97\xcd\xf7\x72\xdd\x02\xc7\x4c\xef\xe9\x54\x74\x9f\x9b"
      "\x43\xa6\x92\x13\x49\x26\xeb\xdf\x03\x52\xdf\x1d\x1a\x87\x17\xe1\xc1\xd8"
      "\xd3\x5d\x0e\x00\x00\x00\x9e\x53\x9f\xde\x3b\xea\x08\x00\x00\x00\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\xf9\x53\x7f\xff\x7f\x51\x4f\x8d\x7a\x9e\xe9\x14\xbd"
      "\xef\xff\x9f\xe8\x2d\xab\xcb\xc7\xd0\xdc\xae\xd7\x7c\x78\xa0\x71\x00\x00"
      "\x00\x00\x00\x00\x00\xc0\xe1\xf8\xfa\x93\x3c\xc9\x72\x4e\xf6\xea\x9d\xa2"
      "\xfa\x9b\xff\xb9\xaa\x72\x3a\x5f\x74\x92\x2f\xe5\xfd\x3c\xc8\x42\xee\xe7"
      "\x62\x96\x33\x9f\xa5\x2c\xe5\x7e\x2e\x27\x99\xea\xeb\x68\x62\x79\x7e\x69"
      "\xe9\xfe\xe5\xf5\x2d\x4b\xa3\xb7\xbc\x32\x72\xcb\x2b\x87\x75\xc4\x00\x00"
      "\x00\x00\x00\x00\x00\xf0\x3f\xe9\x97\x69\x6d\xfc\xfd\x1f\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x8e\x83\x22\x19\xeb\xce\xaa\xe9\x74\x3d\xcf"
      "\x54\x1a\xcd\x6c\xb4\x65\x25\xf9\x67\x92\x89\xa3\x8e\x77\x0f\x8a\x51\x0b"
      "\x1f\x1e\x7e\x1c\x00\x00\x00\xf0\x4c\x26\x9f\x62\x9b\x2f\x3f\xc9\x93\x2c"
      "\xe7\x64\xaf\xde\x29\xaa\xd7\xfc\x5f\xa9\x5e\x2f\x4f\xe6\xfd\xdc\xcd\x52"
      "\x16\xb3\x94\x76\x16\x72\xb3\x7e\x0d\x5d\xbe\xea\x6f\xac\xad\xce\xb6\xd7"
      "\x56\x67\xef\x94\x53\x59\x1f\xec\xf7\xfb\xff\xde\x53\x18\x13\x75\x0f\x63"
      "\x55\x6d\xd4\x9e\xcf\x56\x6b\xb4\x72\x2b\x8b\xd5\x92\x8b\xb9\x51\x05\x73"
      "\x33\x8d\xee\xbe\xcf\x27\x67\x7b\xf1\xf4\xc5\xd5\xe7\xa3\x32\xa6\xe2\x7b"
      "\xb5\x5d\x46\xd6\xac\xd3\x5a\xee\xec\xf7\x5b\xbd\x8b\xb0\x2f\x76\xff\x56"
      "\x44\xab\x57\x68\x96\x3f\x7a\x19\x99\xa9\x63\x2b\xb3\x71\xaa\x9b\x81\xa2"
      "\x7a\xa3\x26\xd9\x9c\x89\x1d\xcf\x4e\x73\xa0\x36\x55\xf5\x3a\xbe\xbe\xa7"
      "\xcb\x69\xac\xbf\xf3\x73\xfa\x00\x72\x7e\xa2\x9e\x97\xc7\xf3\x9b\x03\xcd"
      "\xf9\x5e\xad\x67\xa2\x91\x2a\x13\x57\x7a\xa3\xaf\xbc\x66\xb6\xcf\x44\xf2"
      "\x8d\xbf\xfe\xe9\xed\xdb\xed\xbb\xef\xde\xbe\xf5\xe0\xc2\xf1\x39\xa4\x1d"
      "\x8c\x6d\xb1\x7c\xf3\x98\x98\xed\xcb\xc4\x2b\xcf\x75\x26\x9a\x7b\x5c\x7f"
      "\xa6\xca\xc4\x99\xf5\xfa\xf5\xfc\x28\x3f\xc9\x85\x4c\xe7\xcd\xdc\xcf\x62"
      "\x7e\x9a\xf9\x2c\x65\x21\x9d\xba\x7d\xbe\x1e\xcf\xe5\xcf\xa9\xed\x33\x35"
      "\x37\x50\x7b\x73\xa7\x48\x26\xea\xf3\xd2\x3d\x67\xbb\x89\x69\x3a\x3f\xac"
      "\x4a\xf3\x39\x57\x6d\x7b\x32\x8b\x29\x72\x2f\x37\xb3\x90\xd7\xab\x7f\x57"
      "\x72\x39\xdf\xce\xd5\x5c\xcd\xb5\xbe\x33\x7c\x66\xcb\xb8\xab\x63\xab\xae"
      "\xfa\xc6\xe6\xab\xbe\x77\xa6\xff\x36\x32\xf8\xf3\xdf\xac\x0b\xe5\xdd\xed"
      "\xb7\x1b\x77\xb9\xb9\xed\x8e\x78\xab\xd1\xb9\x5f\xba\xf7\xfe\x32\xaf\xa7"
      "\xfa\xf2\xda\x1d\xf5\x8f\xd7\xd7\x3a\xd5\x77\x1d\xcc\xf4\x65\xe9\xa5\x5e"
      "\x76\xc6\x47\x76\xfe\x34\xf7\xc6\xe6\x57\xeb\x42\xb9\x8f\x5f\x0d\x3f\x77"
      "\x8f\xd0\x54\x9d\x89\xf2\x02\xea\x3d\x25\x7a\xd1\xbd\xdc\xcd\x44\xb3\x7a"
      "\x16\x0d\x8f\xf3\x3f\x74\xca\xed\xd2\xbe\xdb\xe9\xdc\x9e\x7f\x6f\x8b\xfe"
      "\x57\x36\xd5\x5f\xab\xe7\xe5\xb0\x5a\xfd\xda\x4e\x6b\xf7\x8c\x3e\x15\xfb"
      "\xab\x1c\x2f\x2f\x65\xb2\xbe\x93\x0c\x8e\x8e\xb2\xed\xe5\xf5\xbb\x4c\x5f"
      "\x5b\x67\x63\x2c\x77\xdb\x06\x9f\xb8\xe5\x76\x67\xaa\xb6\xa2\xe8\x5d\xa9"
      "\x3f\xce\xbd\x6a\x00\x0c\x5f\xa9\x13\xf5\xef\x70\xc3\x3d\x5d\xa9\xda\x5e"
      "\x19\xd9\x36\x5b\xb5\x9d\xed\x6b\x1b\xf8\x7d\x2b\xf7\xd2\xce\xcd\x43\xc8"
      "\x1f\x00\x4f\xe3\x1f\x6f\xaf\x17\xa7\x72\x62\xa2\xf5\xaf\xd6\xa7\xad\x4f"
      "\x5a\xbf\x6e\xdd\x6e\xbd\x31\xf9\x83\x17\xbe\xf3\xc2\xab\x13\x19\xff\xfb"
      "\xf8\x77\x9b\x33\x63\xaf\x35\x5e\x2d\xfe\x92\x4f\xf2\xf3\x8d\xd7\xff\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\xc0\xd3\x7b\xf0\xc1\x87\xef\xce\xb7\xdb\x0b\xf7\x47\x17"
      "\x1a\x5b\x37\x0d\x14\x5a\xd9\xbc\x64\xa7\x9e\x37\x15\x8a\xfa\x0b\x7d\xf6"
      "\xb6\xd5\xf1\x2d\x4c\x26\x19\x58\x52\x7d\xcf\xd1\xa1\x87\xd1\xda\x1c\xc6"
      "\x50\xa1\xf3\x8b\xe4\xd0\xf3\xd3\xfb\x12\xc1\xd1\xeb\xfc\xae\x2c\x34\x87"
      "\x46\xd4\xa8\xc2\xdc\xc0\x92\x3f\x0f\x77\xf8\xd1\x1e\x23\x2c\x76\x77\x5d"
      "\x1c\x60\xa1\x91\xc3\xdd\xe9\x58\x46\x0f\x80\x23\xbc\x29\x01\x87\xe2\xd2"
      "\xd2\x9d\xf7\x2e\x3d\xf8\xe0\xc3\x6f\x2d\xde\x99\x7f\x67\xe1\x9d\x85\xbb"
      "\xe3\x57\xaf\x5e\x9b\xb9\x76\xf5\xf5\xd9\x4b\xb7\x16\xdb\x0b\x33\xdd\x9f"
      "\x47\x1d\x25\x70\x10\x36\x1e\xfa\x47\x1d\x09\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\xb0\x5b\xa3\x3e\x18\x70\xee\xc5\x9d\x3e\x34\xb2\xab\xcf\x78\xf8"
      "\x9f\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\xc0\xbe\xb8\x7e\x21\xcd\x87\x29\x72\x79\xe6\xe2\x4c"
      "\x59\x5f\x5b\x9d\x6d\x97\x53\xaf\xbc\xb1\x66\x33\x49\xa3\x91\x14\x3f\x4b"
      "\x8a\x47\xc9\x5c\xba\x53\xa6\xfa\xba\x2b\xf2\xc7\x47\xe9\x8c\xd8\xcf\xc7"
      "\x8b\xd7\xde\xfa\xec\xf1\xda\xe7\x1b\x7d\x35\xbb\xeb\x27\x8d\x7a\xbe\xb5"
      "\xed\x5b\x93\xac\xd4\x53\xa6\x93\x8c\xd5\xf3\x67\x30\xd0\xdf\x8d\x67\xee"
      "\xaf\xf8\x4f\xef\x18\xca\x84\x7d\xd1\xe9\x74\xe6\x9e\x2d\x3e\xd8\x1f\xff"
      "\x0d\x00\x00\xff\xff\xd5\x24\xf5\x0f",
      1737);
  syz_mount_image(/*fs=*/0x20000000, /*dir=*/0x20002900,
                  /*flags=MS_LAZYTIME|MS_SYNCHRONOUS*/ 0x2000010,
                  /*opts=*/0x200022c0, /*chdir=*/1, /*size=*/0x6c9,
                  /*img=*/0x20000e00);
}
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;
  for (procid = 0; procid < 5; procid++) {
    if (fork() == 0) {
      use_temporary_dir();
      loop();
    }
  }
  sleep(1000000);
  return 0;
}