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

#define _GNU_SOURCE

#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <setjmp.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/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 279
#endif
#ifndef __NR_mmap
#define __NR_mmap 222
#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)
    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;
}

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);

  memcpy((void*)0x200000c0, "hfsplus\000", 8);
  memcpy((void*)0x20000080, "./file0\000", 8);
  memcpy((void*)0x200008c0, "part", 4);
  *(uint8_t*)0x200008c4 = 0x3d;
  sprintf((char*)0x200008c5, "0x%016llx", (long long)8);
  *(uint8_t*)0x200008d7 = 0x2c;
  memcpy((void*)0x200008d8, "decompose", 9);
  *(uint8_t*)0x200008e1 = 0x2c;
  memcpy((void*)0x200008e2, "uid", 3);
  *(uint8_t*)0x200008e5 = 0x3d;
  sprintf((char*)0x200008e6, "0x%016llx", (long long)0xee01);
  *(uint8_t*)0x200008f8 = 0x2c;
  memcpy((void*)0x200008f9, "barrier", 7);
  *(uint8_t*)0x20000900 = 0x2c;
  memcpy((void*)0x20000901, "force", 5);
  *(uint8_t*)0x20000906 = 0x2c;
  memcpy((void*)0x20000907, "type", 4);
  *(uint8_t*)0x2000090b = 0x3d;
  memcpy((void*)0x2000090c, "\x95\x5a\x99\xcb", 4);
  *(uint8_t*)0x20000910 = 0x2c;
  memcpy((void*)0x20000911, "creator", 7);
  *(uint8_t*)0x20000918 = 0x3d;
  memcpy((void*)0x20000919, "\x10\x0a\xd9\x1c", 4);
  *(uint8_t*)0x2000091d = 0x2c;
  *(uint8_t*)0x2000091e = 0;
  memcpy(
      (void*)0x200001c0,
      "\x78\x9c\xec\xdd\x4f\x6c\x1c\x57\x1d\x07\xf0\xef\x6c\x9c\x75\x36\x48\xe9"
      "\xb6\x4d\xda\x82\x90\x1a\x35\x52\x05\x8d\x48\xec\x2c\x25\x41\x42\x6a\x40"
      "\x08\xe5\x50\xa1\xa8\x5c\x7a\xb5\x12\xa7\xb1\xb2\x49\x2b\xdb\x45\x6e\x85"
      "\xe8\x16\x28\x48\x5c\xe0\x84\x7a\xe0\x50\x84\xcc\xa1\x27\xc4\x01\xa9\x88"
      "\x03\xa2\x1c\x38\x21\x21\x71\xe1\xe4\x7b\x24\xee\x39\x00\x46\x33\x3b\xbb"
      "\x5e\xff\xc9\xda\x71\xfe\xac\x69\x3f\x1f\x69\x3c\x6f\xf6\xcd\x7b\xef\x37"
      "\xbf\x7d\x33\xbb\x3b\x2b\x6b\x03\x7c\x6a\x5d\x7a\x35\x87\x7b\x29\x72\xe9"
      "\xf4\xcb\x2b\xe5\xf6\xda\x6a\xa7\xbb\xb6\xda\xb9\x39\x28\x27\x99\x4e\xd2"
      "\x48\xa6\xfa\xab\x14\xb7\x92\xe2\xe3\xe4\x62\xfa\x4b\x3e\x5b\x3e\x58\x77"
      "\x57\xdc\x6d\x9c\x17\x6f\x7f\x54\x4c\xbd\xff\x61\xa7\xbf\xd5\x2e\xfa\xfd"
      "\x55\xfb\x37\xc6\xb5\xdb\x66\xc7\x3d\x7b\xf5\x92\x93\x49\x0e\xd5\xeb\x24"
      "\xff\xde\xb5\xbb\xa9\x1d\x1f\xdd\xd4\xdf\x95\x8d\xfe\xf6\xa9\x18\xc6\x5d"
      "\x26\xec\xd4\x20\x71\x30\x69\xeb\xdb\xf4\x36\x2a\x1b\xbb\x36\xdf\xfb\x79"
      "\x0b\x1c\x58\xef\xf4\x5f\x37\xb7\x69\x27\x47\x93\x1c\xa9\xdf\x07\xa4\xbe"
      "\x3a\xec\x7e\x65\x98\xbc\xb1\xd7\xa6\xde\xa3\x8b\x03\x00\x00\x00\x1e\x84"
      "\x9d\x3e\x8b\xef\xf8\x59\x7e\xd4\x63\x77\x72\x27\x2b\x39\xf6\x70\x42\x02"
      "\x00\x00\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\x4f\xa6\xa2\xff\x9b\x81\x45\xbd\x34"
      "\x06\xe5\x93\x29\x06\xbf\xff\xdf\x1c\xf9\x4d\xfd\xe6\x84\xc3\xbd\x4f\xef"
      "\x5d\xab\x56\xaf\x3c\x36\xe9\x40\x00\x00\x00\x00\x00\x00\x00\x60\xb3\xbf"
      "\x8e\xab\x6c\x6d\x7b\xe4\xd9\x3b\xb9\x93\x95\x1c\x1b\x6c\xaf\x17\xd5\x77"
      "\xfe\xcf\x55\x1b\xc7\xab\xbf\x9f\xc9\x9b\x59\xca\x7c\x16\x73\x26\x2b\x99"
      "\xcb\x72\x96\xb3\x98\xd9\x24\xed\x91\x8e\x9a\x2b\x73\xcb\xcb\x8b\xb3\xdb"
      "\x5b\xfe\x22\x65\xcb\xf5\xf5\xf5\x77\xea\x96\xe7\x76\x6c\x79\x6e\x73\x5c"
      "\xbd\x5d\x0f\x74\x7d\x7a\xd7\x5d\x00\x00\x00\x00\x00\x00\x00\xe0\xd3\xe3"
      "\x07\xb9\xb4\xf1\xfd\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c"
      "\x04\x45\x72\xa8\xbf\xaa\x96\xe3\x83\x72\x3b\x8d\xa9\x24\x47\xfa\x7b\x2d"
      "\x34\x7a\xc9\x1f\x93\x34\x27\x1d\xef\xfd\xfa\xd3\xa4\x03\x00\x00\x00\x80"
      "\x7d\x79\xe5\x5e\x76\x6e\xd5\xeb\x63\xc5\x7f\xfb\x85\xf5\xa2\xfa\xcc\xff"
      "\x54\xf5\xb9\xff\x48\xde\xcc\xad\x2c\x67\x21\xcb\xe9\x66\x3e\x57\xab\x7b"
      "\x01\xfd\x4f\xfd\x8d\xbf\xf7\x3a\xdd\xb5\xd5\xce\xcd\x72\xd9\xde\xf1\xd7"
      "\xff\x75\x4f\x41\x57\x3d\xa6\x7f\xef\x61\xe7\x91\x67\x92\x4c\x8f\xb4\xb8"
      "\x94\x6f\xe5\x3b\x39\x9d\x93\xb9\x9c\xc5\x2c\xe4\xbb\x99\xcb\x72\xe6\x73"
      "\x32\xdf\xac\x4a\x73\x29\xd2\xae\xef\x5e\xb4\xd7\x56\x5b\x19\xc4\xba\x3d"
      "\xde\x8b\x9b\xb6\x2e\x6f\x8d\xed\xd9\x2d\xdb\xcf\x54\xb1\xb6\x72\x2d\x0b"
      "\x55\x6c\x67\x72\xa5\x39\x08\xbd\x31\xd8\x67\x64\xb4\xdf\x37\x93\x2d\x23"
      "\xbe\x5b\x66\xa7\x78\xa9\xb6\xc7\x1c\x5d\xad\xd7\xe5\x11\xfd\xbc\x5e\x1f"
      "\x0c\xed\xea\xc8\x0f\x0f\x33\x32\x53\xe7\xbe\xcc\xc6\xe3\xa3\x79\xdf\x9e"
      "\xfb\x7b\x9c\x27\x5b\x47\x9a\x4d\x63\x78\x0f\xea\xf8\xc6\x28\xe5\xb4\xde"
      "\x3a\xd2\xbe\x72\x7e\xb4\x5e\x97\xb9\xfe\xf1\xc3\xcd\xf9\x3d\xde\x4a\x6b"
      "\x0f\x4b\x65\x26\x7a\x3f\x2d\xf3\xd2\x9f\x7d\xe5\x44\x1c\x9b\xf3\xe4\x8b"
      "\xff\xf8\xf3\xe5\xeb\x8d\x5b\x37\xae\x5f\x5b\x3a\x7d\x70\xa6\xd1\x3e\x6d"
      "\x9d\x13\x9d\x61\x26\x92\xa7\xc7\xcf\xbe\x3a\x13\xdd\x32\x13\xbd\xfb\xc8"
      "\xc4\x91\xfb\x89\xff\xc1\x69\xd6\xd9\x38\x54\x9d\x7a\x8d\x9c\x18\xd6\xec"
      "\x7e\xb5\x7c\xae\x6a\x7b\x2c\x0b\xf9\x76\x5e\xcf\xd5\xcc\xe7\x7c\x66\x32"
      "\x9b\x0b\x99\xc9\x57\x7f\x36\xe8\x67\x90\xd7\x13\xe3\xf3\x5a\x9d\x6b\x8d"
      "\xdd\xcf\xb5\xd1\x2b\xef\xa9\x2f\xd4\x85\xf2\xe4\xfd\xc9\xc8\x6b\xd3\xe4"
      "\x95\x79\x7d\x7c\xf8\xea\xb4\xf9\x4a\xd7\xae\xea\x46\x1f\xd9\x98\x7d\x4f"
      "\xec\x21\x4b\x77\xbd\x22\xfd\x73\xc7\x50\xa6\x3e\x57\x17\xca\x31\x7e\x38"
      "\xf2\x8c\x4c\xde\xd6\x4c\xcc\x8e\x64\xe2\xc9\xf1\x99\xf8\xd5\x7f\xd6\x93"
      "\x2c\x75\x6f\xdd\x58\xbc\x3e\xf7\xc6\x1e\xc7\x7b\xbe\x5e\x97\xa7\xed\x7b"
      "\x9b\xaf\xcd\xbf\x7e\x20\x07\xb4\x6f\xe5\x7c\x79\xa2\x7c\xb2\xd2\x7f\xd9"
      "\x18\x9d\x1d\x65\xdd\x93\x83\xba\x2d\xf9\x6a\xd6\xdf\xb8\xf4\xeb\x1a\xdb"
      "\xea\x4e\x0c\xeb\xee\x7a\xa6\xe6\x5c\x3a\x39\x57\xed\xfd\xd4\xbb\x3b\xf5"
      "\xd4\xaf\x7b\x7a\xc7\x51\x3a\x55\xdd\x33\x23\x75\x9b\xde\xe5\xe4\xf5\x74"
      "\x87\xef\x42\x00\x38\xc0\x8e\xbe\x70\xb4\xd9\xba\xdd\xfa\x5b\xeb\x83\xd6"
      "\x8f\x5a\xd7\x5b\x2f\x1f\xf9\xc6\xf4\x85\xe9\xcf\x37\x73\xf8\x2f\x53\x7f"
      "\x38\xf4\xdb\xc6\x6f\x1a\x5f\x2b\x5e\xc8\x07\xf9\x7e\x8e\x4d\x3a\x52\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\xf8\x24\x58\x7a\xeb\xed\x1b\x73\xdd\xee\xfc\xe2\x01\x2c"
      "\xa4\x31\x81\x41\x9b\x0f\xa8\x9f\xe9\x47\x12\xf3\xf9\x24\x93\x7e\x9a\x36"
      "\x15\xa6\xc7\xcd\xa8\xdf\x25\x19\xd3\xbc\x39\x89\x98\x5b\x49\x0e\x46\xea"
      "\x1e\x45\x61\x7a\xfc\x6c\x69\x65\xe3\x91\x49\x5f\x99\x80\x87\xed\xec\xf2"
      "\xcd\x37\xce\x2e\xbd\xf5\xf6\x97\x16\x6e\xce\xbd\x36\xff\xda\x7c\x72\xe1"
      "\xfc\x4b\xe7\x3b\x5f\x99\xfd\xf2\xd9\x6b\x0b\xdd\xf9\x99\xfe\xdf\x49\x47"
      "\x09\x3c\x0c\x1b\xaf\xfe\x93\x8e\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\xd8\xab\x47\xf1\xbf\x07\x93\x3e\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
      "\x00\x00\x00\x00\x00\x00\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\xff\xdb\xa5\x57\x73"
      "\xb8\x97\x22\xb3\x33\x67\x66\xca\xed\xb5\xd5\x4e\xb7\x5c\x06\xe5\x8d\x3d"
      "\xa7\x92\x34\x92\x14\xdf\x4b\x8a\x8f\x93\x8b\xe9\x2f\x69\x8f\x74\x57\xdc"
      "\x6d\x9c\x17\x6f\x7f\xf4\xcb\xe7\xdf\xff\xb0\xb3\xd1\xd7\xd4\x60\xff\xc6"
      "\xb8\x76\x7b\xd3\xab\x97\x9c\x4c\x72\xa8\x5e\xef\x6e\x7a\x4f\xfd\x5d\x19"
      "\xe9\xaf\xb7\xaf\xf0\x8a\xe1\x11\x96\x09\x3b\x35\x48\x1c\x4c\xda\xff\x02"
      "\x00\x00\xff\xff\xa6\x88\x09\x01",
      1700);
  syz_mount_image(
      /*fs=*/0x200000c0, /*dir=*/0x20000080,
      /*flags=MS_I_VERSION|MS_POSIXACL|MS_NOEXEC|MS_NODIRATIME*/ 0x810808,
      /*opts=*/0x200008c0, /*chdir=*/0, /*size=*/0x6a3, /*img=*/0x200001c0);
  return 0;
}