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

#define _GNU_SOURCE

#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <setjmp.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/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>

#include <linux/loop.h>

#ifndef __NR_memfd_create
#define __NR_memfd_create 319
#endif

static unsigned long long procid;

//% 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) {
    errno = EMSGSIZE;
    return -1;
  }
  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, 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 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, loopfd = -1, 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) {
    memset(loopname, 0, sizeof(loopname));
    snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid);
    if (setup_loop_device(data, size, loopname, &loopfd) == -1)
      return -1;
    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) {
    if (strstr(opts, "errors=panic") || strstr(opts, "errors=remount-ro") == 0)
      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) {
    ioctl(loopfd, LOOP_CLR_FD, 0);
    close(loopfd);
  }
  errno = err;
  return res;
}

uint64_t r[1] = {0xffffffffffffffff};

int main(void)
{
  syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul);
  syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
  syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul);
  intptr_t res = 0;
  memcpy((void*)0x20000000, "hfsplus\000", 8);
  memcpy((void*)0x200000c0, "./bus\000", 6);
  memcpy(
      (void*)0x20000900,
      "\x00\x0e\x78\xf8\x68\xe7\xf0\x22\xc7\x7c\x39\x34\xdf\x59\x96\xe0\x82\xf5"
      "\xdd\x7a\xad\x4c\xb5\xe9\x49\x3b\x53\xc6\x5c\x90\x4b\x1a\x2e\xb9\xd6\xfd"
      "\x6a\xc2\x05\xe6\xb9\x94\xcc\x27\x42\x03\x24\xb1\x95\xd6\xbe\x72\x4b\x93"
      "\x66\x70\xe3\x8c\x31\x9c\x9b\x2d\x5a\x92\x9f\x7f\x29\x3d\xf5\x3a\xa0\x61"
      "\xc3\xbd\x42\x2c\x9b\xec\xab\xd7\x05\x71\xae\x08\x3c\xf8\x55\x91\xc7\xaa"
      "\x2d\x97\x59\x52\xfb\x57\xbf\x8e\x69\x98\x4c\xbb\xe0\xf6\x71\x08\x13\x32"
      "\x14\x6b\x84\x13\x48\x82\x88\xa2\xe1\x91\xf2\x44\xeb\x87\x67\x7f\x73\x98"
      "\xf7\x37\x6f\x1f\x03\xc4\xc9\xce\xc1\xbf\x1d\xfa\xcb\x6c\xa9\x12\x00\x52"
      "\x48\x8f\x23\xea\xb8\xf7\x34\x1c\xd0\x0a\xc6\x3f\x54",
      157);
  memcpy(
      (void*)0x20000300,
      "\x78\x9c\xec\xdd\x4f\x68\x1c\xd7\x1d\x07\xf0\xef\xac\x57\xb2\xe4\x82\xa3"
      "\x24\x76\x62\x4a\xa0\x22\x86\xb4\x54\xd4\xd6\x1f\x94\x56\xbd\xd4\x2d\xa5"
      "\xe8\x10\x4a\x48\x0f\x3d\x0b\x5b\x8e\x17\xaf\x95\x20\x6d\x8a\x12\x4a\x71"
      "\xff\xd1\x6b\x0f\xa1\xbd\xa6\x07\xdd\x7a\x2a\xf4\x6e\x48\xcf\xed\x2d\x57"
      "\x1d\x03\x85\x5c\x72\x28\xba\xb9\xcc\xec\xac\x76\x63\xc9\xf2\xda\x96\xbc"
      "\xab\xf8\xf3\x11\x6f\xdf\x7b\xfb\xde\xbc\x7d\xf3\xdb\x99\xd9\x99\x15\xcb"
      "\x04\x78\x6e\xad\xce\xa5\x79\x2f\x45\x56\xe7\xde\xda\x2e\xeb\xbb\x3b\x4b"
      "\xed\xdd\x9d\xa5\xb3\x75\x73\x3b\x49\x59\x6e\x24\xcd\x6e\x96\x62\x23\x29"
      "\x3e\x4d\xae\xa5\x9b\x52\xd4\x29\x03\xf9\x01\x1f\xb7\x56\xde\xf9\xec\xcb"
      "\xdd\xcf\xbb\xb5\x66\x9d\xaa\xfe\x8d\x4c\x3d\x7c\xb9\xe1\xdc\xad\x53\x66"
      "\x93\x9c\xa9\xf3\x83\x26\x9e\x68\xbc\xeb\x0f\x1d\x6f\x58\xfd\x08\x95\x01"
      "\xbb\xdc\x0b\x1c\x8c\xda\xfd\x03\xee\x3e\xce\xe2\x4f\xb9\xdf\x02\xe3\xa0"
      "\xe8\x7e\x6e\x1e\x30\x93\x9c\x4b\x32\x55\x9f\x07\xa4\x3e\x3a\x34\x9e\xed"
      "\xec\x8e\xdf\x63\x1d\xe5\x00\x00\x00\xe0\x94\x7a\x61\x2f\x7b\xd9\xce\xf9"
      "\x51\xcf\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x93\xfa\xfe\xff\x45"
      "\x9d\x1a\xbd\xf2\x6c\x8a\xde\xfd\xff\x27\xeb\xe7\x52\x97\x4f\xb5\x7b\xa3"
      "\x9e\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x83\x6f\xed\x65\x2f\xdb\x39\xdf"
      "\xab\xdf\x2f\xaa\xff\xf9\xbf\x5e\x55\x2e\x54\x8f\xdf\xc8\x07\xd9\xca\x7a"
      "\x36\x73\x25\xdb\x59\x4b\x27\x9d\x6c\x66\x21\xc9\xcc\xc0\x40\x93\xdb\x6b"
      "\x9d\xce\xe6\xc2\x10\x4b\x2e\x1e\xba\xe4\xe2\xb3\x59\x5f\x00\x00\x00\x00"
      "\x00\x00\x00\xf8\x9a\xfa\x5d\x56\xfb\xff\xff\x07\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x71\x50\x24\x67\xba\x59\x95\x2e\xf4\xca\x33\x69\x34"
      "\x93\x4c\x25\x99\x2c\xfb\xdd\x4d\xfe\xd3\x2b\x9f\x66\xf7\x46\x3d\x01\x00"
      "\x00\x00\x78\x06\x5e\xd8\xcb\x5e\xb6\x73\xbe\x57\xbf\x5f\x54\xd7\xfc\xaf"
      "\x54\xd7\xfd\x53\xf9\x20\x1b\xe9\xa4\x95\x4e\xda\x59\xcf\x8d\xea\xbb\x80"
      "\xee\x55\x7f\x63\x77\x67\xa9\xbd\xbb\xb3\x74\xa7\x4c\x07\xc7\xfd\xcb\xff"
      "\xee\x57\x86\x9c\x46\x35\x62\xba\xdf\x3d\x1c\xfe\xca\x97\xaa\x1e\xd3\xb9"
      "\x99\x56\xf5\xcc\x95\x5c\xcf\x7b\x69\xe7\x46\x1a\xd5\x92\xa5\x4b\xbd\xf9"
      "\x1c\x3e\xaf\xdf\x7e\x51\x8e\xfd\xa3\xda\x90\x33\xbb\x51\xe7\xe5\x9a\xff"
      "\xb9\xce\xc7\xc3\x4c\x15\x91\x89\xfd\x88\xcc\xd7\x73\x2b\xa3\xf1\xe2\xd1"
      "\x91\xf8\xf1\x17\x4f\xf5\x4a\x0b\x69\xec\x7f\xf3\x73\xe1\x04\x62\x7e\xae"
      "\xce\x8b\x07\xf2\xd1\x7b\x30\x12\x8b\x03\x5b\xdf\x2b\x47\x47\x22\xf9\xf6"
      "\x3f\xff\xfe\xcb\x5b\xed\x8d\xdb\xb7\x6e\x6e\xcd\x8d\xcf\x2a\x3d\xa1\x07"
      "\x23\xb1\x34\x10\x89\x57\x9f\xab\x48\xcc\x97\x91\x28\xfa\x9b\xe9\x6a\x7e"
      "\x96\x5f\x64\x2e\xb3\x79\x3b\x9b\x69\xe5\x57\x59\x4b\x27\xeb\x99\xcd\x4f"
      "\xab\xd2\x5a\xdd\xb1\x7c\x9c\x39\x3a\x52\xd7\xbe\x52\x7b\xfb\x51\x33\x99"
      "\xac\xdf\x97\xee\x51\xb4\x91\x8b\xfb\x2d\x8f\x9e\xd3\xeb\xd5\xb2\xe7\xd3"
      "\xca\xcf\xf3\x5e\x6e\x64\x3d\x6f\x56\x7f\x8b\x59\xc8\xf7\xb3\x9c\xe5\xac"
      "\x0c\xbc\xc3\x17\x87\xd8\xeb\x1b\x8f\xb7\xd7\x5f\xfe\x4e\x5d\x98\x4e\xf2"
      "\xa7\x3a\x1f\x0f\x65\x5c\x5f\x1c\x88\xeb\xe0\x31\x77\xa6\x6a\x1b\x7c\xa6"
      "\x1f\xa5\x97\x8e\xff\xd8\xd8\xfc\x66\x7d\x84\x2f\xd3\xef\xeb\x7c\x3c\x3c"
      "\x18\x89\x85\x81\x48\xbc\x7c\x74\x24\xfe\x56\x9d\x27\x6c\xb5\x37\x6e\x6f"
      "\xde\x5a\x7b\x7f\xc8\xd7\x7b\xa3\xce\xcb\xfd\xe8\x8f\x63\xf5\x29\x51\x6e"
      "\x2f\x2f\x95\x6f\x56\x55\xfb\xea\xd6\x51\xb6\xbd\x7c\x68\xdb\x42\xd5\x76"
      "\x61\xbf\xad\x71\xa0\xed\xe2\x7e\xdb\xa3\xf6\xd4\xc9\xfa\x1c\xee\xe0\x48"
      "\x8b\x55\xdb\xab\x87\xb6\x2d\x55\x6d\x97\x06\xda\x0e\x3b\xdf\x02\x60\xec"
      "\x9d\xfb\xee\xb9\xc9\xe9\xff\x4e\xff\x7b\xfa\x93\xe9\x3f\x4c\xdf\x9a\x7e"
      "\x6b\xea\x27\x67\x7f\x70\xf6\xb5\xc9\x4c\xfc\x6b\xe2\x87\xcd\xf9\x33\x6f"
      "\x34\x5e\x2b\xfe\x91\x4f\xf2\x9b\xfe\xf5\x3f\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\xe4"
      "\xb6\x3e\xfc\xe8\xf6\x5a\xbb\xbd\xbe\x79\x62\x85\xde\xed\x9c\xca\x67\xfe"
      "\x9a\x87\x75\xee\xdd\x47\xeb\xe4\xe7\xa3\xa0\xa0\xf0\xe8\xc2\x88\x0f\x4c"
      "\xc0\x89\xbb\xda\xb9\xf3\xfe\xd5\xad\x0f\x3f\xfa\x5e\xeb\xce\xda\xbb\xeb"
      "\xef\xae\x6f\x4c\x2c\x2f\xaf\xcc\xaf\x2c\xbf\xb9\x74\xf5\x66\xab\xbd\x3e"
      "\xdf\x7d\x1c\xf5\x2c\x81\x93\xd0\xff\xd0\x1f\xf5\x4c\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x80\x61\x1d\xfd\x33\x80\x89\xba\xd7\xd3\xfd\x9c\x60\xc4"
      "\xab\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\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x72\xab\x73\x69\xde\x4b\x91\x85\xf9\x2b\xf3\x65"
      "\x7d\x77\x67\xa9\x5d\xa6\x5e\xb9\xdf\xb3\x99\xa4\x91\xa4\xf8\x75\x52\x7c"
      "\x9a\x5c\x4b\x37\x65\x66\x60\xb8\xe2\x61\xaf\xf3\x71\x6b\xe5\x9d\xcf\xbe"
      "\xdc\xfd\xbc\x3f\x56\xb3\xd7\xbf\x71\xd4\x72\xc3\xb9\x5b\xa7\xcc\x26\x39"
      "\x53\xe7\xc7\x35\xde\xf5\xa7\x1e\xaf\xd8\x5f\xc3\x32\x60\x97\x7b\x81\x83"
      "\x51\xfb\x7f\x00\x00\x00\xff\xff\xd2\x4b\x08\x82",
      1524);
  syz_mount_image(0x20000000, 0x200000c0, 0x200008, 0x20000900, 4, 0x5f4,
                  0x20000300);
  memcpy((void*)0x20000040, ".\000", 2);
  res = syscall(__NR_openat, 0xffffff9c, 0x20000040ul, 0ul, 0ul);
  if (res != -1)
    r[0] = res;
  syscall(__NR_getdents64, r[0], 0x20000340ul, 0x61ul);
  {
    int i;
    for (i = 0; i < 64; i++) {
      syscall(__NR_getdents64, r[0], 0x20000340ul, 0x61ul);
    }
  }
  return 0;
}