LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/dos11.c
// Function: bitmapLoad
static int bitmapLoad(
  struct mountedFS *mount,
  uint16_t map
)
{
  struct DOS11data *data = &mount->dos11data;

  if (map >= data->bitmaps) {
    ERROR("Invalid bitmap # (%d), max is %d\n", map, data->bitmaps);
    return 0;
  }

  /*
   * If the map is already loaded, nothing to do.
   */
  if (map != data->bmindex) {
    if (data->bmdirty != 0) {
      if (dos11WriteBlock(mount, data->bmblk[data->bmindex], data->bmbuf) == 0)
        return 0;
      data->bmdirty = 0;
    }

    data->bmindex = map;
    if (dos11ReadBlock(mount, data->bmblk[map], data->bmbuf) == 0)
      return 0;
  }

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x20(%rbp)
movzwl -0x12(%rbp), %eax
movq -0x20(%rbp), %rcx
movzwl 0x4(%rcx), %ecx
cmpl %ecx, %eax
jl 0xb146
movq 0x12f22(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
movzwl -0x12(%rbp), %edx
movq -0x20(%rbp), %rax
movzwl 0x4(%rax), %ecx
leaq 0xea02(%rip), %rsi      # 0x19aee
movb $0x0, %al
callq 0x31c0
leaq 0x140ee(%rip), %rax     # 0x1f1e8
cmpq $0x0, (%rax)
je 0xb13a
leaq 0x140e1(%rip), %rax     # 0x1f1e8
movq (%rax), %rax
movq 0x12eaf(%rip), %rcx     # 0x1dfc0
cmpq (%rcx), %rax
je 0xb13a
leaq 0x140cb(%rip), %rax     # 0x1f1e8
movq (%rax), %rdi
movzwl -0x12(%rbp), %edx
movq -0x20(%rbp), %rax
movzwl 0x4(%rax), %ecx
leaq 0xe9bb(%rip), %rsi      # 0x19aee
movb $0x0, %al
callq 0x31c0
movl $0x0, -0x4(%rbp)
jmp 0xb1f5
movzwl -0x12(%rbp), %eax
movq -0x20(%rbp), %rcx
movzwl 0x106(%rcx), %ecx
cmpl %ecx, %eax
je 0xb1ee
movq -0x20(%rbp), %rax
movzbl 0x10a(%rax), %eax
cmpl $0x0, %eax
je 0xb1ae
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq -0x20(%rbp), %rcx
movzwl 0x106(%rcx), %ecx
movzwl 0x6(%rax,%rcx,2), %esi
movq -0x20(%rbp), %rdx
addq $0x10c, %rdx            # imm = 0x10C
callq 0x75a0
cmpl $0x0, %eax
jne 0xb1a3
movl $0x0, -0x4(%rbp)
jmp 0xb1f5
movq -0x20(%rbp), %rax
movb $0x0, 0x10a(%rax)
movw -0x12(%rbp), %cx
movq -0x20(%rbp), %rax
movw %cx, 0x106(%rax)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movzwl -0x12(%rbp), %ecx
movzwl 0x6(%rax,%rcx,2), %esi
movq -0x20(%rbp), %rdx
addq $0x10c, %rdx            # imm = 0x10C
callq 0x7380
cmpl $0x0, %eax
jne 0xb1ec
movl $0x0, -0x4(%rbp)
jmp 0xb1f5
jmp 0xb1ee
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/dos11.c
// Function: bitmapScan
static int bitmapScan(
  struct mountedFS *mount,
  uint16_t count,
  uint16_t start,
  uint16_t *restart
)
{
  uint16_t value;

  while (count >= 16) {
    if ((bitmapGetWord(mount, start, &value) == 0) ||
        (value != 0)) {
      *restart = start;
      return 0;
    }
    start += 16;
    count -= 16;
  }

  if (count != 0)
    if ((bitmapGetWord(mount, start, &value) == 0) ||
        ((value & lowbits[count - 1]) != 0)) {
      *restart = start;
      return 0;
    }

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movw %si, %dx
movq %rdi, -0x10(%rbp)
movw %dx, -0x12(%rbp)
movw %ax, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movzwl -0x12(%rbp), %eax
cmpl $0x10, %eax
jl 0xb272
movq -0x10(%rbp), %rdi
leaq -0x22(%rbp), %rdx
movzwl -0x14(%rbp), %esi
callq 0xb3d0
cmpl $0x0, %eax
je 0xb246
movzwl -0x22(%rbp), %eax
cmpl $0x0, %eax
je 0xb25a
movw -0x14(%rbp), %cx
movq -0x20(%rbp), %rax
movw %cx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xb2ce
movzwl -0x14(%rbp), %eax
addl $0x10, %eax
movw %ax, -0x14(%rbp)
movzwl -0x12(%rbp), %eax
subl $0x10, %eax
movw %ax, -0x12(%rbp)
jmp 0xb21e
movzwl -0x12(%rbp), %eax
cmpl $0x0, %eax
je 0xb2c7
movq -0x10(%rbp), %rdi
leaq -0x22(%rbp), %rdx
movzwl -0x14(%rbp), %esi
callq 0xb3d0
cmpl $0x0, %eax
je 0xb2b1
movzwl -0x22(%rbp), %eax
movzwl -0x12(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rdx
leaq 0x1322a(%rip), %rcx     # 0x1e4d0
movzwl (%rcx,%rdx,2), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xb2c5
movw -0x14(%rbp), %cx
movq -0x20(%rbp), %rax
movw %cx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xb2ce
jmp 0xb2c7
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/dos11.c
// Function: bitmapSetBit
static int bitmapSetBit(
  struct mountedFS *mount,
  uint16_t block
)
{
  struct DOS11data *data = &mount->dos11data;
  uint16_t map = block / MAP_BLOCKS;
  uint16_t offset = block % MAP_BLOCKS;
  uint16_t wrd = offset / 16;
  uint16_t bit = offset % 16;

  if (bitmapLoad(mount, map) == 0)
    return 0;

  data->bmbuf[MAP_BMSTART + wrd] =
    htole16(le16toh(data->bmbuf[MAP_BMSTART + wrd]) | bits[bit]);
  data->bmdirty = 1;
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x20(%rbp)
movzwl -0x12(%rbp), %eax
movl $0x3c0, %ecx            # imm = 0x3C0
cltd
idivl %ecx
movw %ax, -0x22(%rbp)
movzwl -0x12(%rbp), %eax
movl $0x3c0, %ecx            # imm = 0x3C0
cltd
idivl %ecx
movw %dx, %ax
movw %ax, -0x24(%rbp)
movzwl -0x24(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movw %ax, -0x26(%rbp)
movzwl -0x24(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movw %dx, %ax
movw %ax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x22(%rbp), %esi
callq 0xb0a0
cmpl $0x0, %eax
jne 0xb360
movl $0x0, -0x4(%rbp)
jmp 0xb3c4
movq -0x20(%rbp), %rax
movzwl -0x26(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movzwl 0x10c(%rax,%rcx,2), %edi
callq 0x6c50
movzwl %ax, %eax
movzwl -0x28(%rbp), %ecx
movl %ecx, %edx
leaq 0x13125(%rip), %rcx     # 0x1e4b0
movzwl (%rcx,%rdx,2), %ecx
orl %ecx, %eax
movzwl %ax, %edi
callq 0x6c50
movw %ax, %dx
movq -0x20(%rbp), %rax
movzwl -0x26(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movw %dx, 0x10c(%rax,%rcx,2)
movq -0x20(%rbp), %rax
movb $0x1, 0x10a(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/dos11.c
// Function: bitmapGetWord
static int bitmapGetWord(
  struct mountedFS *mount,
  uint16_t block,
  uint16_t *value
)
{
  struct DOS11data *data = &mount->dos11data;
  uint16_t map = block / MAP_BLOCKS;
  uint16_t offset = block % MAP_BLOCKS;
  uint16_t wrd = offset / 16;

  if (bitmapLoad(mount, map) == 0)
    return 0;

  *value = le16toh(data->bmbuf[MAP_BMSTART + wrd]);
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x28(%rbp)
movzwl -0x12(%rbp), %eax
movl $0x3c0, %ecx            # imm = 0x3C0
cltd
idivl %ecx
movw %ax, -0x2a(%rbp)
movzwl -0x12(%rbp), %eax
movl $0x3c0, %ecx            # imm = 0x3C0
cltd
idivl %ecx
movw %dx, %ax
movw %ax, -0x2c(%rbp)
movzwl -0x2c(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movw %ax, -0x2e(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x2a(%rbp), %esi
callq 0xb0a0
cmpl $0x0, %eax
jne 0xb441
movl $0x0, -0x4(%rbp)
jmp 0xb46d
movq -0x28(%rbp), %rax
movzwl -0x2e(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movzwl 0x10c(%rax,%rcx,2), %edi
callq 0x6c50
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11MatchRegex
int rt11MatchRegex(
  regex_t *preg,
  uint16_t fname1,
  uint16_t fname2,
  uint16_t ftype
)
{
  char temp[16];
  int i = 5;

  /*
   * Build a filename + type string with no embedded spaces.
   */
  r50Asc(fname1, &temp[0]);
  r50Asc(fname2, &temp[3]);

  while ((i >= 0) && (temp[i] == ' '))
    i--;

  temp[++i] = '.';

  r50Asc(ftype, &temp[++i]);

  i += 2;
  while (temp[i] == ' ')
    i--;

  temp[i + 1] = '\0';

  if (regexec(preg, &temp[0], 0, NULL, 0) == 0)
    return 1;

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %cx, %ax
movw %dx, %cx
movw %si, %dx
movq %rdi, -0x10(%rbp)
movw %dx, -0x12(%rbp)
movw %cx, -0x14(%rbp)
movw %ax, -0x16(%rbp)
movl $0x5, -0x34(%rbp)
movw -0x12(%rbp), %ax
leaq -0x30(%rbp), %rsi
movzwl %ax, %edi
callq 0x5bf0
movw -0x14(%rbp), %ax
leaq -0x30(%rbp), %rsi
addq $0x3, %rsi
movzwl %ax, %edi
callq 0x5bf0
xorl %eax, %eax
cmpl $0x0, -0x34(%rbp)
movb %al, -0x35(%rbp)
jl 0xbcb9
movslq -0x34(%rbp), %rax
movsbl -0x30(%rbp,%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0xbcc2
jmp 0xbccd
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xbc9c
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
cltq
movb $0x2e, -0x30(%rbp,%rax)
movw -0x16(%rbp), %ax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x34(%rbp)
movslq %ecx, %rcx
leaq -0x30(%rbp), %rsi
addq %rcx, %rsi
movzwl %ax, %edi
callq 0x5bf0
movl -0x34(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x34(%rbp)
movslq -0x34(%rbp), %rax
movsbl -0x30(%rbp,%rax), %eax
cmpl $0x20, %eax
jne 0xbd1e
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xbd05
movl -0x34(%rbp), %eax
addl $0x1, %eax
cltq
movb $0x0, -0x30(%rbp,%rax)
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
xorl %r8d, %r8d
movq %rcx, %rdx
callq 0x3220
cmpl $0x0, %eax
jne 0xbd50
movl $0x1, -0x4(%rbp)
jmp 0xbd57
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: MapLogToPhys
unsigned int MapLogToPhys(
  unsigned int sectno
)
{
  unsigned int i, track, sector;

  track = sectno / RT11_RX0xNSECT;
  i = (sectno % RT11_RX0xNSECT) << 1;
  if (i >= RT11_RX0xNSECT)
    i++;
  sector = (i + (6 * track)) % RT11_RX0xNSECT;
  return sector + (track * RT11_RX0xNSECT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl $0x1a, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
movl $0x1a, %ecx
xorl %edx, %edx
divl %ecx
shll %edx
movl %edx, -0x8(%rbp)
cmpl $0x1a, -0x8(%rbp)
jb 0xbd96
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
imull $0x6, -0xc(%rbp), %ecx
addl %ecx, %eax
movl $0x1a, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, -0x10(%rbp)
movl -0x10(%rbp), %eax
imull $0x1a, -0xc(%rbp), %ecx
addl %ecx, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11ReadDirSegment
int rt11ReadDirSegment(
  struct mountedFS *mount,
  uint8_t unit,
  uint16_t segment
)
{
  struct RT11data *data = &mount->rt11data;
  unsigned int block = data->first[unit] + ((segment - 1) * 2);

  if (rt11ReadBlock(mount, unit, block, &data->buf[0]) != 0)
    if (rt11ReadBlock(mount, unit, block + 1, &data->buf[256]) != 0)
      return 1;

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movb %sil, %cl
movq %rdi, -0x10(%rbp)
movb %cl, -0x11(%rbp)
movw %ax, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl -0x11(%rbp), %ecx
movzwl 0x22a(%rax,%rcx,2), %eax
movzwl -0x14(%rbp), %ecx
subl $0x1, %ecx
shll %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movb -0x11(%rbp), %al
movl -0x24(%rbp), %edx
movq -0x20(%rbp), %rcx
addq $0x42a, %rcx            # imm = 0x42A
movzbl %al, %esi
callq 0xbdc0
cmpl $0x0, %eax
je 0xc47c
movq -0x10(%rbp), %rdi
movb -0x11(%rbp), %al
movl -0x24(%rbp), %edx
addl $0x1, %edx
movq -0x20(%rbp), %rcx
addq $0x42a, %rcx            # imm = 0x42A
addq $0x200, %rcx            # imm = 0x200
movzbl %al, %esi
callq 0xbdc0
cmpl $0x0, %eax
je 0xc47a
movl $0x1, -0x4(%rbp)
jmp 0xc483
jmp 0xc47c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11WriteDirSegment
int rt11WriteDirSegment(
  struct mountedFS *mount,
  uint8_t unit,
  uint16_t segment
)
{
  struct RT11data *data = &mount->rt11data;
  unsigned int block = data->first[unit] + ((segment - 1) * 2);

  if (rt11WriteBlock(mount, unit, block, &data->buf[0]) != 0)
    if (rt11WriteBlock(mount, unit, block + 1, &data->buf[256]) != 0)
      return 1;

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movb %sil, %cl
movq %rdi, -0x10(%rbp)
movb %cl, -0x11(%rbp)
movw %ax, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl -0x11(%rbp), %ecx
movzwl 0x22a(%rax,%rcx,2), %eax
movzwl -0x14(%rbp), %ecx
subl $0x1, %ecx
shll %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movb -0x11(%rbp), %al
movl -0x24(%rbp), %edx
movq -0x20(%rbp), %rcx
addq $0x42a, %rcx            # imm = 0x42A
movzbl %al, %esi
callq 0xc0d0
cmpl $0x0, %eax
je 0xc52c
movq -0x10(%rbp), %rdi
movb -0x11(%rbp), %al
movl -0x24(%rbp), %edx
addl $0x1, %edx
movq -0x20(%rbp), %rcx
addq $0x42a, %rcx            # imm = 0x42A
addq $0x200, %rcx            # imm = 0x200
movzbl %al, %esi
callq 0xc0d0
cmpl $0x0, %eax
je 0xc52a
movl $0x1, -0x4(%rbp)
jmp 0xc533
jmp 0xc52c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11MakeDirectoryEntry
int rt11MakeDirectoryEntry(
  struct mountedFS *mount,
  uint16_t entrysz,
  uint16_t offset
)
{
  struct RT11data *data = &mount->rt11data;
  uint16_t off = offset;

  /*
   * Scan forward looking for the end-of-segment marker.
   */
  while (!RT11EOS(le16toh(data->buf[off + RT11_DI_STATUS])) &&
         ((RT11_DS_SIZE - off) >= entrysz))
    off += entrysz;
  
  if ((RT11_DS_SIZE - off) > entrysz) {
    /*
     * There is enough space available for a new directory entry. Slide
     * the existing entries up to make a new one available at the
     * requested position.
     */
    data->buf[off + entrysz + RT11_DI_STATUS] = htole16(RT11_E_EOS);

    while (off != offset) {
      uint16_t i, prev = off - entrysz;

      for (i = RT11_DI_STATUS; i < entrysz; i++)
        data->buf[off + i] = data->buf[prev + i];

      off -= entrysz;
    }
    return 1;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movw %si, %cx
movq %rdi, -0x10(%rbp)
movw %cx, -0x12(%rbp)
movw %ax, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x20(%rbp)
movw -0x14(%rbp), %ax
movw %ax, -0x22(%rbp)
movq -0x20(%rbp), %rax
movzwl -0x22(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movzwl 0x42a(%rax,%rcx,2), %edi
callq 0xc6b0
movzwl %ax, %ecx
andl $0x800, %ecx            # imm = 0x800
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x27(%rbp)
jne 0xc5b3
movzwl -0x22(%rbp), %ecx
movl $0x200, %eax            # imm = 0x200
subl %ecx, %eax
movzwl -0x12(%rbp), %ecx
cmpl %ecx, %eax
setge %al
movb %al, -0x27(%rbp)
movb -0x27(%rbp), %al
testb $0x1, %al
jne 0xc5bc
jmp 0xc5cc
movzwl -0x12(%rbp), %ecx
movzwl -0x22(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x22(%rbp)
jmp 0xc56e
movzwl -0x22(%rbp), %ecx
movl $0x200, %eax            # imm = 0x200
subl %ecx, %eax
movzwl -0x12(%rbp), %ecx
cmpl %ecx, %eax
jle 0xc691
movl $0x800, %edi            # imm = 0x800
callq 0xc6b0
movw %ax, %dx
movq -0x20(%rbp), %rax
movzwl -0x22(%rbp), %ecx
movzwl -0x12(%rbp), %esi
addl %esi, %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movw %dx, 0x42a(%rax,%rcx,2)
movzwl -0x22(%rbp), %eax
movzwl -0x14(%rbp), %ecx
cmpl %ecx, %eax
je 0xc688
movzwl -0x22(%rbp), %eax
movzwl -0x12(%rbp), %ecx
subl %ecx, %eax
movw %ax, -0x26(%rbp)
movw $0x0, -0x24(%rbp)
movzwl -0x24(%rbp), %eax
movzwl -0x12(%rbp), %ecx
cmpl %ecx, %eax
jge 0xc678
movq -0x20(%rbp), %rax
movzwl -0x26(%rbp), %ecx
movzwl -0x24(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movw 0x42a(%rax,%rcx,2), %dx
movq -0x20(%rbp), %rax
movzwl -0x22(%rbp), %ecx
movzwl -0x24(%rbp), %esi
addl %esi, %ecx
movslq %ecx, %rcx
movw %dx, 0x42a(%rax,%rcx,2)
movw -0x24(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x24(%rbp)
jmp 0xc62c
movzwl -0x12(%rbp), %ecx
movzwl -0x22(%rbp), %eax
subl %ecx, %eax
movw %ax, -0x22(%rbp)
jmp 0xc60c
movl $0x1, -0x4(%rbp)
jmp 0xc698
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11Date
char *rt11Date(
  uint16_t value,
  char *buf
)
{
  sprintf(buf, "%02d-%s-%4d",
          (value & RT11_DW_DAY) >> 5,
          month[((value & RT11_DW_MONTH) >> 10) - 1],
          1972 + (value & RT11_DW_YEAR) + ((value & RT11_DW_AGE) >> 14) * 32);

  return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x2(%rbp), %edx
andl $0x3e0, %edx            # imm = 0x3E0
sarl $0x5, %edx
movzwl -0x2(%rbp), %eax
andl $0x3c00, %eax           # imm = 0x3C00
sarl $0xa, %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x11f33(%rip), %rax     # 0x1e640
movq (%rax,%rcx,8), %rcx
movzwl -0x2(%rbp), %r8d
andl $0x1f, %r8d
addl $0x7b4, %r8d            # imm = 0x7B4
movzwl -0x2(%rbp), %eax
andl $0xc000, %eax           # imm = 0xC000
sarl $0xe, %eax
shll $0x5, %eax
addl %eax, %r8d
leaq 0xd97b(%rip), %rsi      # 0x1a0b5
movb $0x0, %al
callq 0x3290
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11DisplayDir
void rt11DisplayDir(
  uint16_t *dir,
  int full
)
{
  char temp[64], creation[16];

  r50Asc(le16toh(dir[RT11_DI_FNAME1]), &temp[0]);
  r50Asc(le16toh(dir[RT11_DI_FNAME2]), &temp[3]);
  temp[6] = '.';
  r50Asc(le16toh(dir[RT11_DI_FTYPE]), &temp[7]);

  if (full)
    sprintf(&temp[10], "  %5u  %s",
            le16toh(dir[RT11_DI_LENGTH]),
            rt11Date(le16toh(dir[RT11_DI_CREATE]), creation));
  else temp[10] ='\0';
  puts(temp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0xc6b0
leaq -0x50(%rbp), %rsi
movzwl %ax, %edi
callq 0x5bf0
movq -0x8(%rbp), %rax
movzwl 0x4(%rax), %edi
callq 0xc6b0
leaq -0x50(%rbp), %rsi
addq $0x3, %rsi
movzwl %ax, %edi
callq 0x5bf0
movb $0x2e, -0x4a(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x6(%rax), %edi
callq 0xc6b0
leaq -0x50(%rbp), %rsi
addq $0x7, %rsi
movzwl %ax, %edi
callq 0x5bf0
cmpl $0x0, -0xc(%rbp)
je 0xc80e
leaq -0x50(%rbp), %rax
addq $0xa, %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x8(%rax), %edi
callq 0xc6b0
movzwl %ax, %eax
movl %eax, -0x64(%rbp)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %edi
callq 0xc6b0
leaq -0x60(%rbp), %rsi
movzwl %ax, %edi
callq 0xc6d0
movq -0x70(%rbp), %rdi
movl -0x64(%rbp), %edx
movq %rax, %rcx
leaq 0xd8bc(%rip), %rsi      # 0x1a0c1
movb $0x0, %al
callq 0x3290
jmp 0xc812
movb $0x0, -0x46(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x30e0
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11ReadBytes
int rt11ReadBytes(
  struct rt11OpenFile *file,
  char *buf,
  int len
)
{
  struct mountedFS *mount = file->mount;
  int count = 0;

  if (file->current == 0) {
    file->current = le16toh(file->start);

    if (rt11ReadBlock(mount, file->unit, file->current, file->buffer) == 0)
      return 0;

    file->count = 0;
    file->last = le16toh(file->start) + le16toh(file->length) - 1;
 }

  while (len) {
    if (file->count == RT11_BLOCKSIZE) {
      if (file->current == file->last)
        break;

      file->current++;

      if (rt11ReadBlock(mount, file->unit, file->current, file->buffer) == 0)
        return 0;

      file->count = 0;
    }
    *buf++ = file->buffer[file->count++];
    len--;
    count++;
  }
  return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x30(%rax), %eax
cmpl $0x0, %eax
jne 0xdc16
movq -0x10(%rbp), %rax
movzwl 0x36(%rax), %edi
callq 0xc6b0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x30(%rax)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x20(%rax), %al
movq -0x10(%rbp), %rcx
movzwl 0x30(%rcx), %edx
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movzbl %al, %esi
callq 0xbdc0
cmpl $0x0, %eax
jne 0xdbd3
movl $0x0, -0x4(%rbp)
jmp 0xdce4
movq -0x10(%rbp), %rax
movw $0x0, 0x34(%rax)
movq -0x10(%rbp), %rax
movzwl 0x36(%rax), %edi
callq 0xc6b0
movzwl %ax, %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x8(%rax), %edi
callq 0xc6b0
movw %ax, %cx
movl -0x30(%rbp), %eax
movzwl %cx, %ecx
addl %ecx, %eax
subl $0x1, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x32(%rax)
jmp 0xdc18
cmpl $0x0, -0x1c(%rbp)
je 0xdcde
movq -0x10(%rbp), %rax
movzwl 0x34(%rax), %eax
cmpl $0x200, %eax            # imm = 0x200
jne 0xdc95
movq -0x10(%rbp), %rax
movzwl 0x30(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0x32(%rcx), %ecx
cmpl %ecx, %eax
jne 0xdc4a
jmp 0xdcde
movq -0x10(%rbp), %rax
movw 0x30(%rax), %cx
addw $0x1, %cx
movw %cx, 0x30(%rax)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x20(%rax), %al
movq -0x10(%rbp), %rcx
movzwl 0x30(%rcx), %edx
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movzbl %al, %esi
callq 0xbdc0
cmpl $0x0, %eax
jne 0xdc8b
movl $0x0, -0x4(%rbp)
jmp 0xdce4
movq -0x10(%rbp), %rax
movw $0x0, 0x34(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rdx
movw 0x34(%rdx), %cx
movw %cx, %si
addw $0x1, %si
movw %si, 0x34(%rdx)
movzwl %cx, %ecx
movb (%rax,%rcx), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xdc18
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11WriteBytes
int rt11WriteBytes(
  struct rt11OpenFile *file,
  char *buf,
  int len
)
{
  int count = 0;

  if (file->current == 0) {
    memset(file->buffer, 0, RT11_BLOCKSIZE);

    file->current = le16toh(file->start);
    file->count = 0;
    file->last = le16toh(file->start) + le16toh(file->length) - 1;
  }

  while (len) {
    if (file->count == RT11_BLOCKSIZE) {
      if (file->current == file->last)
        break;

      if (rt11WriteBlock(file->mount, file->unit, file->current, file->buffer) == 0)
        return 0;

      memset(file->buffer, 0, RT11_BLOCKSIZE);

      file->current++;
      file->count = 0;
    }
    file->buffer[file->count++] = *buf++;
    len--;
    count++;
  }
  return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x30(%rax), %eax
cmpl $0x0, %eax
jne 0xdd86
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x3170
movq -0x10(%rbp), %rax
movzwl 0x36(%rax), %edi
callq 0xc6b0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x30(%rax)
movq -0x10(%rbp), %rax
movw $0x0, 0x34(%rax)
movq -0x10(%rbp), %rax
movzwl 0x36(%rax), %edi
callq 0xc6b0
movzwl %ax, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x8(%rax), %edi
callq 0xc6b0
movw %ax, %cx
movl -0x24(%rbp), %eax
movzwl %cx, %ecx
addl %ecx, %eax
subl $0x1, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x32(%rax)
jmp 0xdd88
cmpl $0x0, -0x1c(%rbp)
je 0xde66
movq -0x10(%rbp), %rax
movzwl 0x34(%rax), %eax
cmpl $0x200, %eax            # imm = 0x200
jne 0xde1d
movq -0x10(%rbp), %rax
movzwl 0x30(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0x32(%rcx), %ecx
cmpl %ecx, %eax
jne 0xddba
jmp 0xde66
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movb 0x20(%rax), %al
movq -0x10(%rbp), %rcx
movzwl 0x30(%rcx), %edx
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movzbl %al, %esi
callq 0xc0d0
cmpl $0x0, %eax
jne 0xddef
movl $0x0, -0x4(%rbp)
jmp 0xde6c
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x3170
movq -0x10(%rbp), %rax
movw 0x30(%rax), %cx
addw $0x1, %cx
movw %cx, 0x30(%rax)
movq -0x10(%rbp), %rax
movw $0x0, 0x34(%rax)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %dl
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rsi
movw 0x34(%rsi), %cx
movw %cx, %di
addw $0x1, %di
movw %di, 0x34(%rsi)
movzwl %cx, %ecx
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xdd88
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11Size
static size_t rt11Size(void)
{
  size_t size = (RT11_MAXPARTSZ - 1) * RT11_BLOCKSIZE;

  if (SWISSET('t')) {
    int i = 0;
    char *type = SWGETVAL('t');

    while (rt11DiskSize[i].name != NULL) {
      if (strcmp(rt11DiskSize[i].name, type) == 0) {
        size = rt11DiskSize[i].size;
        break;
      }
      i++;
    }
    if (size == ((RT11_MAXPARTSZ - 1) * RT11_BLOCKSIZE))
      fprintf(stderr,
              "newfs: Invalid device type \"%s\", using default\n", type);
  }
  return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq $0x1fffe00, -0x8(%rbp)  # imm = 0x1FFFE00
leaq 0x108d1(%rip), %rax     # 0x1f1f8
movl (%rax), %eax
andl $0x80000, %eax          # imm = 0x80000
cmpl $0x0, %eax
je 0xe9da
movl $0x0, -0xc(%rbp)
leaq 0x108bb(%rip), %rax     # 0x1f200
movq 0x98(%rax), %rax
movq %rax, -0x18(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x10325(%rip), %rax     # 0x1ec80
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0xe9b2
movslq -0xc(%rbp), %rcx
leaq 0x1030d(%rip), %rax     # 0x1ec80
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x31b0
cmpl $0x0, %eax
jne 0xe9a7
movslq -0xc(%rbp), %rcx
leaq 0x102ea(%rip), %rax     # 0x1ec80
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xe9b2
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xe950
cmpq $0x1fffe00, -0x8(%rbp)  # imm = 0x1FFFE00
jne 0xe9d8
movq 0xf635(%rip), %rax      # 0x1dff8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0xb952(%rip), %rsi      # 0x1a323
movb $0x0, %al
callq 0x31c0
jmp 0xe9da
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11Info
static void rt11Info(
  struct mountedFS *mount,
  uint8_t unit,
  uint8_t present
)
{
  struct RT11data *data = &mount->rt11data;

  if (present) {
    if (RT11_PARTITIONVALID(data, unit))
      info(mount, unit);
  } else {
    uint16_t i, count = data->filesystems;

    /*
     * Display information about all valid partitions
     */
    for (i = 0; (i < 256) && (count != 0); i++)
      if (RT11_PARTITIONVALID(data, i)) {
        info(mount, i);
        count--;
      }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x18(%rbp)
cmpb $0x0, -0xa(%rbp)
je 0xee61
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movzbl -0x9(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
movzwl 0xa(%rax,%rcx,2), %eax
movl %eax, -0x20(%rbp)
movzbl -0x9(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl -0x20(%rbp), %eax
movl %edx, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xee5c
movq -0x8(%rbp), %rdi
movzbl -0x9(%rbp), %esi
callq 0xfa90
jmp 0xef11
movq -0x18(%rbp), %rax
movw 0x8(%rax), %ax
movw %ax, -0x1c(%rbp)
movw $0x0, -0x1a(%rbp)
movzwl -0x1a(%rbp), %ecx
xorl %eax, %eax
cmpl $0x100, %ecx            # imm = 0x100
movb %al, -0x29(%rbp)
jge 0xee91
movzwl -0x1c(%rbp), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0xee9a
jmp 0xef0f
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movzwl -0x1a(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
movzwl 0xa(%rax,%rcx,2), %eax
movl %eax, -0x30(%rbp)
movzwl -0x1a(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl -0x30(%rbp), %eax
movl %edx, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xeefc
movq -0x8(%rbp), %rdi
movw -0x1a(%rbp), %ax
movzbl %al, %esi
callq 0xfa90
movw -0x1c(%rbp), %ax
addw $-0x1, %ax
movw %ax, -0x1c(%rbp)
jmp 0xeefe
movw -0x1a(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x1a(%rbp)
jmp 0xee73
jmp 0xef11
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11OpenFileR
static void *rt11OpenFileR(
  struct mountedFS *mount,
  uint8_t unit,
  char *fname
)
{
  struct rt11OpenFile *file;
  struct rt11FileSpec spec;

  if (rt11ParseFilespec(fname, &spec, RT11_M_NONE) == 0) {
    fprintf(stderr, "Failed to parse filename \"%s\"\n", fname);
    return NULL;
  }

  if ((file = malloc(sizeof(struct rt11OpenFile))) != NULL) {
    memset(file, 0, sizeof(struct rt11OpenFile));

    if (rt11LookupFile(mount, unit, &spec, file) != 0) {
      /*
       * Allocate local buffer space for the file.
       */
      if ((file->buffer = malloc(mount->blocksz)) == NULL) {
        free(file);
        return NULL;
      }
      file->mode = M_RD;
    } else {
      free(file);
      return NULL;
    }
  }
  return file;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x3a(%rbp), %rsi
xorl %edx, %edx
callq 0xb930
cmpl $0x0, %eax
jne 0xf293
movq 0xed87(%rip), %rax      # 0x1dff8
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0xac7d(%rip), %rsi      # 0x19efc
movb $0x0, %al
callq 0x31c0
movq $0x0, -0x8(%rbp)
jmp 0xf32b
movl $0x38, %edi
callq 0x3200
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xf323
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x3170
movq -0x10(%rbp), %rdi
movb -0x11(%rbp), %al
movq -0x28(%rbp), %rcx
leaq -0x3a(%rbp), %rdx
movzbl %al, %esi
callq 0xd550
cmpl $0x0, %eax
je 0xf30e
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x3200
movq -0x28(%rbp), %rcx
movq %rax, 0x28(%rcx)
cmpq $0x0, %rax
jne 0xf301
movq -0x28(%rbp), %rdi
callq 0x3040
movq $0x0, -0x8(%rbp)
jmp 0xf32b
movq -0x28(%rbp), %rax
movl $0x0, 0x10(%rax)
jmp 0xf321
movq -0x28(%rbp), %rdi
callq 0x3040
movq $0x0, -0x8(%rbp)
jmp 0xf32b
jmp 0xf323
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11CloseFile
static void rt11CloseFile(
  void *filep
)
{
  struct rt11OpenFile *file = filep;
  
  if (file->mode == M_WR) {
    if (SWISSET('a') &&
        !SWISSET('p') &&
        (file->count != RT11_BLOCKSIZE)) {
      char ch = '\032';

      rt11WriteBytes(file, &ch, 1);
    }

    if (file->current == 0)
      file->current = le16toh(file->start);

    /*
     * Flush the current buffer
     */
    rt11WriteBlock(file->mount, file->unit, file->current, file->buffer);
    rt11UpdateFile(file->mount, file->unit, file);
  }

  if (file != NULL) {
    if (file->buffer != NULL)
      free(file->buffer);
    free(file);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0xf442
leaq 0xfe5f(%rip), %rax      # 0x1f1f8
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xf3db
leaq 0xfe4e(%rip), %rax      # 0x1f1f8
movl (%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
jne 0xf3db
movq -0x10(%rbp), %rax
movzwl 0x34(%rax), %eax
cmpl $0x200, %eax            # imm = 0x200
je 0xf3db
movb $0x1a, -0x11(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x11(%rbp), %rsi
movl $0x1, %edx
callq 0xdcf0
movq -0x10(%rbp), %rax
movzwl 0x30(%rax), %eax
cmpl $0x0, %eax
jne 0xf400
movq -0x10(%rbp), %rax
movzwl 0x36(%rax), %edi
callq 0xc6b0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movb 0x20(%rax), %al
movq -0x10(%rbp), %rcx
movzwl 0x30(%rcx), %edx
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movzbl %al, %esi
callq 0xc0d0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movb 0x20(%rax), %al
movq -0x10(%rbp), %rdx
movzbl %al, %esi
callq 0xd8a0
cmpq $0x0, -0x10(%rbp)
je 0xf46a
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xf461
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x3040
movq -0x10(%rbp), %rdi
callq 0x3040
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11ReadFile
static size_t rt11ReadFile(
  void *filep,
  void *buf,
  size_t buflen
)
{
  struct rt11OpenFile *file = filep;
  char *bufr = buf;

  if (SWISSET('a')) {
    char ch;
    size_t count = 0;

    /*
     * Read a full or partial line from the open file.
     */
    while ((buflen != 0) && (rt11ReadBytes(file, &ch, 1) == 1)) {
      if (ch == '\032') {
        /*
         * ^Z indicating EOF
         */
        rt11UngetByte(file);
        break;
      }
      bufr[count++] = ch;
      buflen--;
      if (ch == '\n')
        break;
    }
    return count;
  }

  return rt11ReadBytes(file, bufr, buflen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0xfd5d(%rip), %rax      # 0x1f1f8
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xf531
movq $0x0, -0x40(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x41(%rbp)
je 0xf4d8
movq -0x28(%rbp), %rdi
leaq -0x31(%rbp), %rsi
movl $0x1, %edx
callq 0xdb50
cmpl $0x1, %eax
sete %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xf4e1
jmp 0xf527
movsbl -0x31(%rbp), %eax
cmpl $0x1a, %eax
jne 0xf4f5
movq -0x28(%rbp), %rdi
callq 0x10040
jmp 0xf527
movb -0x31(%rbp), %dl
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x40(%rbp)
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movsbl -0x31(%rbp), %eax
cmpl $0xa, %eax
jne 0xf525
jmp 0xf527
jmp 0xf4b1
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xf54a
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rax
movl %eax, %edx
callq 0xdb50
cltq
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: rt11DeleteFile
static void rt11DeleteFile(
  void *filep,
  char *UNUSED(fname)
)
{
  struct rt11OpenFile *file = filep;
  struct mountedFS *mount = file->mount;
  struct RT11data *data = &mount->rt11data;

  if (rt11ReadDirSegment(mount, file->unit, file->segment) == 0)
    return;

  data->buf[file->offset + RT11_DI_STATUS] = le16toh(RT11_E_MPTY);

  rt11MergeEmptyRegions(mount, file->offset);

  if (rt11WriteDirSegment(mount, file->unit, file->segment) == 0)
    return;

  rt11CloseFile(file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movb 0x20(%rax), %cl
movq -0x18(%rbp), %rax
movzbl 0xc(%rax), %eax
movzbl %cl, %esi
movzwl %ax, %edx
callq 0xc3e0
cmpl $0x0, %eax
jne 0xf5f5
jmp 0xf65b
movl $0x200, %edi            # imm = 0x200
callq 0xc6b0
movw %ax, %dx
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movw %dx, 0x42a(%rax,%rcx,2)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movzwl 0xe(%rax), %esi
callq 0x10070
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movb 0x20(%rax), %cl
movq -0x18(%rbp), %rax
movzbl 0xc(%rax), %eax
movzbl %cl, %esi
movzwl %ax, %edx
callq 0xc490
cmpl $0x0, %eax
jne 0xf652
jmp 0xf65b
movq -0x18(%rbp), %rdi
callq 0xf370
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/rt11.c
// Function: partitionType
static int partitionType(
  struct mountedFS *mount,
  uint8_t unit
)
{
  struct RT11data *data = &mount->rt11data;

  if (strncmp((char *)&data->buf[RT11_HB_SYSID], RT11_SYSID, strlen(RT11_SYSID)) == 0) {
    uint16_t type = le16toh(data->buf[RT11_HB_SYSVER]);

    if (unit == 0) {
      if ((type == RT11_SYSVER_V3A) || (type == RT11_SYSVER_V04))
        return RT11_SINGLE;
    }

    if (type == RT11_SYSVER_V05)
      return RT11_MULTI;
  }

  if (strncmp((char *)&data->buf[RT11_HB_SYSID], RT11_VMSSYSID, strlen(RT11_VMSSYSID)) == 0)
    return RT11_SINGLE;

  return RT11_NOPART;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x42a, %rdi            # imm = 0x42A
addq $0x1f0, %rdi            # imm = 0x1F0
leaq 0xa92f(%rip), %rsi      # 0x1a316
movl $0xc, %edx
callq 0x3090
cmpl $0x0, %eax
jne 0xfa4a
movq -0x20(%rbp), %rax
movzwl 0x600(%rax), %edi
callq 0xc6b0
movw %ax, -0x22(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
jne 0xfa34
movzwl -0x22(%rbp), %eax
cmpl $0x8ea9, %eax           # imm = 0x8EA9
je 0xfa29
movzwl -0x22(%rbp), %eax
cmpl $0x8e52, %eax           # imm = 0x8E52
jne 0xfa32
movl $0x1, -0x4(%rbp)
jmp 0xfa82
jmp 0xfa34
movzwl -0x22(%rbp), %eax
cmpl $0x8e53, %eax           # imm = 0x8E53
jne 0xfa48
movl $0x2, -0x4(%rbp)
jmp 0xfa82
jmp 0xfa4a
movq -0x20(%rbp), %rdi
addq $0x42a, %rdi            # imm = 0x42A
addq $0x1f0, %rdi            # imm = 0x1F0
leaq 0xa7e1(%rip), %rsi      # 0x1a244
movl $0xc, %edx
callq 0x3090
cmpl $0x0, %eax
jne 0xfa7b
movl $0x1, -0x4(%rbp)
jmp 0xfa82
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/dosmt.c
// Function: dosmtWriteBytes
static int dosmtWriteBytes(
  struct dosmtOpenFile *file,
  char *buf,
  int len
)
{
  struct mountedFS *mount = file->mount;
  int count = 0;

  if (file->error != 0)
    return 0;

  while (len) {
    file->buf[file->nextb++] = *buf++;
    len--;
    count++;

    if (file->nextb == DOSMTRCLNT) {
      if (tapeWriteRecord(mount->container, file->buf, DOSMTRCLNT) == 0) {
        file->error = 1;
        return count;
      }
      memset(file->buf, 0, DOSMTRCLNT);
      file->nextb = 0;
    }
  }
  return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x213(%rax), %eax
cmpl $0x0, %eax
je 0x10c22
movl $0x0, -0x4(%rbp)
jmp 0x10ce5
jmp 0x10c24
cmpl $0x0, -0x1c(%rbp)
je 0x10cdf
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %dl
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rsi
movw 0x210(%rsi), %cx
movw %cx, %di
addw $0x1, %di
movw %di, 0x210(%rsi)
movzwl %cx, %ecx
movb %dl, 0x10(%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x210(%rax), %eax
cmpl $0x200, %eax            # imm = 0x200
jne 0x10cda
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movl $0x200, %edx            # imm = 0x200
callq 0x65e0
cmpl $0x0, %eax
jne 0x10cb9
movq -0x10(%rbp), %rax
movb $0x1, 0x213(%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x10ce5
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x3170
movq -0x10(%rbp), %rax
movw $0x0, 0x210(%rax)
jmp 0x10c24
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/dosmt.c
// Function: dosmtOpenFileR
static void *dosmtOpenFileR(
  struct mountedFS *mount,
  uint8_t UNUSED(unit),
  char *fname
)
{
  struct dosmtOpenFile *file;
  struct dosmtFileSpec spec;

  if (dosmtParseFilespec(mount, fname, &spec, DOSMT_M_NONAME) == 0) {
    fprintf(stderr, "Failed to parse filename \"%s\"\n", fname);
    return NULL;
  }

  if ((file = malloc(sizeof(struct dosmtOpenFile))) != NULL) {
    if (dosmtLookupFile(mount, &spec, file) != 0) {
      file->mode = M_RD;
      file->nextb = DOSMTRCLNT;
      file->tm = 0;
      file->error = 0;
    } else {
      free(file);
      return NULL;
    }
  }
  return file;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x34(%rbp), %rdx
movl $0x2, %ecx
callq 0x10380
cmpl $0x0, %eax
jne 0x11877
movq 0xc7a0(%rip), %rax      # 0x1dff8
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0x8696(%rip), %rsi      # 0x19efc
movb $0x0, %al
callq 0x31c0
movq $0x0, -0x8(%rbp)
jmp 0x118ed
movl $0x218, %edi            # imm = 0x218
callq 0x3200
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x118e5
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq -0x34(%rbp), %rsi
callq 0x108f0
cmpl $0x0, %eax
je 0x118d0
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movq -0x28(%rbp), %rax
movw $0x200, 0x210(%rax)     # imm = 0x200
movq -0x28(%rbp), %rax
movb $0x0, 0x212(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x213(%rax)
jmp 0x118e3
movq -0x28(%rbp), %rdi
callq 0x3040
movq $0x0, -0x8(%rbp)
jmp 0x118ed
jmp 0x118e5
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/dosmt.c
// Function: dosmtFileSize
static off_t dosmtFileSize(
  void *filep
)
{
  struct dosmtOpenFile *file = filep;
  struct mountedFS *mount = file->mount;
  off_t pos = tapeGetPosition(mount->container);
  off_t size = 0;
  uint32_t length;

  /*
   * Compute the length of this file. The estimate may larger than the
   * actual size of the file size don't know the actual EOF position
   * within the last block of the file.
   */
  do {
    switch (length = tapeReadRecordLength(mount->container)) {
      case ST_FAIL:
        size = 0;
        length = ST_EOM;
        /* FALLTHROUGH */

      case ST_EOM:
      case ST_TM:
        break;

      default:
        size += DOSMTRCLNT;
        break;
    }
  } while((length != ST_EOM) && (length != ST_TM));

  tapeSetPosition(mount->container, pos);
  return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x6210
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x6290
movl %eax, -0x2c(%rbp)
movl %eax, %ecx
movl %ecx, -0x30(%rbp)
subl $0xfefefefe, %eax       # imm = 0xFEFEFEFE
je 0x11b23
jmp 0x11b17
movl -0x30(%rbp), %eax
incl %eax
subl $0x2, %eax
jb 0x11b32
jmp 0x11b34
movq $0x0, -0x28(%rbp)
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
jmp 0x11b42
movq -0x28(%rbp), %rax
addq $0x200, %rax            # imm = 0x200
movq %rax, -0x28(%rbp)
jmp 0x11b44
xorl %eax, %eax
cmpl $-0x1, -0x2c(%rbp)
movb %al, -0x31(%rbp)
je 0x11b59
cmpl $0x0, -0x2c(%rbp)
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x11af9
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x6230
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/dosmt.c
// Function: dosmtReadBytes
static int dosmtReadBytes(
  struct dosmtOpenFile *file,
  char *buf,
  int len
)
{
  struct mountedFS *mount = file->mount;
  int count = 0;
  uint32_t status;
  off_t pos;

  while (len) {
    if (file->nextb == DOSMTRCLNT) {
      if (file->tm != 0)
        return count;

      pos = tapeGetPosition(mount->container);

      switch (status = tapeReadRecord(mount->container, file->buf, DOSMTRCLNT)) {
        case ST_FAIL:
          return 0;

        case ST_TM:
        case ST_EOM:
          file->tm = 1;
          return count;

        default:
          if ((status & ST_ERROR) || (status != DOSMTRCLNT)) {
            tapeSetPosition(mount->container, pos);
            return count;
          }
          file->nextb = 0;
          break;
      }
    }
    *buf++ = file->buf[file->nextb++];
    len--;
    count++;
  }
  return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x12035
movq -0x10(%rbp), %rax
movzwl 0x210(%rax), %eax
cmpl $0x200, %eax            # imm = 0x200
jne 0x11fe9
movq -0x10(%rbp), %rax
movzbl 0x212(%rax), %eax
cmpl $0x0, %eax
je 0x11f41
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1203b
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x6210
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movl $0x200, %edx            # imm = 0x200
callq 0x64d0
movl %eax, -0x30(%rbp)
movl %eax, %ecx
movl %ecx, -0x3c(%rbp)
subl $0xfefefefe, %eax       # imm = 0xFEFEFEFE
je 0x11f89
jmp 0x11f7d
movl -0x3c(%rbp), %eax
incl %eax
subl $0x2, %eax
jb 0x11f95
jmp 0x11fab
movl $0x0, -0x4(%rbp)
jmp 0x1203b
movq -0x10(%rbp), %rax
movb $0x1, 0x212(%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1203b
movl -0x30(%rbp), %eax
andl $0x80000000, %eax       # imm = 0x80000000
cmpl $0x0, %eax
jne 0x11fc1
cmpl $0x200, -0x30(%rbp)     # imm = 0x200
je 0x11fda
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x6230
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1203b
movq -0x10(%rbp), %rax
movw $0x0, 0x210(%rax)
jmp 0x11fe9
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rdx
movw 0x210(%rdx), %cx
movw %cx, %si
addw $0x1, %si
movw %si, 0x210(%rdx)
movzwl %cx, %ecx
movb 0x10(%rax,%rcx), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x11f06
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/local.c
// Function: localDir
static void localDir(
  struct mountedFS *UNUSED(mount),
  uint8_t UNUSED(unit),
  char *fname
)
{
  char cmd[64];

  sprintf(cmd, "/bin/ls %s%s\n",
          SWISSET('f') ? "-l " : "", fname);
  system(cmd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x60(%rbp), %rdi
leaq 0xd147(%rip), %rax      # 0x1f1f8
movl (%rax), %ecx
andl $0x20, %ecx
leaq 0x88e3(%rip), %rdx      # 0x1a9a0
leaq 0x86c3(%rip), %rax      # 0x1a787
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movq -0x18(%rbp), %rcx
leaq 0x86a3(%rip), %rsi      # 0x1a779
movb $0x0, %al
callq 0x3290
leaq -0x60(%rbp), %rdi
callq 0x3140
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)