LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_feof
static int
vmir_feof(void *ret, const void *rf, ir_unit_t *iu)
{
  vFILE_t *vfile = vmir_vm_ptr(&rf, iu);
  if(vfile == NULL) {
    vmir_vm_ret32(ret, 1);
    return 0;
  }
  int r = feof(vfile->fp);
  vmir_vm_ret32(ret, r);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x3db0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x19f53
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x3ee0
movl $0x0, -0x4(%rbp)
jmp 0x19f75
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x3320
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x3ee0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_fflush
static int
vmir_fflush(void *ret, const void *rf, ir_unit_t *iu)
{
  vFILE_t *vfile = vmir_vm_ptr(&rf, iu);
  if(vfile == NULL) {
    vmir_vm_ret32(ret, 1);
    return 0;
  }
  int r = fflush(vfile->fp);
  vmir_vm_ret32(ret, r);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x3db0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x19fc3
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x3ee0
movl $0x0, -0x4(%rbp)
jmp 0x19fe5
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x3370
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x3ee0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_ftell
static int
vmir_ftell(void *ret, const void *rf, ir_unit_t *iu)
{
  vFILE_t *vfile = vmir_vm_ptr(&rf, iu);
  if(vfile == NULL) {
    vmir_vm_ret32(ret, -1);
    return 0;
  }
  int r = ftell(vfile->fp);
  vmir_vm_ret32(ret, r);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x3db0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1a033
movq -0x10(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x3ee0
movl $0x0, -0x4(%rbp)
jmp 0x1a055
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x3300
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x3ee0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_ftello
static int
vmir_ftello(void *ret, const void *rf, ir_unit_t *iu)
{
  vFILE_t *vfile = vmir_vm_ptr(&rf, iu);
  uint64_t r = ftello(vfile->fp);
  if(vfile == NULL) {
    vmir_vm_ret64(ret, -1);
    return 0;
  }
  vmir_vm_ret64(ret, r);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x3db0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x30b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1a0b5
movq -0x10(%rbp), %rdi
movq $-0x1, %rsi
callq 0x3f00
movl $0x0, -0x4(%rbp)
jmp 0x1a0c9
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3f00
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_fclose
static int
vmir_fclose(void *ret, const void *rf, ir_unit_t *iu)
{
  vFILE_t *vfile = vmir_vm_ptr(&rf, iu);
  if(vfile != NULL)
    fclose(vfile->fp);
  vmir_vm_ret32(ret, 0);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1a118
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x3140
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3ee0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_puts
static int
vmir_puts(void *ret, const void *rf, ir_unit_t *iu)
{
  const char *str = vmir_vm_ptr(&rf, iu);
  if(iu->iu_stdout != NULL) {
    fwrite(str, strlen(str), 1, iu->iu_stdout->fp);
    fwrite("\n", 1, 1, iu->iu_stdout->fp);    
  }
  vmir_vm_ret32(ret, 0);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
je 0x1a1b5
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3150
movq -0x28(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0xb8(%rax), %rax
movq (%rax), %rcx
movl $0x1, %edx
callq 0x3480
movq -0x18(%rbp), %rax
movq 0xb8(%rax), %rax
movq (%rax), %rcx
leaq 0x27849(%rip), %rdi     # 0x419f1
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3480
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3ee0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_fputc
static int
vmir_fputc(void *ret, const void *rf, ir_unit_t *iu)
{
  char c = vmir_vm_arg32(&rf);
  vFILE_t *vfile = vmir_vm_ptr(&rf, iu);
  if(vfile != NULL)
    fwrite(&c, 1, 1, vfile->fp);
  vmir_vm_ret32(ret, c);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3cf0
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1a220
movq -0x28(%rbp), %rax
movq (%rax), %rcx
leaq -0x19(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3480
movq -0x8(%rbp), %rdi
movsbl -0x19(%rbp), %esi
callq 0x3ee0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_fgetc
static int
vmir_fgetc(void *ret, const void *rf, ir_unit_t *iu)
{
  uint8_t c;
  vFILE_t *vfile = vmir_vm_ptr(&rf, iu);
  if(vfile == NULL || fread(&c, 1, 1, vfile->fp) != 1) {
    vmir_vm_ret32(ret, -1);
    return 0;
  }
  vmir_vm_ret32(ret, c);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x3db0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1a28a
movq -0x30(%rbp), %rax
movq (%rax), %rcx
leaq -0x21(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x30f0
cmpq $0x1, %rax
je 0x1a2a1
movq -0x10(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x3ee0
movl $0x0, -0x4(%rbp)
jmp 0x1a2b5
movq -0x10(%rbp), %rdi
movzbl -0x21(%rbp), %esi
callq 0x3ee0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_putchar
static int
vmir_putchar(void *ret, const void *rf, ir_unit_t *iu)
{
  char c = vmir_vm_arg32(&rf);
  if(iu->iu_stdout != NULL)
    fwrite(&c, 1, 1, iu->iu_stdout->fp);
  vmir_vm_ret32(ret, c);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3cf0
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
je 0x1a30d
movq -0x18(%rbp), %rax
movq 0xb8(%rax), %rax
movq (%rax), %rcx
leaq -0x19(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3480
movq -0x8(%rbp), %rdi
movsbl -0x19(%rbp), %esi
callq 0x3ee0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_vsnprintf
static int
vmir_vsnprintf(void *ret, const void *rf, ir_unit_t *iu)
{
  char *dst = vmir_vm_ptr(&rf, iu);
  int dstlen = vmir_vm_arg32(&rf);
  const char *fmt = vmir_vm_ptr(&rf, iu);
  const void *va_rf = vmir_valist(&rf, iu);

  fmt_sn_aux_t aux;
  aux.dst = dst;
  aux.remain = dstlen;
  aux.total = 0;
  dofmt(fmt_sn, &aux, fmt, va_rf, iu);
  // Nul termination
  if(aux.remain)
    *aux.dst = 0;
  vmir_vm_ret32(ret, aux.total);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3cf0
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x1b5a0
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x40(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %r8
leaq 0x1505(%rip), %rdi      # 0x1b8f0
leaq -0x48(%rbp), %rsi
callq 0x1b5f0
cmpl $0x0, -0x40(%rbp)
je 0x1a401
movq -0x48(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x3ee0
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_snprintf
static int
vmir_snprintf(void *ret, const void *rf, ir_unit_t *iu)
{
  char *dst = vmir_vm_ptr(&rf, iu);
  int dstlen = vmir_vm_arg32(&rf);
  const char *fmt = vmir_vm_ptr(&rf, iu);

  if(iu->iu_mode == VMIR_WASM)
    rf = (const void *)vmir_vm_ptr(&rf, iu);

  fmt_sn_aux_t aux;
  aux.dst = dst;
  aux.remain = dstlen;
  aux.total = 0;

  dofmt(fmt_sn, &aux, fmt, rf, iu);

  // Nul termination
  if(aux.remain)
    *aux.dst = 0;
  vmir_vm_ret32(ret, aux.total);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3cf0
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, 0x64(%rax)
jne 0x1a47d
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
leaq 0x144b(%rip), %rdi      # 0x1b8f0
leaq -0x40(%rbp), %rsi
callq 0x1b5f0
cmpl $0x0, -0x38(%rbp)
je 0x1a4bb
movq -0x40(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x3ee0
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_vsprintf
static int
vmir_vsprintf(void *ret, const void *rf, ir_unit_t *iu)
{
  char *dst = vmir_vm_ptr(&rf, iu);
  const char *fmt = vmir_vm_ptr(&rf, iu);
  const void *va_rf = vmir_valist(&rf, iu);

  fmt_sn_aux_t aux;
  aux.dst = dst;
  aux.remain = INT32_MAX;
  aux.total = 0;
  dofmt(fmt_sn, &aux, fmt, va_rf, iu);

  // Nul termination
  if(aux.remain)
    *aux.dst = 0;
  vmir_vm_ret32(ret, aux.total);
  return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x1b5a0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x7fffffff, -0x38(%rbp) # imm = 0x7FFFFFFF
movl $0x0, -0x34(%rbp)
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %r8
leaq 0x13b0(%rip), %rdi      # 0x1b8f0
leaq -0x40(%rbp), %rsi
callq 0x1b5f0
cmpl $0x0, -0x38(%rbp)
je 0x1a556
movq -0x40(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x3ee0
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_vprintf
static int
vmir_vprintf(void *ret, const void *rf, ir_unit_t *iu)
{
  const char *fmt = vmir_vm_ptr(&rf, iu);
  const void *va_rf = vmir_valist(&rf, iu);

  fmt_file_aux_t aux;
  aux.vfile = iu->iu_stdout;
  aux.total = 0;
  dofmt(fmt_file, &aux, fmt, va_rf, iu);

  vmir_vm_ret32(ret, aux.total);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x1b5a0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %r8
leaq 0x1e41(%rip), %rdi      # 0x1c4c0
leaq -0x38(%rbp), %rsi
callq 0x1b5f0
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x3ee0
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_printf
static int
vmir_printf(void *ret, const void *rf, ir_unit_t *iu)
{
  const char *fmt = vmir_vm_ptr(&rf, iu);

  if(iu->iu_mode == VMIR_WASM)
    rf = (const void *)vmir_vm_ptr(&rf, iu);

  fmt_file_aux_t aux;
  aux.vfile = iu->iu_stdout;
  aux.total = 0;
  dofmt(fmt_file, &aux, fmt, rf, iu);

  vmir_vm_ret32(ret, aux.total);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, 0x64(%rax)
jne 0x1a6e0
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
leaq 0x1db7(%rip), %rdi      # 0x1c4c0
leaq -0x30(%rbp), %rsi
callq 0x1b5f0
movq -0x8(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x3ee0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_vfprintf
static int
vmir_vfprintf(void *ret, const void *rf, ir_unit_t *iu)
{
  vFILE_t *vfile = vmir_vm_ptr(&rf, iu);
  const char *fmt = vmir_vm_ptr(&rf, iu);
  const void *va_rf = vmir_valist(&rf, iu);

  fmt_file_aux_t aux;
  aux.vfile = vfile;
  aux.total = 0;
  dofmt(fmt_file, &aux, fmt, va_rf, iu);

  vmir_vm_ret32(ret, aux.total);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x1b5a0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %r8
leaq 0x1d27(%rip), %rdi      # 0x1c4c0
leaq -0x40(%rbp), %rsi
callq 0x1b5f0
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x3ee0
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_fprintf
static int
vmir_fprintf(void *ret, const void *rf, ir_unit_t *iu)
{
  vFILE_t *vfile = vmir_vm_ptr(&rf, iu);
  const char *fmt = vmir_vm_ptr(&rf, iu);

  if(iu->iu_mode == VMIR_WASM)
    rf = (const void *)vmir_vm_ptr(&rf, iu);

  fmt_file_aux_t aux;
  aux.vfile = vfile;
  aux.total = 0;
  dofmt(fmt_file, &aux, fmt, rf, iu);

  vmir_vm_ret32(ret, aux.total);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, 0x64(%rax)
jne 0x1a811
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
leaq 0x1c8d(%rip), %rdi      # 0x1c4c0
leaq -0x38(%rbp), %rsi
callq 0x1b5f0
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x3ee0
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_strtok_r
static int
vmir_strtok_r(void *retreg, const void *rf, ir_unit_t *iu)
{
  char *str         = vmir_vm_ptr(&rf, iu);
  const char *delim = vmir_vm_ptr(&rf, iu);
  uint32_t nextp = vmir_vm_arg32(&rf);

  if(str == NULL)
    str = mem_rdptr(iu, nextp);

  str += strspn(str, delim);

  if(*str == '\0') {
    vmir_vm_ret32(retreg, 0);
    return 0;
  }

  char *ret = str;
  str += strcspn(str, delim);
  if(*str)
    *str++ = '\0';

  mem_wrptr(iu, nextp, str);

  vmir_vm_retptr(retreg, ret, iu);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x3db0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x3db0
movq %rax, -0x30(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x3cf0
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1a8a9
movq -0x20(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x1c520
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3240
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x1a8de
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x3ee0
movl $0x0, -0x4(%rbp)
jmp 0x1a93e
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3260
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1a916
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x0, (%rax)
movq -0x20(%rbp), %rdi
movl -0x34(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0x1c580
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x3e90
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_strtok
static int
vmir_strtok(void *retreg, const void *rf, ir_unit_t *iu)
{
  char *str         = vmir_vm_ptr(&rf, iu);
  const char *delim = vmir_vm_ptr(&rf, iu);

  if(str == NULL)
    str = iu->iu_strtok_tmp;

  str += strspn(str, delim);

  if(*str == '\0') {
    vmir_vm_ret32(retreg, 0);
    return 0;
  }

  char *ret = str;
  str += strcspn(str, delim);
  if(*str)
    *str++ = '\0';

  iu->iu_strtok_tmp = str;

  vmir_vm_retptr(retreg, ret, iu);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x3db0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x3db0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1a99c
movq -0x20(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3240
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x1a9d1
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x3ee0
movl $0x0, -0x4(%rbp)
jmp 0x1aa30
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3260
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1aa09
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x0, (%rax)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0xf8(%rax)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x3e90
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_libc_hexdump
static int
vmir_libc_hexdump(void *ret, const void *rf, ir_unit_t *iu)
{
  uint32_t addr = vmir_vm_arg32(&rf);
  uint32_t size = vmir_vm_arg32(&rf);
  printf("Hexdump of 0x%x\n", addr);
  vmir_hexdump("hexdump", iu->iu_mem + addr, size);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3cf0
movl %eax, -0x1c(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3cf0
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %esi
leaq 0x23b20(%rip), %rdi     # 0x3e656
movb $0x0, %al
callq 0x3170
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
movl -0x1c(%rbp), %eax
addq %rax, %rsi
movl -0x20(%rbp), %edx
leaq 0x238ee(%rip), %rdi     # 0x3e443
callq 0x1c6a0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_cxa_guard_acquire
static int
vmir_cxa_guard_acquire(void *ret, const void *rf, ir_unit_t *iu)
{
  uint8_t *p = vmir_vm_ptr(&rf, iu);
  if(*p == 0) {
    *p = 1;
    vmir_vm_ret32(ret, 1);
  } else {
    vmir_vm_ret32(ret, 0);
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x3db0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x1abe8
movq -0x20(%rbp), %rax
movb $0x1, (%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3ee0
jmp 0x1abf3
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3ee0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir___cxa_allocate_exception
static int
vmir___cxa_allocate_exception(void *ret, const void *rf, ir_unit_t *iu)
{
  uint32_t size = vmir_vm_arg32(&rf);
  void *p = vmir_heap_malloc(iu, size + sizeof(vmir_cxx_exception_t));
  memset(p, 0, sizeof(vmir_cxx_exception_t));
  vmir_vm_retptr(ret, p + sizeof(vmir_cxx_exception_t), iu);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3cf0
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %eax
addq $0xc, %rax
movl %eax, %esi
callq 0x16e00
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0xc, %edx
callq 0x31f0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0xc, %rsi
movq -0x18(%rbp), %rdx
callq 0x3e90
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir___cxa_begin_catch
static int
vmir___cxa_begin_catch(void *ret, const void *rf, ir_unit_t *iu)
{
  uint32_t x = vmir_vm_arg32(&rf);
  uint32_t x2 = x - sizeof(vmir_cxx_exception_t);
  vmir_cxx_exception_t *exc = iu->iu_mem + x2;

  if(exc->handlers < 0) {
    exc->handlers = -exc->handlers + 1;
  } else {
    exc->handlers++;
    iu->iu_exception.uncaught--;
  }

  exc->next = iu->iu_exception.caught;
  iu->iu_exception.caught = x2;
  vmir_vm_ret32(ret, x);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3cf0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
subq $0xc, %rax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x20(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jge 0x1ad5b
movq -0x28(%rbp), %rax
xorl %ecx, %ecx
subl 0x4(%rax), %ecx
addl $0x1, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0x1ad75
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movl 0x70(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x70(%rax)
movq -0x18(%rbp), %rax
movl 0x74(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x74(%rax)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x3ee0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir___cxa_end_catch
static int
vmir___cxa_end_catch(void *ret, const void *rf, ir_unit_t *iu)
{
  vmir_cxx_exception_t *exc = iu->iu_mem + iu->iu_exception.caught;

  if(--exc->handlers == 0) {
    iu->iu_exception.caught = exc->next;
    vmir_heap_free(iu, exc);
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x74(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movl 0x4(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rcx)
cmpl $0x0, %eax
jne 0x1adf6
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x74(%rax)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x16f50
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir___cxa_throw
static int
vmir___cxa_throw(void *ret, const void *rf, ir_unit_t *iu)
{
  iu->iu_exception.exception = vmir_vm_arg32(&rf);
  iu->iu_exception.type_info = vmir_vm_arg32(&rf);

  vmir_cxx_exception_t *exc =
    iu->iu_mem + iu->iu_exception.exception  - sizeof(vmir_cxx_exception_t);
  exc->destructor = vmir_vm_arg32(&rf);
  assert(exc->destructor == 0); // Not really supported (yet)
  iu->iu_exception.uncaught++;
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3cf0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x68(%rax)
leaq -0x10(%rbp), %rdi
callq 0x3cf0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x6c(%rax)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x68(%rcx), %ecx
addq %rcx, %rax
addq $-0xc, %rax
movq %rax, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3cf0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x1ae70
jmp 0x1ae8f
leaq 0x23809(%rip), %rdi     # 0x3e680
leaq 0x236cd(%rip), %rsi     # 0x3e54b
movl $0x666, %edx            # imm = 0x666
leaq 0x2380b(%rip), %rcx     # 0x3e695
callq 0x31c0
movq -0x18(%rbp), %rax
movl 0x70(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x70(%rax)
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_heap_realloc
static void *
vmir_heap_realloc(ir_unit_t *iu, void *ptr, int size)
{
  void *n = NULL;
  if(size) {
    int cursize = vmir_heap_usable_size(ptr);
    if(size < cursize)
      return ptr;

    n = vmir_heap_malloc(iu, size);
    if(n == NULL)
      return NULL;

    if(ptr != NULL)
      memcpy(n, ptr, cursize);
  }
  vmir_heap_free(iu, ptr);
  return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1af9a
movq -0x18(%rbp), %rdi
callq 0x1afc0
movl %eax, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x1af5f
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1afaf
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x16e00
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1af80
movq $0x0, -0x8(%rbp)
jmp 0x1afaf
cmpq $0x0, -0x18(%rbp)
je 0x1af98
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x2c(%rbp), %rdx
callq 0x3330
jmp 0x1af9a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x16f50
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_heap_usable_size
static int
vmir_heap_usable_size(void *ptr)
{
  heap_block_t *hb = ptr;
  hb--;
  assert(hb->hb_magic == HEAP_MAGIC_ALLOC);
  return hb->hb_size - sizeof(heap_block_t);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $-0x18, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0xa110ced, (%rax)      # imm = 0xA110CED
jne 0x1afee
jmp 0x1b00d
leaq 0x23535(%rip), %rdi     # 0x3e52a
leaq 0x2354f(%rip), %rsi     # 0x3e54b
movl $0xf4, %edx
leaq 0x23553(%rip), %rcx     # 0x3e55b
callq 0x31c0
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rax
subq $0x18, %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vfd_open
static int
vfd_open(ir_unit_t *iu, const char *path, vmir_openflags_t flags)
{
  intptr_t fh;
  vmir_errcode_t err = iu->iu_fsops->open(iu->iu_opaque, path, flags, &fh);
  if(err)
    return -1;
  return vmir_fd_create_fh(iu, fh, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
leaq -0x28(%rbp), %rcx
callq *%rax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x1b068
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1b07d
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x1, %edx
callq 0x16bb0
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/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vfd_read
static ssize_t
vfd_read(ir_unit_t *iu, int fd, char *buf, size_t size)
{
  vmir_fd_t *vfd = vfd_get(iu, fd, VMIR_FD_TYPE_FILEHANDLE);
  if(vfd == NULL)
    return -1;
  return iu->iu_fsops->read(iu->iu_opaque, vfd->fh, buf, size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl $0x1, %edx
callq 0x16990
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1b0cd
movq $-0x1, -0x8(%rbp)
jmp 0x1b0f9
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rdi
movq -0x30(%rbp), %rcx
movq (%rcx), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq *%rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vfd_write
static ssize_t
vfd_write(ir_unit_t *iu, int fd, const char *buf, size_t size)
{
  vmir_fd_t *vfd = vfd_get(iu, fd, VMIR_FD_TYPE_FILEHANDLE);
  if(vfd == NULL)
    return -1;
  return iu->iu_fsops->write(iu->iu_opaque, vfd->fh, buf, size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl $0x1, %edx
callq 0x16990
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1b14d
movq $-0x1, -0x8(%rbp)
jmp 0x1b179
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rdi
movq -0x30(%rbp), %rcx
movq (%rcx), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq *%rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vfd_seek
static int64_t
vfd_seek(ir_unit_t *iu, int fd, int64_t offset, int whence)
{
  vmir_fd_t *vfd = vfd_get(iu, fd, VMIR_FD_TYPE_FILEHANDLE);
  if(vfd == NULL)
    return -1;
  return iu->iu_fsops->seek(iu->iu_opaque, vfd->fh, offset, whence);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl $0x1, %edx
callq 0x16990
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1b1cc
movq $-0x1, -0x8(%rbp)
jmp 0x1b1f7
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rdi
movq -0x30(%rbp), %rcx
movq (%rcx), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
callq *%rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vFILE_open
static vFILE_t *
vFILE_open(ir_unit_t *iu, const char *path, const char *mode,
           int line_buffered)
{
  vmir_openflags_t flags = 0;
  for(int i = 0; i < VMIR_ARRAYSIZE(modetable); i++) {
    if(!strcmp(mode, modetable[i].mode)) {
      flags = modetable[i].flags;
      break;
    }
  }
  if(flags == 0)
    return NULL;

  int fd = vfd_open(iu, path, flags);
  if(fd == -1)
    return NULL;
  return vFILE_open_fd(iu, fd, line_buffered, mode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
cmpq $0xf, %rax
jae 0x1b280
movq -0x20(%rbp), %rdi
movslq -0x2c(%rbp), %rax
leaq 0x22d62(%rip), %rsi     # 0x3dfb0
shlq $0x3, %rax
addq %rax, %rsi
callq 0x32d0
cmpl $0x0, %eax
jne 0x1b273
movslq -0x2c(%rbp), %rcx
leaq 0x22d46(%rip), %rax     # 0x3dfb0
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x28(%rbp)
jmp 0x1b280
jmp 0x1b275
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1b235
cmpl $0x0, -0x28(%rbp)
jne 0x1b290
movq $0x0, -0x8(%rbp)
jmp 0x1b2ca
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x28(%rbp), %edx
callq 0x1b020
movl %eax, -0x30(%rbp)
cmpl $-0x1, -0x30(%rbp)
jne 0x1b2b3
movq $0x0, -0x8(%rbp)
jmp 0x1b2ca
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %esi
movl -0x24(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x1b2e0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vFILE_open_fd
static void *
vFILE_open_fd(ir_unit_t *iu, int fd, int line_buffered, const char *mode)
{
  vFILE_t *vfile = vmir_heap_malloc(iu, sizeof(vFILE_t));
  if(vfile == NULL) {
    vmir_fd_close(iu, fd);
    return NULL;
  }
  vfile->iu = iu;
  vfile->fd = fd;

#if USE_FUNOPEN
  vfile->fp = funopen(vfile, fun_read, fun_write, fun_seek, vFILE_close);
#else
  vfile->fp = fopencookie(vfile, mode, cookiefuncs);
#endif
  if(vfile->fp == NULL) {
    vmir_fd_close(iu, fd);
    vmir_heap_free(iu, vfile);
    return NULL;
  }
  if(line_buffered)
    setlinebuf(vfile->fp);
  LIST_INSERT_HEAD(&iu->iu_vfiles, vfile, link);
  return vfile;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x28, %esi
callq 0x16e00
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1b328
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x16c30
movq $0x0, -0x8(%rbp)
jmp 0x1b419
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq 0x2e693(%rip), %rax     # 0x499e0
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x3090
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x1b3ab
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x16c30
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x16f50
movq $0x0, -0x8(%rbp)
jmp 0x1b419
cmpl $0x0, -0x18(%rbp)
je 0x1b3bd
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x31d0
jmp 0x1b3bf
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
movq -0x28(%rbp), %rcx
movq %rax, 0x18(%rcx)
cmpq $0x0, %rax
je 0x1b3ef
movq -0x28(%rbp), %rcx
addq $0x18, %rcx
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xf0(%rax)
movq -0x10(%rbp), %rcx
addq $0xf0, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: cookie_seek
static int
cookie_seek(void *fh, int64_t *offsetp, int whence)
{
  vFILE_t *vf = fh;
  int64_t r = vfd_seek(vf->iu, vf->fd, *offsetp, whence);
  if(r < 0)
    return -1;
  *offsetp = r;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movl -0x1c(%rbp), %ecx
callq 0x1b190
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jge 0x1b4fd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1b50f
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vFILE_close
static int
vFILE_close(void *fh)
{
  vFILE_t *vf = fh;
  ir_unit_t *iu = vf->iu;
  vmir_fd_close(vf->iu, vf->fd);
  LIST_REMOVE(vf, link);
  vmir_heap_free(iu, vf);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x16c30
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1b573
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x16f50
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: fmt_sn
static void
fmt_sn(void *opaque, const char *str, int len)
{
  fmt_sn_aux_t *aux = opaque;
  aux->total += len;
  if(aux->remain == 0)
    return;

  // Figure out how much to copy, we always reserve one byte for trailing 0
  int to_copy = VMIR_MIN(aux->remain - 1, len);

  memcpy(aux->dst, str, to_copy);
  aux->dst += to_copy;
  aux->remain -= to_copy;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x1b924
jmp 0x1b984
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
cmpl -0x14(%rbp), %eax
jae 0x1b942
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x1b948
movl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movslq -0x24(%rbp), %rdx
callq 0x3330
movl -0x24(%rbp), %edx
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movl -0x24(%rbp), %edx
movq -0x20(%rbp), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_vm.c
// Function: vmir_vm_vaarg32
static uint32_t
vmir_vm_vaarg32(const void **rfp, ir_unit_t *iu)
{
  const uint32_t *p;
  if(iu->iu_mode == VMIR_WASM) {
    p = *rfp;
    *rfp = *rfp + 4;
  } else {
    p = *rfp = *rfp - 4;
  }
  return *p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x64(%rax)
jne 0x1c395
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1c3ab
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $-0x4, %rax
movq -0x8(%rbp), %rcx
movq %rax, (%rcx)
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_vm.c
// Function: vmir_vm_vaarg64
static uint64_t
vmir_vm_vaarg64(const void **rfp, ir_unit_t *iu)
{
  const uint64_t *p;
  if(iu->iu_mode == VMIR_WASM) {
    p = *rfp;
    *rfp = *rfp + 8;
  } else {
    p = *rfp = *rfp - 8;
  }
  return *p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x64(%rax)
jne 0x1c3f5
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x8, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1c40b
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $-0x8, %rax
movq -0x8(%rbp), %rcx
movq %rax, (%rcx)
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_vm.c
// Function: vmir_vm_vaarg_dbl
static double
vmir_vm_vaarg_dbl(const void **rfp, ir_unit_t *iu)
{
  const double *p;
  if(iu->iu_mode == VMIR_WASM) {
    p = *rfp;
    *rfp = *rfp + 8;
  } else {
    p = *rfp = *rfp - 8;
  }
  return *p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x64(%rax)
jne 0x1c495
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x8, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1c4ab
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $-0x8, %rax
movq -0x8(%rbp), %rcx
movq %rax, (%rcx)
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: fmt_file
static void
fmt_file(void *opaque, const char *str, int len)
{
  fmt_file_aux_t *aux = opaque;
  aux->total += len;
  if(aux->vfile != NULL)
    fwrite(str, len, 1, aux->vfile->fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1c50e
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rcx
movl $0x1, %edx
callq 0x3480
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: mem_rdptr
static __inline void *mem_rdptr(ir_unit_t *iu, uint32_t offset)
{
  uint32_t p = mem_rd32(iu->iu_mem + offset, iu);
  if(p)
    return iu->iu_mem + p;
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movl -0x14(%rbp), %eax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x192a0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x1c563
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x18(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x1c56b
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_heap_print0
static void
vmir_heap_print0(ir_unit_t *iu)
{
  heap_block_t *hb;
  heap_t *h = iu->iu_heap;
  printf(" --- Heap allocation dump ---\n");
  TAILQ_FOREACH(hb, &h->h_blocks, hb_link) {
    printf("%s 0x%x bytes\n",
           hb->hb_magic == HEAP_MAGIC_ALLOC ? "use " :
           hb->hb_magic == HEAP_MAGIC_FREE  ? "free" :
           "????",
           hb->hb_size);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rax
movq %rax, -0x18(%rbp)
leaq 0x21ff4(%rip), %rdi     # 0x3e606
movb $0x0, %al
callq 0x3170
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1c68d
movq -0x10(%rbp), %rax
cmpl $0xa110ced, (%rax)      # imm = 0xA110CED
jne 0x1c644
leaq 0x21ff6(%rip), %rax     # 0x3e634
movq %rax, -0x20(%rbp)
jmp 0x1c666
movq -0x10(%rbp), %rax
movl (%rax), %edx
leaq 0x21fe8(%rip), %rax     # 0x3e639
leaq 0x24fe3(%rip), %rcx     # 0x4163b
cmpl $0xf4eef4ee, %edx       # imm = 0xF4EEF4EE
cmoveq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
leaq 0x21fad(%rip), %rdi     # 0x3e625
movb $0x0, %al
callq 0x3170
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x1c624
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_heap_merge_next
static void
vmir_heap_merge_next(heap_t *h, heap_block_t *hb)
{
  heap_block_t *next = TAILQ_NEXT(hb, hb_link);
  if(next == NULL || next->hb_magic != HEAP_MAGIC_FREE)
    return;
  assert(next > hb);
  TAILQ_REMOVE(&h->h_blocks, next, hb_link);
  hb->hb_size += next->hb_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1c91f
movq -0x18(%rbp), %rax
cmpl $0xf4eef4ee, (%rax)     # imm = 0xF4EEF4EE
je 0x1c924
jmp 0x1c9a6
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jbe 0x1c930
jmp 0x1c94f
leaq 0x21dc9(%rip), %rdi     # 0x3e700
leaq 0x21c0d(%rip), %rsi     # 0x3e54b
movl $0xd7, %edx
leaq 0x21dc0(%rip), %rcx     # 0x3e70a
callq 0x31c0
jmp 0x1c951
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1c972
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0x1c982
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)