LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
xorl %r14d, %r14d
movl %r14d, 0x206136(%rip)   # 0x207600
movl %r14d, 0x3cef(%rip)     # 0x51c0
leaq 0x4108(%rip), %rdi      # 0x55e0
movl $0x200000, %edx         # imm = 0x200000
xorl %esi, %esi
callq 0x10a0
leaq 0x3ce5(%rip), %rdi      # 0x51d0
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x10a0
leaq 0x206112(%rip), %rdi    # 0x207610
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x10a0
movl $0x100, 0x2060f0(%rip)  # imm = 0x100
movl %r14d, 0x40b5(%rip)     # 0x55d0
movl %r14d, 0x40b2(%rip)     # 0x55d4
movq 0x8(%rbx), %rdi
callq 0x162b
callq 0x1874
movslq 0x40a1(%rip), %rsi      # 0x55d8
leaq 0x1af7(%rip), %rdi      # 0x3035
xorl %eax, %eax
callq 0x1080
cmpl $0x3, %ebp
jl 0x157c
movl %ebp, %r15d
movl $0x2, %r12d
leaq 0x1af5(%rip), %r14      # 0x304f
movq (%rbx,%r12,8), %rdi
callq 0x12d1
movslq %eax, %rsi
movq (%rbx,%r12,8), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1080
incq %r12
cmpq %r12, %r15
jne 0x155a
callq 0x1874
movslq 0x4050(%rip), %rsi      # 0x55d8
leaq 0x1ada(%rip), %rdi      # 0x3069
xorl %eax, %eax
callq 0x1080
movslq 0x4033(%rip), %rsi      # 0x55d0
movslq 0x4030(%rip), %rdx      # 0x55d4
leaq 0x1ad4(%rip), %rdi      # 0x307f
xorl %eax, %eax
callq 0x1080
movq 0x8(%rbx), %rdi
leaq 0x1ada(%rip), %rsi      # 0x3097
callq 0x1110
testq %rax, %rax
je 0x1615
movq %rax, %rbx
leaq 0x400f(%rip), %rdi      # 0x55e0
movslq 0x4014(%rip), %rdx      # 0x55ec
incq %rdx
movl $0x4, %esi
movq %rax, %rcx
callq 0x1130
movq %rbx, %rdi
callq 0x1060
cmpl $0x0, 0x3bc9(%rip)      # 0x51c0
je 0x160a
leaq 0x1aef(%rip), %rdi      # 0x30ef
callq 0x1040
callq 0x124c
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ae4(%rip), %rdi      # 0x3100
callq 0x1040
movl $0x2, %edi
callq 0x1120
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x1070
testl %eax, %eax
jle 0x1727
movslq %ebx, %rcx
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq 0x3edb(%rip), %rdx      # 0x55e0
leaq (%rdx,%rcx,4), %rcx
addq $0x4, %rcx
xorl %edx, %edx
movsbl (%r14,%rdx), %esi
movl %esi, -0x4(%rcx,%rdx,4)
movl $0x0, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x170f
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movslq %edi, %rcx
leaq 0x3ea5(%rip), %rdx      # 0x55e0
movl (%rdx,%rcx,4), %eax
testl %eax, %eax
je 0x176f
leaq (%rdx,%rcx,4), %rcx
addq $0x4, %rcx
xorl %esi, %esi
leaq 0x203e9d(%rip), %rdi    # 0x2055f0
leaq 0x1(%rsi), %rdx
movb %al, (%rsi,%rdi)
movl (%rcx,%rsi,4), %eax
testl %eax, %eax
je 0x1771
cmpq $0x1fff, %rsi           # imm = 0x1FFF
movq %rdx, %rsi
jb 0x1753
jmp 0x1771
xorl %edx, %edx
leaq 0x203e78(%rip), %rax    # 0x2055f0
movb $0x0, (%rdx,%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq %edi, %rcx
leaq 0x3e3f(%rip), %r12      # 0x55e0
movl (%r12,%rcx,4), %eax
testl %eax, %eax
sete %dl
testl %ecx, %ecx
sete %cl
xorl %r14d, %r14d
orb %dl, %cl
jne 0x1828
movq %rsi, %rbx
movl %edi, %ebp
xorl %r14d, %r14d
leaq 0x203e2b(%rip), %r15    # 0x2055f0
movl %eax, %r13d
movslq %ebp, %rax
movl 0x24(%r12,%rax,4), %ecx
testl %ecx, %ecx
je 0x17fb
leaq (%r12,%rax,4), %rax
addq $0x28, %rax
xorl %esi, %esi
leaq 0x1(%rsi), %rdx
movb %cl, (%rsi,%r15)
cmpq $0x1ffe, %rsi           # imm = 0x1FFE
ja 0x17fd
movl (%rax,%rsi,4), %ecx
movq %rdx, %rsi
testl %ecx, %ecx
jne 0x17de
jmp 0x17fd
xorl %edx, %edx
movb $0x0, (%rdx,%r15)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x10b0
testl %eax, %eax
cmovnel %r13d, %eax
cmovel %ebp, %r14d
testl %eax, %eax
je 0x1828
cltq
movl (%r12,%rax,4), %eax
movl %r13d, %ebp
testl %eax, %eax
jne 0x17c5
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
leaq 0x3d64(%rip), %rbx      # 0x55e0
movl 0x3d66(%rip), %edi      # 0x55e8
movl %edi, 0x205d68(%rip)    # 0x2075f0
movl 0x3d5e(%rip), %eax      # 0x55ec
movl %eax, 0x3d44(%rip)      # 0x55d8
leaq 0x17ff(%rip), %rsi      # 0x309a
callq 0x178c
cltq
movl 0x4(%rbx,%rax,4), %eax
movl %eax, 0x205d48(%rip)    # 0x2075f4
movl 0x205d3e(%rip), %edi    # 0x2075f0
leaq 0x17ea(%rip), %rsi      # 0x30a3
callq 0x178c
cltq
movl 0x4(%rbx,%rax,4), %eax
movl %eax, 0x205d2e(%rip)    # 0x2075f8
movl 0x205d20(%rip), %edi    # 0x2075f0
leaq 0x17d9(%rip), %rsi      # 0x30b0
callq 0x178c
cltq
movl 0x4(%rbx,%rax,4), %eax
movl %eax, 0x205d14(%rip)    # 0x2075fc
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, 0x205d01(%rip)    # 0x207600
movl %edi, 0x205cff(%rip)    # 0x207604
cmpl $0x7ffff, %edi          # imm = 0x7FFFF
jg 0x1a07
leaq 0x3cc8(%rip), %r13      # 0x55e0
xorl %ebp, %ebp
leaq 0x203ccf(%rip), %r14    # 0x2055f0
leaq 0x1792(%rip), %r15      # 0x30ba
movslq %edi, %rax
movl (%r13,%rax,4), %ebx
cmpl 0x205cc2(%rip), %eax    # 0x2075f8
jne 0x1986
movslq 0x3cbd(%rip), %rax      # 0x55fc
movl (%r13,%rax,4), %ecx
testl %ecx, %ecx
je 0x1972
leaq 0x4(,%rax,4), %rax
addq %r13, %rax
xorl %esi, %esi
leaq 0x1(%rsi), %rdx
movb %cl, (%rsi,%r14)
cmpq $0x1ffe, %rsi           # imm = 0x1FFE
ja 0x1974
movl (%rax,%rsi,4), %ecx
movq %rdx, %rsi
testl %ecx, %ecx
jne 0x1955
jmp 0x1974
xorl %edx, %edx
movb $0x0, (%rdx,%r14)
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1080
movslq %ebx, %r12
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x4, %ecx
movl %ebx, %edx
movl %edx, %esi
andl $0xfe, %esi
cmpl $0x1e, %esi
cmovael %ebp, %eax
sarl $0x8, %edx
decl %ecx
jne 0x1995
testl %eax, %eax
je 0x1a16
movl %ebx, %edi
callq 0x1a9e
movl 0x205c49(%rip), %eax    # 0x207604
leal 0x1(%rax), %edi
movl %edi, 0x205c40(%rip)    # 0x207604
movl 0x37f6(%rip), %ecx      # 0x51c0
cmpl 0x3c00(%rip), %ecx      # 0x55d0
jle 0x19d8
movl %ecx, 0x3bf8(%rip)      # 0x55d0
movl 0x205c22(%rip), %ecx    # 0x207600
cmpl 0x3bf0(%rip), %ecx      # 0x55d4
jle 0x19ec
movl %ecx, 0x3be8(%rip)      # 0x55d4
testl %ecx, %ecx
je 0x19fd
cmpl $0x7ffff, %eax          # imm = 0x7FFFF
jl 0x1928
jmp 0x1a07
movl $0x80000, 0x205bfd(%rip) # imm = 0x80000
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x171d(%rip), %rdi      # 0x313a
callq 0x1040
movslq 0x205bdb(%rip), %rsi    # 0x207604
leaq 0x1690(%rip), %rdi      # 0x30c0
movq %r12, %rdx
xorl %eax, %eax
callq 0x1080
leaq 0x1695(%rip), %rdi      # 0x30d6
xorl %eax, %eax
callq 0x1080
movl $0x4, %ebp
leaq 0x1691(%rip), %r14      # 0x30e5
movzbl %bl, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1080
sarl $0x8, %ebx
decl %ebp
jne 0x1a54
movl $0xa, %edi
callq 0x1030
movl $0x1, %edi
callq 0x1120
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movl %edi, %eax
andl $0xff, %eax
movq %rdi, %rbx
je 0x1aba
movl %eax, %eax
leaq 0x360c(%rip), %rcx      # 0x50c0
callq *(%rcx,%rax,8)
movq %rbx, %rdi
movl %edi, %eax
shrl $0x8, %eax
andl $0xff, %eax
je 0x1ad5
movl %eax, %eax
leaq 0x35f1(%rip), %rcx      # 0x50c0
callq *(%rcx,%rax,8)
movq %rbx, %rdi
movl %edi, %eax
shrl $0x10, %eax
andl $0xff, %eax
je 0x1af0
movl %eax, %eax
leaq 0x35d6(%rip), %rcx      # 0x50c0
callq *(%rcx,%rax,8)
movq %rbx, %rdi
cmpl $0x1000000, %edi        # imm = 0x1000000
jae 0x1afa
popq %rbx
retq
shrl $0x18, %edi
leaq 0x35bc(%rip), %rax      # 0x50c0
popq %rbx
jmpq *(%rax,%rdi,8)
// File: /workspace/github_c_makefile_star2_O3/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 %rax
xorl %eax, %eax
movl %eax, 0x205acc(%rip)    # 0x207600
movl %eax, 0x3686(%rip)      # 0x51c0
leaq 0x3a9f(%rip), %rdi      # 0x55e0
movl $0x200000, %edx         # imm = 0x200000
xorl %esi, %esi
callq 0x10a0
leaq 0x367c(%rip), %rdi      # 0x51d0
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x10a0
leaq 0x205aa9(%rip), %rdi    # 0x207610
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x10a0
movl $0x100, 0x205a87(%rip)  # imm = 0x100
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_call
void inst_call() {
  rp++;
  TORS = ip;
  ip = TOS - 1;
  inst_drop();
}

// Assembly:
movslq 0x20592a(%rip), %rax    # 0x207600
leaq 0x1(%rax), %rcx
movl %ecx, 0x205920(%rip)    # 0x207600
movl 0x20591e(%rip), %ecx    # 0x207604
leaq 0x205923(%rip), %rdx    # 0x207610
movl %ecx, 0x4(%rdx,%rax,4)
movslq 0x34c8(%rip), %rax      # 0x51c0
leaq 0x34d1(%rip), %rcx      # 0x51d0
movl (%rcx,%rax,4), %edx
decl %edx
leal -0x1(%rax), %esi
movl %edx, 0x2058f7(%rip)    # 0x207604
movl $0x0, (%rcx,%rax,4)
movl %esi, 0x34a6(%rip)      # 0x51c0
testq %rax, %rax
jle 0x1d20
retq
movl $0x80000, 0x2058da(%rip) # imm = 0x80000
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movslq 0x348e(%rip), %rcx      # 0x51c0
leaq 0x3497(%rip), %rdx      # 0x51d0
movl (%rdx,%rcx,4), %eax
leal -0x2(%rcx), %esi
movl %esi, 0x347b(%rip)      # 0x51c0
cmpl $0x0, -0x4(%rdx,%rcx,4)
je 0x1d76
movslq 0x2058ad(%rip), %rcx    # 0x207600
leaq 0x1(%rcx), %rdx
movl %edx, 0x2058a3(%rip)    # 0x207600
movl 0x2058a1(%rip), %edx    # 0x207604
leaq 0x2058a6(%rip), %rsi    # 0x207610
movl %edx, 0x4(%rsi,%rcx,4)
decl %eax
movl %eax, 0x20588e(%rip)    # 0x207604
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movslq 0x3316(%rip), %rax      # 0x51c0
leaq 0x331f(%rip), %rcx      # 0x51d0
movslq (%rcx,%rax,4), %rdx
leal 0x5(%rdx), %esi
cmpl $0x4, %esi
ja 0x1eef
leaq 0x1140(%rip), %rdx      # 0x3004
movslq (%rdx,%rsi,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
movl $0x7ffffffe, %edx       # imm = 0x7FFFFFFE
jmp 0x1ef9
leal -0x1(%rax), %edx
jmp 0x1ef9
movl $0x80000, %edx          # imm = 0x80000
jmp 0x1ef9
movl 0x20571a(%rip), %edx    # 0x207600
jmp 0x1ef9
movl $0x80000001, %edx       # imm = 0x80000001
jmp 0x1ef9
leaq 0x36ea(%rip), %rsi      # 0x55e0
movl (%rsi,%rdx,4), %edx
movl %edx, (%rcx,%rax,4)
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movslq 0x32bc(%rip), %rax      # 0x51c0
leaq 0x32c5(%rip), %rcx      # 0x51d0
movl (%rcx,%rax,4), %edx
cmpq $0x80000, %rdx          # imm = 0x80000
ja 0x1f3c
movl -0x4(%rcx,%rax,4), %esi
leaq 0x36be(%rip), %rdi      # 0x55e0
movl %esi, (%rdi,%rdx,4)
xorl %edx, %edx
movl %edx, (%rcx,%rax,4)
movl %edx, -0x4(%rcx,%rax,4)
leal -0x2(%rax), %ecx
movl %ecx, 0x3289(%rip)      # 0x51c0
cmpl $0x1, %eax
jg 0x1f46
movl $0x80000, 0x2056be(%rip) # imm = 0x80000
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movslq 0x31c8(%rip), %rcx      # 0x51c0
leaq 0x31d1(%rip), %rsi      # 0x51d0
movl -0x4(%rsi,%rcx,4), %eax
cltd
idivl (%rsi,%rcx,4)
movl %eax, (%rsi,%rcx,4)
movl %edx, -0x4(%rsi,%rcx,4)
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movslq 0x3105(%rip), %rax      # 0x51c0
leaq 0x310e(%rip), %rdx      # 0x51d0
movl -0x4(%rdx,%rax,4), %edi
movl (%rdx,%rax,4), %ecx
leaq -0x1(%rax), %rsi
testl %ecx, %ecx
js 0x20f5
testl %edi, %edi
setns %r8b
testl %ecx, %ecx
sete %r9b
sarl %cl, %edi
orb %r8b, %r9b
jne 0x20f9
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
shrl %cl, %r8d
notl %r8d
orl %r8d, %edi
jmp 0x20f9
negb %cl
shll %cl, %edi
movl %edi, -0x4(%rdx,%rax,4)
movl $0x0, (%rdx,%rax,4)
movl %esi, 0x30b6(%rip)      # 0x51c0
testl %eax, %eax
jle 0x210f
retq
movl $0x80000, 0x2054eb(%rip) # imm = 0x80000
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_zret
void inst_zret() {
  if (TOS == 0) {
    inst_drop();
    ip = TORS;
    rp--;
  }
}

// Assembly:
movslq 0x309f(%rip), %rax      # 0x51c0
leaq 0x30a8(%rip), %rcx      # 0x51d0
cmpl $0x0, (%rcx,%rax,4)
je 0x212f
retq
decl %eax
movl %eax, 0x3089(%rip)      # 0x51c0
movslq 0x2054c2(%rip), %rax    # 0x207600
leaq 0x2054cb(%rip), %rcx    # 0x207610
movl (%rcx,%rax,4), %ecx
movl %ecx, 0x2054b6(%rip)    # 0x207604
decl %eax
movl %eax, 0x2054aa(%rip)    # 0x207600
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movb (%rdi), %cl
leal -0x31(%rcx), %edx
xorl %eax, %eax
cmpb $0x7, %dl
ja 0x117e
incq %rdi
xorl %eax, %eax
movzbl %cl, %ecx
leal (%rax,%rax,4), %eax
leal (%rcx,%rax,2), %eax
addl $-0x30, %eax
movb (%rdi), %cl
leal -0x31(%rcx), %edx
incq %rdi
cmpb $0x8, %dl
jb 0x1165
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x1110
movl %eax, (%r14)
movq (%r15), %rcx
cmpb $0x2c, (%rcx)
jne 0x15a9
cmpb $0x0, 0x1(%rcx)
je 0x15c4
incq %rcx
testl %eax, %eax
sete %dl
cmpl $0x65, %eax
setge %al
orb %dl, %al
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x15c9
movq %rcx, (%rbx)
xorl %eax, %eax
jmp 0x15c9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10000, %rsp          # imm = 0x10000
movl %esi, %ebp
movq %rdi, %r14
leaq 0x1b91(%rip), %rsi      # 0x3570
callq 0x10f0
testq %rax, %rax
je 0x1a62
movq %rax, %rbx
movslq %ebp, %r15
movq %rsp, %r12
movl $0x1, %esi
movq %r12, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1060
testq %rax, %rax
je 0x1a30
movq %rbx, %rdi
callq 0x1050
testl %eax, %eax
jne 0x1a5a
movq 0x36cb(%rip), %rdi      # 0x50e8
movq %r12, %rsi
movl %ebp, %edx
callq 0x1f10
testl %eax, %eax
je 0x19f2
callq 0x12ce
movq 0x36b1(%rip), %rdi      # 0x50e8
xorl %esi, %esi
callq 0x200d
testl %eax, %eax
jne 0x1a6a
movq %rbx, %rdi
callq 0x1070
addq $0x10000, %rsp          # imm = 0x10000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x12aa
movq %r14, %rdi
callq 0x1318
callq 0x12f3
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rbx
subq $0x10008, %rsp          # imm = 0x10008
movq %rsp, %rbx
movq 0x365e(%rip), %rdi      # 0x50e0
movq %rbx, %rsi
movl $0x10000, %edx          # imm = 0x10000
callq 0x1d9f
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x1ac6
testl %ebp, %ebp
je 0x1ab4
movq 0x3647(%rip), %rdi      # 0x50e8
movq %rbx, %rsi
movl %ebp, %edx
callq 0x1f10
testl %eax, %eax
je 0x1a7b
callq 0x1361
movq 0x362d(%rip), %rdi      # 0x50e8
xorl %esi, %esi
callq 0x200d
testl %eax, %eax
jne 0x1ad2
movl %ebp, %eax
addq $0x10008, %rsp          # imm = 0x10008
popq %rbx
popq %rbp
retq
callq 0x133c
nop
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x1a87(%rip), %rsi      # 0x3570
movq %rax, %rdi
callq 0x10f0
testq %rax, %rax
je 0x1b1e
movq %rax, %r14
movq %rax, %rdi
callq 0x1b2f
movl %eax, %ebp
movq %r14, %rdi
callq 0x1080
movl %ebp, %eax
decl %eax
cmpl $-0x3, %eax
ja 0x1b25
movq %r14, %rdi
callq 0x1070
jmp 0x1b28
movl $0xfffffffd, %ebp       # imm = 0xFFFFFFFD
jmp 0x1b28
movq %r14, (%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
xorl %esi, %esi
callq 0x10e0
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
testl %eax, %eax
je 0x1d45
leaq 0x1907(%rip), %rsi      # 0x35f5
movq %rbx, %rdi
callq 0x10f0
testq %rax, %rax
je 0x1d45
movq %rax, %r15
leaq 0x4(%rsp), %rdi
movl $0x0, (%rdi)
movl $0x4, %esi
movl $0x2, %edx
movq %rax, %rcx
callq 0x1130
cmpq $0x2, %rax
jne 0x1d30
movq %r15, %rdi
callq 0x1080
movq %r15, (%r14)
xorl %ebp, %ebp
jmp 0x1d45
movq %r15, %rdi
callq 0x1070
movq %rbx, %rdi
callq 0x1030
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x1895(%rip), %rsi      # 0x35f8
movq %rax, %rdi
callq 0x10f0
testq %rax, %rax
je 0x1d8e
movq %rax, %r14
movq %rax, %rdi
callq 0x1b2f
movl %eax, %ebp
decl %eax
cmpl $-0x3, %eax
ja 0x1d95
movq %r14, %rdi
callq 0x1070
jmp 0x1d98
movl $0xfffffffd, %ebp       # imm = 0xFFFFFFFD
jmp 0x1d98
movq %r14, (%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
callq 0x10b0
movq %rax, %r15
leaq 0xc(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x1060
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpq $0x1, %rax
jne 0x1ef7
movzbl 0xf(%rsp), %r12d
shll $0x18, %r12d
movzwl 0xd(%rsp), %eax
shll $0x8, %eax
movzbl 0xc(%rsp), %r13d
orl %eax, %r13d
leal (%r12,%r13), %eax
incl %eax
cmpl $0x2, %eax
jae 0x1eda
orl %r12d, %r13d
movl %r13d, %ebx
jmp 0x1ef7
leal 0x1(%r13), %eax
andl $-0x2, %eax
leaq (%rax,%r15), %rsi
addq $0x8, %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x10d0
testl %eax, %eax
je 0x1f07
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
andl $0x80000000, %r12d      # imm = 0x80000000
jmp 0x1ed2
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x10b0
movq %rax, %r14
leaq 0x4(%rsp), %r15
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1060
cmpq $0x1, %rax
jne 0x2000
movl 0x4(%rsp), %eax
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x1ffe
andl $0xffffff, %eax         # imm = 0xFFFFFF
incl %eax
andl $-0x2, %eax
addq %rax, %r14
addq $0x8, %r14
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x10d0
testl %eax, %eax
je 0x1fb3
jmp 0x2000
movl %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %r14
leaq 0xc(%rsp), %rdi
movl $0x0, (%rdi)
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x1130
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpq $0x1, %rax
jne 0x2060
testl %ebp, %ebp
je 0x205e
movq %r14, %rdi
movq $-0x4, %rsi
movl $0x1, %edx
callq 0x10d0
testl %eax, %eax
jne 0x2060
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/simh[P]simtools/extracters/cpytap/tapeio.c
// Function: writeTapeBuffering
int writeTapeBuffering(
  FILE *handle,
  char ch
)
{
  buffer[occupied++] = ch;

  if (occupied == rLength) {
    occupied = 0;
    return WriteTapeRecord(handle, buffer, rLength);
  }
  return 0;
}

// Assembly:
movslq 0xb95e(%rip), %rax      # 0xda04
leal 0x1(%rax), %edx
movl %edx, 0xb955(%rip)      # 0xda04
leaq 0xb95a(%rip), %rcx      # 0xda10
movb %sil, (%rax,%rcx)
cmpl 0xb940(%rip), %edx      # 0xda00
jne 0x20d8
movl $0x0, 0xb938(%rip)      # 0xda04
leaq 0xb93d(%rip), %rsi      # 0xda10
jmp 0x1f10
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/igaw[P]jitterdebugger/jitterdebugger.c
// Function: usage
static void __attribute__((noreturn)) usage(int status)
{
	printf("jitterdebugger [options]\n");
	printf("\n");
	printf("General usage:\n");
	printf("  -h, --help            Print this help\n");
	printf("  -v, --verbose         Print live statistics\n");
	printf("      --version         Print version of jitterdebugger\n");
	printf("  -o, --output DIR      Store collected data into DIR\n");
	printf("  -c, --command CMD	Execute CMD (workload) in background\n");
	printf("\n");
	printf("Sampling:\n");
	printf("  -l, --loops VALUE     Max number of measurements\n");
	printf("  -D, --duration TIME   Specify a length for the test run.\n");
	printf("                        Append 'm', 'h', or 'd' to specify minutes, hours or days.\n");
	printf("  -b, --break VALUE     Stop if max latency exceeds VALUE.\n");
	printf("                        Also the tracers\n");
	printf("  -N, --nsec            Meassurement in nano seconds\n");
	printf("  -i, --interval TIME   Sleep interval for sampling threads in microseconds\n");
	printf("                        or nano seconds (see -N/--nsec)\n");
	printf("  -n			Send samples to host:port\n");
	printf("  -s			Store samples into --output DIR\n");
	printf("\n");
	printf("Threads: \n");
	printf("  -a, --affinity CPUSET Core affinity specification\n");
	printf("                        e.g. 0,2,5-7 starts a thread on first, third and last two\n");
	printf("                        cores on a 8-core system.\n");
	printf("                        May also be set in hexadecimal with '0x' prefix\n");
	printf("  -p, --priority PRI    Worker thread priority. [1..98]\n");

	exit(status);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x2171(%rip), %rdi      # 0x59c1
callq 0x20a0
movl $0xa, %edi
callq 0x2050
leaq 0x2174(%rip), %rdi      # 0x59da
callq 0x20a0
leaq 0x2177(%rip), %rdi      # 0x59e9
callq 0x20a0
leaq 0x2193(%rip), %rdi      # 0x5a11
callq 0x20a0
leaq 0x21b5(%rip), %rdi      # 0x5a3f
callq 0x20a0
leaq 0x21e1(%rip), %rdi      # 0x5a77
callq 0x20a0
leaq 0x220b(%rip), %rdi      # 0x5aad
callq 0x20a0
movl $0xa, %edi
callq 0x2050
leaq 0x222e(%rip), %rdi      # 0x5ae6
callq 0x20a0
leaq 0x222c(%rip), %rdi      # 0x5af0
callq 0x20a0
leaq 0x2253(%rip), %rdi      # 0x5b23
callq 0x20a0
leaq 0x2282(%rip), %rdi      # 0x5b5e
callq 0x20a0
leaq 0x22c9(%rip), %rdi      # 0x5bb1
callq 0x20a0
leaq 0x22f8(%rip), %rdi      # 0x5bec
callq 0x20a0
leaq 0x2315(%rip), %rdi      # 0x5c15
callq 0x20a0
leaq 0x233e(%rip), %rdi      # 0x5c4a
callq 0x20a0
leaq 0x237e(%rip), %rdi      # 0x5c96
callq 0x20a0
leaq 0x23aa(%rip), %rdi      # 0x5cce
callq 0x20a0
leaq 0x23bf(%rip), %rdi      # 0x5cef
callq 0x20a0
movl $0xa, %edi
callq 0x2050
leaq 0x23d0(%rip), %rdi      # 0x5d16
callq 0x20a0
leaq 0x23ce(%rip), %rdi      # 0x5d20
callq 0x20a0
leaq 0x23f6(%rip), %rdi      # 0x5d54
callq 0x20a0
leaq 0x243c(%rip), %rdi      # 0x5da6
callq 0x20a0
leaq 0x2462(%rip), %rdi      # 0x5dd8
callq 0x20a0
leaq 0x249e(%rip), %rdi      # 0x5e20
callq 0x20a0
movl %ebx, %edi
callq 0x23b0
// File: /workspace/github_c_makefile_star2_O3/igaw[P]jitterdebugger/jitterdebugger.c
// Function: display_stats
static void *display_stats(void *arg)
{
	struct stats *s = arg;
	unsigned int i;

	for (i = 0; i < num_threads; i++)
		printf("\n");

	while (!READ_ONCE(jd_shutdown)) {
		printf(VT100_CURSOR_UP, num_threads);

		__display_stats(s);

		fflush(stdout);
		usleep(100 * 1000); /* 100 ms interval */
	}

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x47bb(%rip)      # 0x84b0
je 0x3d0d
xorl %ebp, %ebp
movl $0xa, %edi
callq 0x2050
incl %ebp
cmpl 0x47a5(%rip), %ebp      # 0x84b0
jb 0x3cf9
cmpl $0x0, 0x47a0(%rip)      # 0x84b4
jne 0x3d57
leaq 0x1ac4(%rip), %r14      # 0x57e1
movq 0x42ac(%rip), %r15      # 0x7fd0
movl 0x4786(%rip), %esi      # 0x84b0
movq %r14, %rdi
xorl %eax, %eax
callq 0x2150
movq %rbx, %rdi
callq 0x3d64
movq (%r15), %rdi
callq 0x22b0
movl $0x186a0, %edi          # imm = 0x186A0
callq 0x2460
cmpl $0x0, 0x475f(%rip)      # 0x84b4
je 0x3d24
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/igaw[P]jitterdebugger/jitterdebugger.c
// Function: _display_stats
static void __display_stats(struct stats *s)
{
	unsigned int i;

	for (i = 0; i < num_threads; i++) {
		printf("T:%2u (%5lu) A:%2u C:%10" PRIu64
			" Min:%10" PRIu64 " Avg:%8.2f Max:%10" PRIu64 " "
			VT100_ERASE_EOL "\n",
			i, (long)s[i].tid, s[i].affinity,
			s[i].count,
			s[i].min,
			(double) s[i].total / (double) s[i].count,
			s[i].max);
	}
}

// Assembly:
cmpl $0x0, 0x4745(%rip)      # 0x84b0
je 0x3e07
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0x8, %rbx
xorl %r14d, %r14d
leaq 0x1a5c(%rip), %r15      # 0x57e7
movslq (%rbx), %rdx
movl 0x4(%rbx), %ecx
movq 0x10(%rbx), %r9
movdqu 0x30(%rbx), %xmm0
movdqa %xmm0, %xmm1
pand 0x126a(%rip), %xmm1     # 0x5010
por 0x1272(%rip), %xmm1     # 0x5020
psrlq $0x20, %xmm0
por 0x1275(%rip), %xmm0     # 0x5030
subpd 0x127d(%rip), %xmm0     # 0x5040
addpd %xmm1, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
divsd %xmm1, %xmm0
movq 0x8(%rbx), %rax
movq 0x38(%rbx), %r8
movq %rax, (%rsp)
movq %r15, %rdi
movl %r14d, %esi
movb $0x1, %al
callq 0x2150
incq %r14
movl 0x46bb(%rip), %eax      # 0x84b0
addq $0x50, %rbx
cmpq %rax, %r14
jb 0x3d8b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/igaw[P]jitterdebugger/jd_work.c
// Function: start_workload
int start_workload(const char *cmd)
{
	int err;

	if (!cmd)
		return 0;

	bpid = fork();
	if (bpid > 0)
		return 0;
	if (bpid < 0)
		return errno;

	err = setpgid(0,0);
	if (err)
		err_handler(errno, "setpgid()");

	printf("start background workload: %s\n", cmd);
	err = execl("/bin/sh", "sh", "-c", cmd, (char *)0);
	if (err) {
		err_handler(err, "execl()");
		exit(EXIT_FAILURE);
	}

	exit(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x495d
movq %rdi, %rbx
callq 0x2440
movl %eax, 0x3b68(%rip)      # 0x84b8
testl %eax, %eax
jg 0x495d
jns 0x4966
callq 0x2070
movl (%rax), %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %edi, %edi
xorl %esi, %esi
callq 0x23a0
testl %eax, %eax
je 0x4996
callq 0x2070
movl (%rax), %edi
leaq 0x15f6(%rip), %rsi      # 0x5f77
leaq 0x1602(%rip), %rdx      # 0x5f8a
leaq 0x1605(%rip), %rcx      # 0x5f94
xorl %eax, %eax
callq 0x418c
leaq 0x1606(%rip), %rdi      # 0x5fa3
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2150
leaq 0x1614(%rip), %rdi      # 0x5fc2
leaq 0x1612(%rip), %rsi      # 0x5fc7
leaq 0x160e(%rip), %rdx      # 0x5fca
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x2430
testl %eax, %eax
jne 0x49d4
xorl %edi, %edi
callq 0x23b0
leaq 0x15f2(%rip), %rsi      # 0x5fcd
leaq 0x15a8(%rip), %rdx      # 0x5f8a
leaq 0x15ab(%rip), %rcx      # 0x5f94
movl %eax, %edi
xorl %eax, %eax
callq 0x418c
movl $0x1, %edi
callq 0x23b0
// File: /workspace/github_c_makefile_star2_O3/igaw[P]jitterdebugger/jd_work.c
// Function: stop_workload
void stop_workload(void)
{
	int status;
	int err;

	if (bpid == 0)
		return;

	err = killpg(bpid, SIGTERM);
	if (err)
		err_handler(errno, "kill()");

	if (!waitpid(bpid, &status, 0))
		err_handler(errno, "waitpid()");

	err = WEXITSTATUS(status);
	if (WIFEXITED(status) && err)
		warn_handler("workload exited with %d", err);
}

// Assembly:
movl 0x3ab6(%rip), %edi      # 0x84b8
testl %edi, %edi
je 0x4ab0
pushq %rax
movl $0xf, %esi
callq 0x22c0
testl %eax, %eax
je 0x4a3c
callq 0x2070
movl (%rax), %edi
leaq 0x15b7(%rip), %rsi      # 0x5fde
leaq 0x155c(%rip), %rdx      # 0x5f8a
leaq 0x15b9(%rip), %rcx      # 0x5fee
xorl %eax, %eax
callq 0x418c
movl 0x3a76(%rip), %edi      # 0x84b8
leaq 0x4(%rsp), %rsi
xorl %edx, %edx
callq 0x2310
testl %eax, %eax
jne 0x4a75
callq 0x2070
movl (%rax), %edi
leaq 0x159c(%rip), %rsi      # 0x5ffc
leaq 0x1523(%rip), %rdx      # 0x5f8a
leaq 0x1580(%rip), %rcx      # 0x5fee
xorl %eax, %eax
callq 0x418c
movl 0x4(%rsp), %eax
movl %eax, %ecx
shrl $0x8, %ecx
testb $0x7f, %al
setne %al
andl $0xff, %ecx
sete %dl
orb %al, %dl
jne 0x4aac
leaq 0x1578(%rip), %rdi      # 0x600f
leaq 0x14ec(%rip), %rsi      # 0x5f8a
leaq 0x1549(%rip), %rdx      # 0x5fee
xorl %eax, %eax
callq 0x425b
addq $0x8, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/igaw[P]jitterdebugger/jd_sysinfo.c
// Function: collect_system_info
struct system_info *collect_system_info(void)
{
	struct system_info *info;
	struct utsname buf;
	int err;

	info = malloc(sizeof(*info));
	if (!info)
		err_handler(errno, "malloc()");

	err = uname(&buf);
	if (err)
		err_handler(errno, "Could not retrieve name and information about current kernel");

	info->sysname = jd_strdup(buf.sysname);
	info->nodename = jd_strdup(buf.nodename);
	info->release = jd_strdup(buf.release);
	info->version = jd_strdup(buf.version);
	info->machine = jd_strdup(buf.machine);

	info->cpus_online = get_nprocs();

	return info;
}

// Assembly:
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movl $0x30, %edi
callq 0x22a0
movq %rax, %rbx
testq %rax, %rax
jne 0x4af1
callq 0x2070
movl (%rax), %edi
leaq 0x808(%rip), %rsi       # 0x52e4
leaq 0x154e(%rip), %rdx      # 0x6031
leaq 0x1554(%rip), %rcx      # 0x603e
xorl %eax, %eax
callq 0x418c
leaq 0xa(%rsp), %rdi
callq 0x2170
testl %eax, %eax
je 0x4b22
callq 0x2070
movl (%rax), %edi
leaq 0x1545(%rip), %rsi      # 0x6052
leaq 0x151d(%rip), %rdx      # 0x6031
leaq 0x1523(%rip), %rcx      # 0x603e
xorl %eax, %eax
callq 0x418c
leaq 0xa(%rsp), %rdi
callq 0x4774
movq %rax, (%rbx)
leaq 0x4b(%rsp), %rdi
callq 0x4774
movq %rax, 0x8(%rbx)
leaq 0x8c(%rsp), %rdi
callq 0x4774
movq %rax, 0x10(%rbx)
leaq 0xcd(%rsp), %rdi
callq 0x4774
movq %rax, 0x18(%rbx)
leaq 0x10e(%rsp), %rdi
callq 0x4774
movq %rax, 0x20(%rbx)
callq 0x2450
movl %eax, 0x28(%rbx)
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/igaw[P]jitterdebugger/jd_sysinfo.c
// Function: store_system_info
void store_system_info(const char *path, struct system_info *sysinfo)
{
	char *buf;
	FILE *fd;
	unsigned int len;

	jd_cp("/proc/cmdline", path);
	jd_cp("/proc/config.gz", path);
	jd_cp("/proc/cpuinfo", path);
	jd_cp("/proc/interrupts", path);
	jd_cp("/proc/sched_debug", path);

	// cpus_online
	fd = jd_fopen(path, "cpus_online", "w");
	if (!fd)
		return;
	fprintf(fd, "%d\n", sysinfo->cpus_online);
	fclose(fd);

	// uname
	fd = jd_fopen(path, "uname", "w");
	if (!fd)
		return;
	fprintf(fd, "%s %s %s %s %s\n",
		sysinfo->sysname,
		sysinfo->nodename,
		sysinfo->release,
		sysinfo->version,
		sysinfo->machine);
	fclose(fd);

	// dmesg
	len = klogctl(SYSLOG_ACTION_SIZE_BUFFER, NULL, 0);
	buf = malloc(len * sizeof(char));
	if (!buf)
		err_handler(errno, "malloc()");

	if (klogctl(SYSLOG_ACTION_READ_ALL, buf, len) < 0)
		return;

	fd = jd_fopen(path, "dmesg", "w");
	if (!fd) {
		free(buf);
		return;
	}

	if (fwrite(buf, sizeof(char), len, fd) != len)
		warn_handler("writing dmesg failed\n");

	fclose(fd);
	free(buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x14fe(%rip), %rdi      # 0x6098
movq %rbx, %rsi
callq 0x4835
leaq 0x14fd(%rip), %rdi      # 0x60a6
movq %rbx, %rsi
callq 0x4835
leaq 0x14fe(%rip), %rdi      # 0x60b6
movq %rbx, %rsi
callq 0x4835
leaq 0x14fd(%rip), %rdi      # 0x60c4
movq %rbx, %rsi
callq 0x4835
leaq 0x14ff(%rip), %rdi      # 0x60d5
movq %rbx, %rsi
callq 0x4835
leaq 0x1502(%rip), %rsi      # 0x60e7
leaq 0x765(%rip), %rdx       # 0x5351
movq %rbx, %rdi
callq 0x47a4
testq %rax, %rax
je 0x4d32
movq %rax, %r15
movl 0x28(%r14), %edx
leaq 0x1422(%rip), %rsi      # 0x602d
movq %rax, %rdi
xorl %eax, %eax
callq 0x2230
movq %r15, %rdi
callq 0x2110
leaq 0x14cf(%rip), %rsi      # 0x60f3
leaq 0x726(%rip), %rdx       # 0x5351
movq %rbx, %rdi
callq 0x47a4
testq %rax, %rax
je 0x4d32
movq %rax, %r15
movq (%r14), %rdx
movq 0x8(%r14), %rcx
movq 0x10(%r14), %r8
movq 0x18(%r14), %r9
movq 0x20(%r14), %rax
movq %rax, (%rsp)
leaq 0x149c(%rip), %rsi      # 0x60f9
movq %r15, %rdi
xorl %eax, %eax
callq 0x2230
movq %r15, %rdi
callq 0x2110
movl $0xa, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22d0
movl %eax, %r15d
movq %r15, %rdi
callq 0x22a0
movq %rax, %r14
testq %rax, %rax
jne 0x4cb3
callq 0x2070
movl (%rax), %edi
leaq 0x646(%rip), %rsi       # 0x52e4
leaq 0x138c(%rip), %rdx      # 0x6031
leaq 0x145d(%rip), %rcx      # 0x6109
xorl %eax, %eax
callq 0x418c
movl $0x3, %edi
movq %r14, %rsi
movl %r15d, %edx
callq 0x22d0
testl %eax, %eax
js 0x4d32
leaq 0x144d(%rip), %rsi      # 0x611b
leaq 0x67c(%rip), %rdx       # 0x5351
movq %rbx, %rdi
callq 0x47a4
testq %rax, %rax
je 0x4d21
movq %rax, %rbx
movl $0x1, %esi
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
callq 0x23c0
cmpq %r15, %rax
je 0x4d19
leaq 0x141d(%rip), %rdi      # 0x6121
leaq 0x1326(%rip), %rsi      # 0x6031
leaq 0x13f7(%rip), %rdx      # 0x6109
xorl %eax, %eax
callq 0x425b
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x2040
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/igaw[P]jitterdebugger/jd_sysinfo.c
// Function: free_system_info
void free_system_info(struct system_info *sysinfo)
{
	if (sysinfo->sysname)
		free(sysinfo->sysname);
	if (sysinfo->nodename)
		free(sysinfo->nodename);
	if (sysinfo->release)
		free(sysinfo->release);
	if (sysinfo->version)
		free(sysinfo->version);
	if (sysinfo->machine)
		free(sysinfo->machine);
	free(sysinfo);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4d4d
callq 0x2040
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4d5b
callq 0x2040
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4d69
callq 0x2040
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x4d77
callq 0x2040
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x4d85
callq 0x2040
movq %rbx, %rdi
popq %rbx
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_03/cross_referencer.c
// Function: add_to_tree
struct tree_node *add_to_tree(struct tree_node *node_p, char *word, size_t line_number)
{
  int cond;

  if (node_p == NULL)
  {
    node_p = (struct tree_node *)malloc(sizeof(struct tree_node));
    node_p->line_numbers = add_to_list(node_p->line_numbers, line_number);
    node_p->word = str_dup(word);
    node_p->left = node_p->right = NULL;
  }
  else if ((cond = strcmp(word, node_p->word)) == 0)
  {
    node_p->line_numbers = add_to_list(node_p->line_numbers, line_number);
  }
  else if (cond < 0)
  {
    node_p->left = add_to_tree(node_p->left, word, line_number);
  }
  else if (cond > 0)
  {
    node_p->right = add_to_tree(node_p->right, word, line_number);
  }

  return node_p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
testq %rdi, %rdi
je 0x13dd
movq %rdi, %rbx
movq (%rdi), %rsi
movq %r15, %rdi
callq 0x1070
testl %eax, %eax
je 0x140a
jns 0x141c
movq 0x10(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x13a4
movq %rax, 0x10(%rbx)
jmp 0x142f
movl $0x20, %edi
callq 0x1080
movq %rax, %rbx
movq %r14, %rsi
callq 0x14e2
movq %rax, 0x8(%rbx)
movq %r15, %rdi
callq 0x1485
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
jmp 0x142f
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x14e2
movq %rax, 0x8(%rbx)
jmp 0x142f
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x13a4
movq %rax, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_03/cross_referencer.c
// Function: print_tree
void print_tree(struct tree_node *node_p)
{
  if (node_p != NULL)
  {
    print_tree(node_p->left);
    printf("%s: ", node_p->word);
    print_list(node_p->line_numbers);
    putchar('\n');
    print_tree(node_p->right);
  }
}

// Assembly:
testq %rdi, %rdi
je 0x1484
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xc1a(%rip), %r14       # 0x2065
movq 0x10(%rbx), %rdi
callq 0x1438
movq (%rbx), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
movq 0x8(%rbx), %rdi
callq 0x1526
movl $0xa, %edi
callq 0x1030
movq 0x18(%rbx), %rbx
testq %rbx, %rbx
jne 0x144b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_03/cross_referencer.c
// Function: add_to_list
struct list_node *add_to_list(struct list_node *list_node_p, size_t line_number)
{
  if (list_node_p == NULL)
  {
    list_node_p = (struct list_node *)malloc(sizeof(struct list_node));
    list_node_p->line_number = line_number;
    list_node_p->next = NULL;
  }
  else
  {
    list_node_p->next = add_to_list(list_node_p->next, line_number);
  }

  return list_node_p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
testq %rdi, %rdi
je 0x1503
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq %r14, %rsi
callq 0x14e2
movq %rax, 0x8(%rbx)
jmp 0x151b
movl $0x10, %edi
callq 0x1080
movq %rax, %rbx
movq %r14, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_03/cross_referencer.c
// Function: print_list
void print_list(struct list_node *node_p)
{
  static enum boolean first = TRUE;
  if (node_p != NULL)
  {
    if (first)
    {
      first = FALSE;
      printf("%zu", node_p->line_number);
    }
    else
    {
      printf(", %zu", node_p->line_number);
    }

    print_list(node_p->next);
  }
  else
  {
    first = TRUE;
  }
}

// Assembly:
testq %rdi, %rdi
je 0x156f
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xb30(%rip), %r14       # 0x206a
leaq 0xb2b(%rip), %r15       # 0x206c
cmpb $0x0, 0x2bfc(%rip)      # 0x4144
movq %r14, %rdi
jne 0x1557
movb $0x1, 0x2bf0(%rip)      # 0x4144
movq %r15, %rdi
movq (%rbx), %rsi
xorl %eax, %eax
callq 0x1060
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x1541
popq %rbx
popq %r14
popq %r15
movb $0x0, 0x2bce(%rip)      # 0x4144
retq