LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: read_token
void read_token(FILE *file, char *token_buffer, int echo, int max) {
  int ch, count;
  ch = getc(file);
  if (echo != 0)
    putchar(ch);
  count = 0;
  while (not_eol(ch))
  {
    if ((ch == 8 || ch == 127) && count > 0) {
      count--;
      if (echo != 0) {
        putchar(8);
        putchar(32);
        putchar(8);
      }
    } else {
      token_buffer[count++] = ch;
    }
    if (count == max) {
      break;
    }
    ch = getc(file);
    if (echo != 0)
      putchar(ch);
  }
  token_buffer[count] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1120
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x1400
movl -0x1c(%rbp), %edi
callq 0x1030
movl $0x0, -0x20(%rbp)
movl -0x1c(%rbp), %edi
callq 0x1ce0
cmpl $0x0, %eax
je 0x149c
cmpl $0x8, -0x1c(%rbp)
je 0x1424
cmpl $0x7f, -0x1c(%rbp)
jne 0x1459
cmpl $0x0, -0x20(%rbp)
jle 0x1459
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x1457
movl $0x8, %edi
callq 0x1030
movl $0x20, %edi
callq 0x1030
movl $0x8, %edi
callq 0x1030
jmp 0x1473
movl -0x1c(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x20(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x147d
jmp 0x149c
movq -0x8(%rbp), %rdi
callq 0x1120
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x1497
movl -0x1c(%rbp), %edi
callq 0x1030
jmp 0x1407
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: evaluate
void evaluate(char *s) {
  if (strlen(s) == 0)
    return;
  string_inject(s, TIB);
  stack_push(TIB);
  execute(interpret);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1060
cmpq $0x0, %rax
jne 0x14cd
jmp 0x14f2
movq -0x8(%rbp), %rdi
movl 0x4115(%rip), %esi      # 0x55ec
callq 0x1770
movl 0x410a(%rip), %edi      # 0x55ec
callq 0x1740
movl 0x2060ff(%rip), %edi    # 0x2075ec
callq 0x1a50
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: main
int main(int argc, char **argv) {
  int tokens, i;
  FILE *fp;
  ngaPrepare();
  max_sp = 0;
  max_rsp = 0;
  ngaLoadImage(argv[1]);
  update_rx();
  printf("Initial Image Size: %lld\n", (long long)Heap);
  for (i = 2; i < argc; i++) {
    tokens = include_file(argv[i]);
    printf("   + %lld tokens from %s\n", (long long)tokens, argv[i]);
  }
  update_rx();
  printf("New Image Size: %lld\n", (long long)Heap);
  printf("MAX SP: %lld, RP: %lld\n", (long long)max_sp, (long long)max_rsp);
  if ((fp = fopen(argv[1], "wb")) == NULL) {
    printf("Unable to save the ngaImage!\n");
    exit(2);
  }
  fwrite(&memory, sizeof(CELL), memory[3] + 1, fp);
  fclose(fp);
  if (sp != 0) {
    printf("Stack not empty!\n");
    dump_stack();
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x1d30
movl $0x0, 0x409b(%rip)      # 0x55c0
movl $0x0, 0x4095(%rip)      # 0x55c4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1660
callq 0x19e0
movslq 0x4080(%rip), %rsi      # 0x55c8
leaq 0x1aea(%rip), %rdi      # 0x3039
movb $0x0, %al
callq 0x1070
movl $0x2, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x15a2
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x12d0
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x1ac3(%rip), %rdi      # 0x3053
movb $0x0, %al
callq 0x1070
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x155d
callq 0x19e0
movslq 0x401a(%rip), %rsi      # 0x55c8
leaq 0x1ab8(%rip), %rdi      # 0x306d
movb $0x0, %al
callq 0x1070
movslq 0x3ffd(%rip), %rsi      # 0x55c0
movslq 0x3ffa(%rip), %rdx      # 0x55c4
leaq 0x1ab2(%rip), %rdi      # 0x3083
movb $0x0, %al
callq 0x1070
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x1ab4(%rip), %rsi      # 0x309b
callq 0x10f0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x160e
leaq 0x1aa1(%rip), %rdi      # 0x309e
movb $0x0, %al
callq 0x1070
movl $0x2, %edi
callq 0x1100
movl 0x3fc8(%rip), %eax      # 0x55dc
addl $0x1, %eax
movslq %eax, %rdx
movq -0x20(%rbp), %rcx
leaq 0x3fab(%rip), %rdi      # 0x55d0
movl $0x4, %esi
callq 0x1110
movq -0x20(%rbp), %rdi
callq 0x1050
cmpl $0x0, 0x3b71(%rip)      # 0x51b0
je 0x1654
leaq 0x1a74(%rip), %rdi      # 0x30bc
movb $0x0, %al
callq 0x1070
callq 0x1230
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: string_inject
int string_inject(char *str, int buffer) {
  int m = strlen(str);
  int i = 0;
  while (m > 0) {
    memory[buffer + i] = (CELL)str[i];
    memory[buffer + i + 1] = 0;
    m--; i++;
  }
  return buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1060
movl %eax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x0, -0x10(%rbp)
jle 0x17e5
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %edx
movl -0xc(%rbp), %eax
addl -0x14(%rbp), %eax
movslq %eax, %rcx
leaq 0x3e1c(%rip), %rax      # 0x55d0
movl %edx, (%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x3e06(%rip), %rax      # 0x55d0
movl $0x0, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1792
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: string_extract
char *string_extract(CELL at) {
  CELL starting = at;
  CELL i = 0;
  while(memory[starting] && i < 8192)
    string_data[i++] = (char)memory[starting++];
  string_data[i] = 0;
  return (char *)string_data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movslq -0x8(%rbp), %rdx
xorl %eax, %eax
leaq 0x3dbf(%rip), %rcx      # 0x55d0
cmpl $0x0, (%rcx,%rdx,4)
movb %al, -0xd(%rbp)
je 0x1827
cmpl $0x2000, -0xc(%rbp)     # imm = 0x2000
setl %al
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %al
testb $0x1, %al
jne 0x1830
jmp 0x1864
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x8(%rbp)
movslq %eax, %rcx
leaq 0x3d8b(%rip), %rax      # 0x55d0
movl (%rax,%rcx,4), %eax
movb %al, %dl
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
movslq %eax, %rcx
leaq 0x203d81(%rip), %rax    # 0x2055e0
movb %dl, (%rax,%rcx)
jmp 0x1804
movslq -0xc(%rbp), %rcx
leaq 0x203d71(%rip), %rax    # 0x2055e0
movb $0x0, (%rax,%rcx)
leaq 0x203d66(%rip), %rax    # 0x2055e0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: d_lookup
int d_lookup(CELL Dictionary, char *name) {
  CELL dt = 0;
  CELL i = Dictionary;
  char *dname;
  while (memory[i] != 0 && i != 0) {
    dname = string_extract(d_name(i));
    if (strcmp(dname, name) == 0) {
      dt = i;
      i = 0;
    } else {
      i = memory[i];
    }
  }
  return dt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x18(%rbp)
movslq -0x18(%rbp), %rdx
xorl %eax, %eax
leaq 0x3ce7(%rip), %rcx      # 0x55d0
cmpl $0x0, (%rcx,%rdx,4)
movb %al, -0x21(%rbp)
je 0x18fc
cmpl $0x0, -0x18(%rbp)
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x1905
jmp 0x194c
movl -0x18(%rbp), %edi
callq 0x18b0
movl %eax, %edi
callq 0x17f0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1090
cmpl $0x0, %eax
jne 0x1939
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
jmp 0x194a
movslq -0x18(%rbp), %rcx
leaq 0x3c8c(%rip), %rax      # 0x55d0
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
jmp 0x18dc
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: update_rx
void update_rx() {
  Dictionary = memory[2];
  Heap = memory[3];
  Compiler = d_xt_for("Compiler", Dictionary);
  notfound = d_xt_for("err:notfound", Dictionary);
  interpret = d_xt_for("interpret", Dictionary);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x3bee(%rip), %eax      # 0x55d8
movl %eax, 0x205bf0(%rip)    # 0x2075e0
movl 0x3be6(%rip), %eax      # 0x55dc
movl %eax, 0x3bcc(%rip)      # 0x55c8
movl 0x205bde(%rip), %esi    # 0x2075e0
leaq 0x16c5(%rip), %rdi      # 0x30ce
callq 0x1960
movl %eax, 0x205bd0(%rip)    # 0x2075e4
movl 0x205bc6(%rip), %esi    # 0x2075e0
leaq 0x16b6(%rip), %rdi      # 0x30d7
callq 0x1960
movl %eax, 0x205bbc(%rip)    # 0x2075e8
movl 0x205bae(%rip), %esi    # 0x2075e0
leaq 0x16ab(%rip), %rdi      # 0x30e4
callq 0x1960
movl %eax, 0x205ba8(%rip)    # 0x2075ec
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: execute
void execute(CELL cell) {
  CELL opcode, a, i;
  rp = 1;
  ip = cell;
  while (ip < IMAGE_SIZE) {
    opcode = memory[ip];
    if (ip == notfound) {
      printf("%s ?\n", string_extract(TIB));
    }
    if (ngaValidatePackedOpcodes(opcode) != 0) {
      ngaProcessPackedOpcodes(opcode);
    } else {
      printf("\nERROR: Invalid instruction!\n");
      printf("At %lld, opcode %lld\n", (long long)ip, (long long)opcode);
      printf("Instructions: ");
      a = opcode;
      for (i = 0; i < 4; i++) {
        printf("%lldd ", (long long)a & 0xFF);
        a = a >> 8;
      }
      printf("\n");
      exit(1);
    }
    ip++;
    if (sp > max_sp)  max_sp  = sp;
    if (rp > max_rsp) max_rsp = rp;
    if (rp == 0)
      ip = IMAGE_SIZE;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x1, 0x205b8b(%rip)    # 0x2075f0
movl -0x4(%rbp), %eax
movl %eax, 0x205b86(%rip)    # 0x2075f4
cmpl $0x80000, 0x205b7c(%rip) # imm = 0x80000
jge 0x1bbe
movslq 0x205b6f(%rip), %rcx    # 0x2075f4
leaq 0x3b44(%rip), %rax      # 0x55d0
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
movl 0x205b5c(%rip), %eax    # 0x2075f4
cmpl 0x205b4a(%rip), %eax    # 0x2075e8
jne 0x1abc
movl 0x3b46(%rip), %edi      # 0x55ec
callq 0x17f0
movq %rax, %rsi
leaq 0x1639(%rip), %rdi      # 0x30ee
movb $0x0, %al
callq 0x1070
movl -0x8(%rbp), %edi
callq 0x1bd0
cmpl $0x0, %eax
je 0x1ad6
movl -0x8(%rbp), %edi
callq 0x1c30
jmp 0x1b63
leaq 0x1617(%rip), %rdi      # 0x30f4
movb $0x0, %al
callq 0x1070
movslq 0x205b09(%rip), %rsi    # 0x2075f4
movslq -0x8(%rbp), %rdx
leaq 0x161c(%rip), %rdi      # 0x3112
movb $0x0, %al
callq 0x1070
leaq 0x1624(%rip), %rdi      # 0x3128
movb $0x0, %al
callq 0x1070
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x4, -0x10(%rbp)
jge 0x1b4b
movslq -0xc(%rbp), %rsi
andq $0xff, %rsi
leaq 0x1607(%rip), %rdi      # 0x3137
movb $0x0, %al
callq 0x1070
movl -0xc(%rbp), %eax
sarl $0x8, %eax
movl %eax, -0xc(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x1b18
leaq 0x160b(%rip), %rdi      # 0x315d
movb $0x0, %al
callq 0x1070
movl $0x1, %edi
callq 0x1100
movl 0x205a8b(%rip), %eax    # 0x2075f4
addl $0x1, %eax
movl %eax, 0x205a82(%rip)    # 0x2075f4
movl 0x3638(%rip), %eax      # 0x51b0
cmpl 0x3a42(%rip), %eax      # 0x55c0
jle 0x1b8c
movl 0x362a(%rip), %eax      # 0x51b0
movl %eax, 0x3a34(%rip)      # 0x55c0
movl 0x205a5e(%rip), %eax    # 0x2075f0
cmpl 0x3a2c(%rip), %eax      # 0x55c4
jle 0x1ba6
movl 0x205a50(%rip), %eax    # 0x2075f0
movl %eax, 0x3a1e(%rip)      # 0x55c4
cmpl $0x0, 0x205a43(%rip)    # 0x2075f0
jne 0x1bb9
movl $0x80000, 0x205a3b(%rip) # imm = 0x80000
jmp 0x1a6e
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: ngaValidatePackedOpcodes
int ngaValidatePackedOpcodes(CELL opcode) {
  CELL raw = opcode;
  CELL current;
  int valid = -1;
  int i;
  for (i = 0; i < 4; i++) {
    current = raw & 0xFF;
    if (!(current >= 0 && current <= 29))
      valid = 0;
    raw = raw >> 8;
  }
  return valid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
movl $0xffffffff, -0x10(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x1c23
movl -0x8(%rbp), %eax
andl $0xff, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x1c08
cmpl $0x1d, -0xc(%rbp)
jle 0x1c0f
movl $0x0, -0x10(%rbp)
movl -0x8(%rbp), %eax
sarl $0x8, %eax
movl %eax, -0x8(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1beb
movl -0x10(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: ngaProcessPackedOpcodes
void ngaProcessPackedOpcodes(CELL opcode) {
  if (INST(0))  instructions[opcode & 0xFF]();
  if (INST(8))  instructions[(opcode >> 8) & 0xFF]();
  if (INST(16)) instructions[(opcode >> 16) & 0xFF]();
  if (INST(24)) instructions[(opcode >> 24) & 0xFF]();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
sarl $0x0, %eax
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1c60
movl -0x4(%rbp), %eax
andl $0xff, %eax
movslq %eax, %rcx
leaq 0x3453(%rip), %rax      # 0x50b0
callq *(%rax,%rcx,8)
movl -0x4(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1c88
movl -0x4(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movslq %eax, %rcx
leaq 0x342b(%rip), %rax      # 0x50b0
callq *(%rax,%rcx,8)
movl -0x4(%rbp), %eax
sarl $0x10, %eax
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1cb0
movl -0x4(%rbp), %eax
sarl $0x10, %eax
andl $0xff, %eax
movslq %eax, %rcx
leaq 0x3403(%rip), %rax      # 0x50b0
callq *(%rax,%rcx,8)
movl -0x4(%rbp), %eax
sarl $0x18, %eax
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1cd8
movl -0x4(%rbp), %eax
sarl $0x18, %eax
andl $0xff, %eax
movslq %eax, %rcx
leaq 0x33db(%rip), %rax      # 0x50b0
callq *(%rax,%rcx,8)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: ngaPrepare
void ngaPrepare() {
  ip = sp = rp = 0;
  for (ip = 0; ip < IMAGE_SIZE; ip++)
    memory[ip] = 0;  /* 0 is the opcode for "no", a no-operation instruction */
  for (ip = 0; ip < STACK_DEPTH; ip++)
    data[ip] = 0;
  for (ip = 0; ip < ADDRESSES; ip++)
    address[ip] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, 0x2058b2(%rip)    # 0x2075f0
movl $0x0, 0x3468(%rip)      # 0x51b0
movl $0x0, 0x2058a2(%rip)    # 0x2075f4
movl $0x0, 0x205898(%rip)    # 0x2075f4
cmpl $0x80000, 0x20588e(%rip) # imm = 0x80000
jge 0x1d8e
movslq 0x205885(%rip), %rcx    # 0x2075f4
leaq 0x385a(%rip), %rax      # 0x55d0
movl $0x0, (%rax,%rcx,4)
movl 0x205871(%rip), %eax    # 0x2075f4
addl $0x1, %eax
movl %eax, 0x205868(%rip)    # 0x2075f4
jmp 0x1d5c
movl $0x0, 0x20585c(%rip)    # 0x2075f4
cmpl $0x100, 0x205852(%rip)  # imm = 0x100
jge 0x1dca
movslq 0x205849(%rip), %rcx    # 0x2075f4
leaq 0x340e(%rip), %rax      # 0x51c0
movl $0x0, (%rax,%rcx,4)
movl 0x205835(%rip), %eax    # 0x2075f4
addl $0x1, %eax
movl %eax, 0x20582c(%rip)    # 0x2075f4
jmp 0x1d98
movl $0x0, 0x205820(%rip)    # 0x2075f4
cmpl $0x100, 0x205816(%rip)  # imm = 0x100
jge 0x1e06
movslq 0x20580d(%rip), %rcx    # 0x2075f4
leaq 0x205812(%rip), %rax    # 0x207600
movl $0x0, (%rax,%rcx,4)
movl 0x2057f9(%rip), %eax    # 0x2075f4
addl $0x1, %eax
movl %eax, 0x2057f0(%rip)    # 0x2075f4
jmp 0x1dd4
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_swap
void inst_swap() {
  CELL a;
  a = TOS;
  TOS = NOS;
  NOS = a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x32d5(%rip), %rcx      # 0x51b0
leaq 0x32de(%rip), %rax      # 0x51c0
movl (%rax,%rcx,4), %eax
movl %eax, -0x4(%rbp)
movl 0x32c2(%rip), %eax      # 0x51b0
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x32c5(%rip), %rax      # 0x51c0
movl (%rax,%rcx,4), %edx
movslq 0x32ab(%rip), %rcx      # 0x51b0
leaq 0x32b4(%rip), %rax      # 0x51c0
movl %edx, (%rax,%rcx,4)
movl -0x4(%rbp), %edx
movl 0x3298(%rip), %eax      # 0x51b0
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x329b(%rip), %rax      # 0x51c0
movl %edx, (%rax,%rcx,4)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_call
void inst_call() {
  rp++;
  TORS = ip;
  ip = TOS - 1;
  inst_drop();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x205626(%rip), %eax    # 0x2075f0
addl $0x1, %eax
movl %eax, 0x20561d(%rip)    # 0x2075f0
movl 0x20561b(%rip), %edx    # 0x2075f4
movslq 0x205610(%rip), %rcx    # 0x2075f0
leaq 0x205619(%rip), %rax    # 0x207600
movl %edx, (%rax,%rcx,4)
movslq 0x31bf(%rip), %rcx      # 0x51b0
leaq 0x31c8(%rip), %rax      # 0x51c0
movl (%rax,%rcx,4), %eax
subl $0x1, %eax
movl %eax, 0x2055f0(%rip)    # 0x2075f4
callq 0x1e90
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_ccall
void inst_ccall() {
  CELL quote, flag;
  quote = stack_pop();
  flag = stack_pop();
  if (flag != 0) {
    rp++;
    TORS = ip;
    ip = quote - 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x1710
movl %eax, -0x4(%rbp)
callq 0x1710
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0x2060
movl 0x2055bc(%rip), %eax    # 0x2075f0
addl $0x1, %eax
movl %eax, 0x2055b3(%rip)    # 0x2075f0
movl 0x2055b1(%rip), %edx    # 0x2075f4
movslq 0x2055a6(%rip), %rcx    # 0x2075f0
leaq 0x2055af(%rip), %rax    # 0x207600
movl %edx, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
subl $0x1, %eax
movl %eax, 0x205594(%rip)    # 0x2075f4
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_fetch
void inst_fetch() {
  switch (TOS) {
    case -1: TOS = sp - 1; break;
    case -2: TOS = rp; break;
    case -3: TOS = IMAGE_SIZE; break;
    case -4: TOS = CELL_MIN; break;
    case -5: TOS = CELL_MAX; break;
    default: TOS = memory[TOS]; break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x2f85(%rip), %rcx      # 0x51b0
leaq 0x2f8e(%rip), %rax      # 0x51c0
movl (%rax,%rcx,4), %eax
addl $0x5, %eax
movl %eax, %ecx
movq %rcx, -0x8(%rbp)
subl $0x4, %eax
ja 0x22d8
movq -0x8(%rbp), %rax
leaq 0xdb2(%rip), %rcx       # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x2f4f(%rip), %edx      # 0x51b0
subl $0x1, %edx
movslq 0x2f45(%rip), %rcx      # 0x51b0
leaq 0x2f4e(%rip), %rax      # 0x51c0
movl %edx, (%rax,%rcx,4)
jmp 0x2305
movl 0x205370(%rip), %edx    # 0x2075f0
movslq 0x2f29(%rip), %rcx      # 0x51b0
leaq 0x2f32(%rip), %rax      # 0x51c0
movl %edx, (%rax,%rcx,4)
jmp 0x2305
movslq 0x2f16(%rip), %rcx      # 0x51b0
leaq 0x2f1f(%rip), %rax      # 0x51c0
movl $0x80000, (%rax,%rcx,4) # imm = 0x80000
jmp 0x2305
movslq 0x2eff(%rip), %rcx      # 0x51b0
leaq 0x2f08(%rip), %rax      # 0x51c0
movl $0x80000001, (%rax,%rcx,4) # imm = 0x80000001
jmp 0x2305
movslq 0x2ee8(%rip), %rcx      # 0x51b0
leaq 0x2ef1(%rip), %rax      # 0x51c0
movl $0x7ffffffe, (%rax,%rcx,4) # imm = 0x7FFFFFFE
jmp 0x2305
movslq 0x2ed1(%rip), %rcx      # 0x51b0
leaq 0x2eda(%rip), %rax      # 0x51c0
movslq (%rax,%rcx,4), %rcx
leaq 0x32df(%rip), %rax      # 0x55d0
movl (%rax,%rcx,4), %edx
movslq 0x2eb5(%rip), %rcx      # 0x51b0
leaq 0x2ebe(%rip), %rax      # 0x51c0
movl %edx, (%rax,%rcx,4)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_store
void inst_store() {
  if (TOS <= IMAGE_SIZE && TOS >= 0) {
    memory[TOS] = NOS;
    inst_drop();
    inst_drop();
  } else {
    ip = IMAGE_SIZE;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x2e95(%rip), %rcx      # 0x51b0
leaq 0x2e9e(%rip), %rax      # 0x51c0
cmpl $0x80000, (%rax,%rcx,4) # imm = 0x80000
jg 0x237d
movslq 0x2e7e(%rip), %rcx      # 0x51b0
leaq 0x2e87(%rip), %rax      # 0x51c0
cmpl $0x0, (%rax,%rcx,4)
jl 0x237d
movl 0x2e6b(%rip), %eax      # 0x51b0
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x2e6e(%rip), %rax      # 0x51c0
movl (%rax,%rcx,4), %edx
movslq 0x2e54(%rip), %rcx      # 0x51b0
leaq 0x2e5d(%rip), %rax      # 0x51c0
movslq (%rax,%rcx,4), %rcx
leaq 0x3262(%rip), %rax      # 0x55d0
movl %edx, (%rax,%rcx,4)
callq 0x1e90
callq 0x1e90
jmp 0x2387
movl $0x80000, 0x20526d(%rip) # imm = 0x80000
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_divmod
void inst_divmod() {
  CELL a, b;
  a = TOS;
  b = NOS;
  TOS = b / a;
  NOS = b % a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x2d55(%rip), %rcx      # 0x51b0
leaq 0x2d5e(%rip), %rax      # 0x51c0
movl (%rax,%rcx,4), %eax
movl %eax, -0x4(%rbp)
movl 0x2d42(%rip), %eax      # 0x51b0
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x2d45(%rip), %rax      # 0x51c0
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
cltd
idivl -0x4(%rbp)
movl %eax, %edx
movslq 0x2d1f(%rip), %rcx      # 0x51b0
leaq 0x2d28(%rip), %rax      # 0x51c0
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
cltd
idivl -0x4(%rbp)
movl 0x2d08(%rip), %eax      # 0x51b0
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x2d0b(%rip), %rax      # 0x51c0
movl %edx, (%rax,%rcx,4)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_shift
void inst_shift() {
  CELL y = TOS;
  CELL x = NOS;
  if (TOS < 0)
    NOS = NOS << (TOS * -1);
  else {
    if (x < 0 && y > 0)
      NOS = x >> y | ~(~0U >> y);
    else
      NOS = x >> y;
  }
  inst_drop();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movslq 0x2bf1(%rip), %rcx      # 0x51b0
leaq 0x2bfa(%rip), %rax      # 0x51c0
movl (%rax,%rcx,4), %eax
movl %eax, -0x4(%rbp)
movl 0x2bde(%rip), %eax      # 0x51b0
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x2be1(%rip), %rax      # 0x51c0
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
movslq 0x2bc4(%rip), %rcx      # 0x51b0
leaq 0x2bcd(%rip), %rax      # 0x51c0
cmpl $0x0, (%rax,%rcx,4)
jge 0x263b
movl 0x2bb1(%rip), %eax      # 0x51b0
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x2bb4(%rip), %rax      # 0x51c0
movl (%rax,%rcx,4), %edx
movslq 0x2b9a(%rip), %rcx      # 0x51b0
leaq 0x2ba3(%rip), %rax      # 0x51c0
imull $-0x1, (%rax,%rcx,4), %ecx
shll %cl, %edx
movl 0x2b87(%rip), %eax      # 0x51b0
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x2b8a(%rip), %rax      # 0x51c0
movl %edx, (%rax,%rcx,4)
jmp 0x2696
cmpl $0x0, -0x8(%rbp)
jge 0x2676
cmpl $0x0, -0x4(%rbp)
jle 0x2676
movl -0x8(%rbp), %edx
movl -0x4(%rbp), %ecx
sarl %cl, %edx
movl -0x4(%rbp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shrl %cl, %eax
xorl $-0x1, %eax
orl %eax, %edx
movl 0x2b4c(%rip), %eax      # 0x51b0
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x2b4f(%rip), %rax      # 0x51c0
movl %edx, (%rax,%rcx,4)
jmp 0x2694
movl -0x8(%rbp), %edx
movl -0x4(%rbp), %ecx
sarl %cl, %edx
movl 0x2b2c(%rip), %eax      # 0x51b0
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x2b2f(%rip), %rax      # 0x51c0
movl %edx, (%rax,%rcx,4)
jmp 0x2696
callq 0x1e90
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_zret
void inst_zret() {
  if (TOS == 0) {
    inst_drop();
    ip = TORS;
    rp--;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x2af5(%rip), %rcx      # 0x51b0
leaq 0x2afe(%rip), %rax      # 0x51c0
cmpl $0x0, (%rax,%rcx,4)
jne 0x26f3
callq 0x1e90
movslq 0x204f1c(%rip), %rcx    # 0x2075f0
leaq 0x204f25(%rip), %rax    # 0x207600
movl (%rax,%rcx,4), %eax
movl %eax, 0x204f10(%rip)    # 0x2075f4
movl 0x204f06(%rip), %eax    # 0x2075f0
addl $-0x1, %eax
movl %eax, 0x204efd(%rip)    # 0x2075f0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_06/atoi.c
// Function: main
int main(void)
{
  int i;
  char *s = "12s3a";

  i = atoi(s);

  printf("atoi: %d", i);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
leaq 0xeae(%rip), %rax       # 0x2004
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1180
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %esi
leaq 0xe9a(%rip), %rdi       # 0x200a
movb $0x0, %al
callq 0x1030
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_06/atoi.c
// Function: atoi
int atoi(const char *s)
{
  int i = 0;

  while (*s != '\0' && *s > '0' && *s < '9')
  {
    i = i * 10 + *s - '0';
    ++s;
  }

  return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xd(%rbp)
je 0x11c1
movq -0x8(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0xd(%rbp)
jle 0x11c1
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
setl %al
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %al
testb $0x1, %al
jne 0x11ca
jmp 0x11eb
imull $0xa, -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movsbl (%rcx), %ecx
addl %ecx, %eax
subl $0x30, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x118f
movl -0xc(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/pi64cipher128v2/ref2/pi-cipher.c
// Function: load_u64_little
static uint64_t load_u64_little(const void *mem)
{
	uint64_t ret;
	const uint8_t *x = (const uint8_t *)mem;
	ret =   (uint64_t)x[0] <<  0
	      | (uint64_t)x[1] <<  8
	      | (uint64_t)x[2] << 16
	      | (uint64_t)x[3] << 24
	      | (uint64_t)x[4] << 32
	      | (uint64_t)x[5] << 40
	      | (uint64_t)x[6] << 48
	      | (uint64_t)x[7] << 56;
	return ret;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rax
movzbl (%rax), %eax
shlq $0x0, %rax
movq -0x18(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
shlq $0x8, %rcx
orq %rcx, %rax
movq -0x18(%rsp), %rcx
movzbl 0x2(%rcx), %ecx
shlq $0x10, %rcx
orq %rcx, %rax
movq -0x18(%rsp), %rcx
movzbl 0x3(%rcx), %ecx
shlq $0x18, %rcx
orq %rcx, %rax
movq -0x18(%rsp), %rcx
movzbl 0x4(%rcx), %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq -0x18(%rsp), %rcx
movzbl 0x5(%rcx), %ecx
shlq $0x28, %rcx
orq %rcx, %rax
movq -0x18(%rsp), %rcx
movzbl 0x6(%rcx), %ecx
shlq $0x30, %rcx
orq %rcx, %rax
movq -0x18(%rsp), %rcx
movzbl 0x7(%rcx), %ecx
shlq $0x38, %rcx
orq %rcx, %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/pi64cipher128v2/ref2/pi-cipher.c
// Function: store_u64_little
static void store_u64_little(void *mem, uint64_t val)
{
	uint8_t *x = (uint8_t *)mem;
	x[0] = val & 0xff; val >>= 8;
	x[1] = val & 0xff; val >>= 8;
	x[2] = val & 0xff; val >>= 8;
	x[3] = val & 0xff; val >>= 8;
	x[4] = val & 0xff; val >>= 8;
	x[5] = val & 0xff; val >>= 8;
	x[6] = val & 0xff; val >>= 8;
	x[7] = val & 0xff;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movq -0x10(%rsp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rsp), %rax
movb %cl, (%rax)
movq -0x10(%rsp), %rax
shrq $0x8, %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rsp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rsp), %rax
shrq $0x8, %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rsp), %rax
movb %cl, 0x2(%rax)
movq -0x10(%rsp), %rax
shrq $0x8, %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rsp), %rax
movb %cl, 0x3(%rax)
movq -0x10(%rsp), %rax
shrq $0x8, %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rsp), %rax
movb %cl, 0x4(%rax)
movq -0x10(%rsp), %rax
shrq $0x8, %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rsp), %rax
movb %cl, 0x5(%rax)
movq -0x10(%rsp), %rax
shrq $0x8, %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rsp), %rax
movb %cl, 0x6(%rax)
movq -0x10(%rsp), %rax
shrq $0x8, %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rsp), %rax
movb %cl, 0x7(%rax)
retq
nop
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/extracters/cpytap/cpytap.c
// Function: usage
void usage(void)
{
  fprintf(stderr,
          "Usage: cpytap src dst [-r len] [-S n] [-I n,file] [-R n,file] [-A file]\n");
  fprintf(stderr,
          "  Copy src .tap file to destination maintaining the internal\n"
          "  record structure. The switches control file level changes to\n"
          "  destination tape.\n");
  fprintf(stderr, "\nSwitches:\n\n");
  fprintf(stderr,
          "-r len        - Specify max record size when writing new files.\n"
          "                There may be multiple \"-r\" switches on the\n"
          "                command line if the new files need different\n"
          "                record sizes. (%u <= len <= %u, default %u)\n"
          "                If len is outside the supported range, it will be\n"
          "                quietly modified to the minimum or maximum value.\n",
          MINRECLEN, MAXRECLEN, DEFRECLEN);
  fprintf(stderr,
          "-I n,file     - Insert specified file before file n of the source tape.\n");
  fprintf(stderr,
          "-R n,file     - Replace file n of the source tape with the specified file.\n");
  fprintf(stderr,
          "-S n          - Skip file n from the source tape.\n");
  fprintf(stderr,
          "-A file       - Append the specified file after all the files on\n"
          "                the source tape have been copied to the destination.\n");
  fprintf(stderr,
          "\nFiles are number 1 - N according to their position on the\n"
          "source tape.\n");
  exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x3d9d(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1e7f(%rip), %rsi      # 0x30e4
movb $0x0, %al
callq 0x10a0
movq 0x3d85(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1eb0(%rip), %rsi      # 0x312d
movb $0x0, %al
callq 0x10a0
movq 0x3d6d(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1f29(%rip), %rsi      # 0x31be
movb $0x0, %al
callq 0x10a0
movq 0x3d55(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1f1e(%rip), %rsi      # 0x31cb
movl $0x1, %edx
movl $0x10000, %ecx          # imm = 0x10000
movl $0x2800, %r8d           # imm = 0x2800
movb $0x0, %al
callq 0x10a0
movq 0x3d2d(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x206f(%rip), %rsi      # 0x3344
movb $0x0, %al
callq 0x10a0
movq 0x3d15(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x20a0(%rip), %rsi      # 0x338d
movb $0x0, %al
callq 0x10a0
movq 0x3cfd(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x20d4(%rip), %rsi      # 0x33d9
movb $0x0, %al
callq 0x10a0
movq 0x3ce5(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x20ef(%rip), %rsi      # 0x340c
movb $0x0, %al
callq 0x10a0
movq 0x3ccd(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x215e(%rip), %rsi      # 0x3493
movb $0x0, %al
callq 0x10a0
movl $0x1, %edi
callq 0x1120
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/extracters/cpytap/cpytap.c
// Function: parse
int parse(
  char *arg,
  int *file,
  char **name
)
{
  char *endptr;

  *file = strtoul(arg, &endptr, 0);

  if ((*endptr == ',') && (*++endptr == '\0'))
    return -1;
  if ((*file == 0) || (*file > MAXFILES))
    return -1;

  *name = endptr;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x1110
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x13a8
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x13a8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x13d5
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x13ba
movq -0x18(%rbp), %rax
cmpl $0x64, (%rax)
jle 0x13c3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x13d5
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/extracters/cpytap/cpytap.c
// Function: writeFile
static void writeFile(
  char *filename,
  int rlen
)
{
  FILE *file;
  size_t datalen;
  char record[MAXRCLNT];

  if ((file = fopen(filename, "r")) != NULL) {
    while ((datalen = fread(record, sizeof(char), rlen, file)) != 0) {
      if (ferror(file)) {
        fprintf(stderr, "Error reading %s\n", filename);
        exit(4);
      }
      if (WriteTapeRecord(dst, record, rlen) != 0) {
        fprintf(stderr, "Error writing record to destination tape\n");
        exit(5);
      }
    }
    if (WriteTapeMark(dst, 0) != 0) {
      fprintf(stderr, "Error writing tape mark to destination tape\n");
      exit(5);
    }
    fclose(file);
    return;
  }
  fprintf(stderr, "Failed to open file - %s\n", filename);
  exit(3);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10020, %rsp          # imm = 0x10020
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x1b53(%rip), %rsi      # 0x3650
callq 0x10f0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1bf2
jmp 0x1b12
leaq -0x10020(%rbp), %rdi
movslq -0xc(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %esi
callq 0x1060
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x1bab
movq -0x18(%rbp), %rdi
callq 0x1050
cmpl $0x0, %eax
je 0x1b69
movq 0x34ae(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x1afa(%rip), %rsi      # 0x3652
movb $0x0, %al
callq 0x10a0
movl $0x4, %edi
callq 0x1120
movq 0x3578(%rip), %rdi      # 0x50e8
leaq -0x10020(%rbp), %rsi
movl -0xc(%rbp), %edx
callq 0x22c0
cmpl $0x0, %eax
je 0x1ba6
movq 0x346d(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1acf(%rip), %rsi      # 0x3664
movb $0x0, %al
callq 0x10a0
movl $0x5, %edi
callq 0x1120
jmp 0x1b12
movq 0x3536(%rip), %rdi      # 0x50e8
xorl %esi, %esi
callq 0x2450
cmpl $0x0, %eax
je 0x1be0
movq 0x3433(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1abf(%rip), %rsi      # 0x368e
movb $0x0, %al
callq 0x10a0
movl $0x5, %edi
callq 0x1120
movq -0x18(%rbp), %rdi
callq 0x1070
addq $0x10020, %rsp          # imm = 0x10020
popq %rbp
retq
movq 0x33ff(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x1ab4(%rip), %rsi      # 0x36bb
movb $0x0, %al
callq 0x10a0
movl $0x3, %edi
callq 0x1120
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/extracters/cpytap/cpytap.c
// Function: copyFile
static unsigned int copyFile(void)
{
  char record[MAXRCLNT];
  uint32 len;

  for (;;) {
    switch (len = ReadTapeRecord(src, record, sizeof(record))) {
        case ST_EOM:
          return ST_EOM;

        case ST_TM:
          if (WriteTapeMark(dst, 0) == 0)
            return ST_TM;
          fprintf(stderr, "Error writing tape mark to destination tape\n");
          exit(6);

        default:
          if (WriteTapeRecord(dst, record, len) == 0)
            continue;
          fprintf(stderr, "Error writing record to destination tape\n");
          exit(6);
      }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10020, %rsp          # imm = 0x10020
movq 0x34ae(%rip), %rdi      # 0x50e0
leaq -0x10010(%rbp), %rsi
movl $0x10000, %edx          # imm = 0x10000
callq 0x2100
movl %eax, -0x10014(%rbp)
movl %eax, %ecx
movl %ecx, -0x10018(%rbp)
subl $-0x1, %eax
je 0x1c64
jmp 0x1c58
movl -0x10018(%rbp), %eax
testl %eax, %eax
je 0x1c70
jmp 0x1cae
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1cf3
movq 0x3471(%rip), %rdi      # 0x50e8
xorl %esi, %esi
callq 0x2450
cmpl $0x0, %eax
jne 0x1c8c
movl $0x0, -0x4(%rbp)
jmp 0x1cf3
movq 0x3365(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x19f1(%rip), %rsi      # 0x368e
movb $0x0, %al
callq 0x10a0
movl $0x6, %edi
callq 0x1120
movq 0x3433(%rip), %rdi      # 0x50e8
leaq -0x10010(%rbp), %rsi
movl -0x10014(%rbp), %edx
callq 0x22c0
cmpl $0x0, %eax
jne 0x1cd1
jmp 0x1c2b
movq 0x3320(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1982(%rip), %rsi      # 0x3664
movb $0x0, %al
callq 0x10a0
movl $0x6, %edi
callq 0x1120
movl -0x4(%rbp), %eax
addq $0x10020, %rsp          # imm = 0x10020
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/extracters/cpytap/tapeio.c
// Function: OpenTapeForRead
int OpenTapeForRead(
  FILE **handle,
  char *name
)
{
  FILE *tfile;

  if ((tfile = fopen(name, "r")) != NULL) {
    int status;

    status = verifyFormat(tfile);
    rewind(tfile);
    if ((status != TIO_SUCCESS) && (status != TIO_ERROR))
      CloseTape(tfile);
    else *handle = tfile;
    return status;
  }
  return TIO_OPENFAIL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x1935(%rip), %rsi      # 0x3650
callq 0x10f0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x1d69
movq -0x20(%rbp), %rdi
callq 0x1d80
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1080
cmpl $0x0, -0x24(%rbp)
je 0x1d56
cmpl $-0x1, -0x24(%rbp)
je 0x1d56
movq -0x20(%rbp), %rdi
callq 0x1f90
jmp 0x1d61
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d70
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/extracters/cpytap/tapeio.c
// Function: OpenTapeForWrite
int OpenTapeForWrite(
  FILE **handle,
  char *name
)
{
  FILE *tfile;

  /*
   * Fail if the file exists
   */
  if (access(name, F_OK) == 0)
    return TIO_CREATEFAIL;

  if ((tfile = fopen(name, "w+")) != NULL) {
    uint32 tm = 0;
    int status = TIO_SUCCESS;

    /*
     * Write 2 tape marks
     */
    if (fwrite(&tm, sizeof(tm), 2, tfile) != 2)
      status = TIO_IOERROR;

    if (status == TIO_SUCCESS) {
      rewind(tfile);
      *handle = tfile;
      return TIO_SUCCESS;
    }

    /*
     * Failed to write the 2 tape marks. Try to delete the file before
     * returning an error.
     */
    CloseTape(tfile);
    unlink(name);
    return TIO_IOERROR;
  }
  return TIO_CREATEFAIL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x10e0
cmpl $0x0, %eax
jne 0x1fec
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x207d
movq -0x18(%rbp), %rdi
leaq 0x16de(%rip), %rsi      # 0x36d5
callq 0x10f0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x2076
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rcx
leaq -0x24(%rbp), %rdi
movl $0x4, %esi
movl $0x2, %edx
callq 0x1130
cmpq $0x2, %rax
je 0x2038
movl $0xfffffffb, -0x28(%rbp) # imm = 0xFFFFFFFB
cmpl $0x0, -0x28(%rbp)
jne 0x205b
movq -0x20(%rbp), %rdi
callq 0x1080
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x207d
movq -0x20(%rbp), %rdi
callq 0x1f90
movq -0x18(%rbp), %rdi
callq 0x1030
movl $0xfffffffb, -0x4(%rbp) # imm = 0xFFFFFFFB
jmp 0x207d
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/extracters/cpytap/tapeio.c
// Function: OpenTapeForAppend
int OpenTapeForAppend(
  FILE **handle,
  char *name
)
{
  FILE *tfile;

  if ((tfile =fopen(name, "r+")) != NULL) {
    int status;

    status = verifyFormat(tfile);
    if ((status != TIO_SUCCESS) && (status != TIO_ERROR))
      CloseTape(tfile);
    else *handle = tfile;
    return status;
  }
  return TIO_OPENFAIL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x162d(%rip), %rsi      # 0x36d8
callq 0x10f0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x20f0
movq -0x20(%rbp), %rdi
callq 0x1d80
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x20dd
cmpl $-0x1, -0x24(%rbp)
je 0x20dd
movq -0x20(%rbp), %rdi
callq 0x1f90
jmp 0x20e8
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x20f7
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/extracters/cpytap/tapeio.c
// Function: ReadTapeRecordLength
uint32 ReadTapeRecordLength(
  FILE *handle
)
 {
   long pos = ftell(handle);
   uint8 meta[4];
   uint32 bc, erflag;

   /*
    * Note: any I/O errors are treated as "end of medium" detection.
    */
   if (fread(meta, sizeof(meta), 1, handle) != 1)
     return ST_EOM;

   bc = (((unsigned int)meta[3]) << 24) |
        (((unsigned int)meta[2]) << 16) |
        (((unsigned int)meta[1]) << 8) |
        (unsigned int)meta[0];

   switch (bc) {
     case ST_EOM:
     case ST_TM:
       return bc;

     default:
       erflag = bc & ST_ERROR;
       bc &= ST_LENGTH;

       /*
        * Now position the file after this record.
        */
       pos += RECLEN(bc) + (2 * sizeof(meta));
       if (fseek(handle, pos, SEEK_SET) != 0)
         return ST_EOM;

       return erflag | bc;
   }
   return ST_EOM;
 }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10b0
movq %rax, -0x18(%rbp)
leaq -0x1c(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1060
cmpq $0x1, %rax
je 0x223f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x22ac
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
incl %eax
subl $0x1, %eax
ja 0x2259
jmp 0x2251
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x22ac
movl -0x20(%rbp), %eax
andl $0x80000000, %eax       # imm = 0x80000000
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
andl $-0x2, %eax
movl %eax, %eax
addq $0x8, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x10d0
cmpl $0x0, %eax
je 0x22a3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x22ac
movl -0x24(%rbp), %eax
orl -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/extracters/cpytap/tapeio.c
// Function: WriteTapeRecord
int WriteTapeRecord(
  FILE *handle,
  void *buf,
  int len
)
{
  uint8 meta[4];
  int datalen;

  meta[0] = len & 0xFF;
  meta[1] = (len >> 8) & 0xFF;
  meta[2] = (len >> 16) & 0xFF;
  meta[3] = (len >> 24) & 0xFF;

  datalen = ((len + 1)  & ST_LENGTH) & ~1;

  if (fwrite(meta, sizeof(meta), 1, handle) != 1)
    return -1;

  if (fwrite(buf, datalen, 1, handle) != 1)
    return -1;

  if (fwrite(meta, sizeof(meta), 1, handle) != 1)
    return -1;

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
andl $0xff, %eax
movb %al, -0x20(%rbp)
movl -0x1c(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, -0x1f(%rbp)
movl -0x1c(%rbp), %eax
sarl $0x10, %eax
andl $0xff, %eax
movb %al, -0x1e(%rbp)
movl -0x1c(%rbp), %eax
sarl $0x18, %eax
andl $0xff, %eax
movb %al, -0x1d(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
andl $-0x2, %eax
movl %eax, -0x24(%rbp)
leaq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1130
cmpq $0x1, %rax
je 0x233f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2391
movq -0x18(%rbp), %rdi
movslq -0x24(%rbp), %rsi
movq -0x10(%rbp), %rcx
movl $0x1, %edx
callq 0x1130
cmpq $0x1, %rax
je 0x2364
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2391
leaq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1130
cmpq $0x1, %rax
je 0x238a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2391
movl $0x0, -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/extracters/cpytap/tapeio.c
// Function: SkipToNextTapeMark
unsigned int SkipToNextTapeMark(
  FILE *handle
)
{
  long pos = ftell(handle);
  uint8 meta[4];
  uint32 bc;

  for (;;) {
    /*
     * Note: any I/O errors are treated as "end of medium" detection.
     */
    if (fread(meta, sizeof(meta), 1, handle) != 1)
      return ST_EOM;

    bc = (((unsigned int)meta[3]) << 24) |
         (((unsigned int)meta[2]) << 16) |
         (((unsigned int)meta[1]) << 8) |
         (unsigned int)meta[0];

    switch (bc) {
      case ST_EOM:
      case ST_TM:
        return bc;

      default:
        bc &= ST_LENGTH;

        /*
         * Now position the file after this record.
         */
        pos += RECLEN(bc) + (2 * sizeof(meta));
        if (fseek(handle, pos, SEEK_SET) != 0)
          return ST_EOM;
        break;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10b0
movq %rax, -0x18(%rbp)
leaq -0x1c(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1060
cmpq $0x1, %rax
je 0x23df
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x243f
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
incl %eax
subl $0x1, %eax
ja 0x23f9
jmp 0x23f1
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x243f
movl -0x20(%rbp), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
andl $-0x2, %eax
movl %eax, %eax
addq $0x8, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x10d0
cmpl $0x0, %eax
je 0x2438
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x243f
jmp 0x243a
jmp 0x23b9
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/extracters/cpytap/tapeio.c
// Function: WriteTapeMark
int WriteTapeMark(
  FILE *handle,
  int backup
)
{
  uint32 tm = 0;

  if (fwrite(&tm, sizeof(tm), 1, handle) != 1)
    return -1;

  if (backup)
    if (fseek(handle, -sizeof(tm), SEEK_CUR) != 0)
      return -1;

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rcx
leaq -0x18(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x1130
cmpq $0x1, %rax
je 0x248c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x24be
cmpl $0x0, -0x14(%rbp)
je 0x24b7
movq -0x10(%rbp), %rdi
movq $-0x4, %rsi
movl $0x1, %edx
callq 0x10d0
cmpl $0x0, %eax
je 0x24b5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x24be
jmp 0x24b7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/extracters/cpytap/tapeio.c
// Function: flushTapeBuffering
int flushTapeBuffering(
  FILE *handle
)
{
  uint32 count = occupied;

  occupied = 0;

  if (count != 0)
    return WriteTapeRecord(handle, buffer, count);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl 0xb502(%rip), %eax      # 0xda04
movl %eax, -0x14(%rbp)
movl $0x0, 0xb4f5(%rip)      # 0xda04
cmpl $0x0, -0x14(%rbp)
je 0x252d
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0xb4ed(%rip), %rsi      # 0xda10
callq 0x22c0
movl %eax, -0x4(%rbp)
jmp 0x2534
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)