LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/codegen.c
// Function: gen_while
void gen_while(Node *node) {
  push_loop();
  char *cond_str = get_continue(node->token);
  char *end_str = get_break(node->token);
  emit_label(cond_str);
  gen(node->lhs);
  fprintf(output, "\tpop  rax\n");
  fprintf(output, "\tcmp  rax, 0\n");
  fprintf(output, "\tje   %s\n", end_str);
  gen_stmt(node->rhs);
  emit_jmp(cond_str);
  emit_label(end_str);
  pop_loop();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x13ae
movq 0x50(%rbx), %rdi
callq 0x143b
movq %rax, %r14
movq 0x50(%rbx), %rdi
callq 0x1463
movq %rax, %r15
movq %r14, %rdi
callq 0x132c
movq 0x8(%rbx), %rdi
callq 0x17e5
leaq 0xf012(%rip), %r13      # 0x11220
movq (%r13), %rcx
leaq 0x8137(%rip), %rdi      # 0xa350
pushq $0xa
popq %rsi
pushq $0x1
popq %r12
movq %r12, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x8274(%rip), %rdi      # 0xa4a7
pushq $0xd
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r13), %rdi
leaq 0x826c(%rip), %rsi      # 0xa4b5
movq %r15, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x10(%rbx), %rdi
callq 0x2196
movq %r14, %rdi
callq 0x1347
movq %r15, %rdi
callq 0x132c
movq 0xef7d(%rip), %rax      # 0x111f0
movq (%rax), %rax
movq %rax, 0xef73(%rip)      # 0x111f0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/codegen.c
// Function: gen_for
void gen_for(Node *node) {
  push_loop();
  char *loop_label = new_label();
  char *post_label = get_continue(node->token);
  char *end_label = get_break(node->token);
  gen(node->lhs);
  emit_label(loop_label);
  gen(node->rhs);
  fprintf(output, "\tpop  rax\n");
  fprintf(output, "\tcmp  rax, 0\n");
  fprintf(output, "\tje   %s\n", end_label);
  gen_stmt(node->nodes->data[0]);
  emit_label(post_label);
  gen(node->xhs);
  if (node->xhs) fprintf(output, "\tpop  rax\n");
  emit_jmp(loop_label);
  emit_label(end_label);
  pop_loop();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
callq 0x13ae
callq 0x12e8
movq %rax, %rbx
movq 0x50(%r15), %rdi
callq 0x143b
movq %rax, %r12
movq 0x50(%r15), %rdi
callq 0x1463
movq %rax, %r14
movq 0x8(%r15), %rdi
callq 0x17e5
movq %rbx, %rdi
callq 0x132c
movq 0x10(%r15), %rdi
callq 0x17e5
leaq 0xef45(%rip), %rbp      # 0x11220
movq (%rbp), %rcx
leaq 0x806a(%rip), %rdi      # 0xa350
pushq $0xa
popq %rsi
pushq $0x1
popq %r13
movq %r13, %rdx
callq 0x1190
movq (%rbp), %rcx
leaq 0x81a7(%rip), %rdi      # 0xa4a7
pushq $0xd
popq %rsi
movq %r13, %rdx
callq 0x1190
movq (%rbp), %rdi
leaq 0x819f(%rip), %rsi      # 0xa4b5
movq %r14, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x48(%r15), %rax
movq (%rax), %rax
movq (%rax), %rdi
callq 0x2196
movq %r12, %rdi
callq 0x132c
movq 0x18(%r15), %rdi
callq 0x17e5
cmpq $0x0, 0x18(%r15)
je 0x235d
movq (%rbp), %rcx
leaq 0x7ffe(%rip), %rdi      # 0xa350
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
movq %rbx, %rdi
callq 0x1347
movq %r14, %rdi
callq 0x132c
movq 0xee7c(%rip), %rax      # 0x111f0
movq (%rax), %rax
movq %rax, 0xee72(%rip)      # 0x111f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/codegen.c
// Function: gen_block
void gen_block(Node *node) {
  if (!node) return;
  Vector *vec = node->nodes;
  int len = vec_len(vec);
  for (int i = 0; i < len; i++) gen_stmt(vec->data[i]);
}

// Assembly:
testq %rdi, %rdi
je 0x23ca
pushq %r15
pushq %r14
pushq %rbx
movq 0x48(%rdi), %rbx
movq %rbx, %rdi
callq 0x34f2
movl %eax, %r14d
xorl %r15d, %r15d
testl %eax, %eax
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0x23c5
movq (%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x2196
incq %r15
jmp 0x23af
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/codegen.c
// Function: builtin_va_start
void builtin_va_start(Node *node) {
  // void va_start(va_list ap, parmN);
  // typedef struct {
  //  int gp_offset;
  //  int fp_offset;
  //  void *overflow_arg_area;
  //  void *reg_save_area;
  //} va_list[1];
  int gp = vec_len(node->nodes);
  int fp = 0;
  // rdi = ap
  // ap->gp_offset = gp * 8
  fprintf(output, "\tmov  DWORD PTR [rdi], %d\n", gp * 8);
  // ap->fp_offset = 48 + fp * 8
  fprintf(output, "\tmov  DWORD PTR [rdi + 4], %d\n", 48 + fp * 8);
  // ap->reg_save_area = rbp - 128 (address for first arg(rdi))
  fprintf(output, "\tmov  [rdi + 16], rbp\n");
  fprintf(output, "\tsub  QWORD PTR [rdi + 16], 128\n");
  // this is dummy.
  fprintf(output, "\tpush rax\n");
  return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x48(%rdi), %rdi
callq 0x34f2
leaq 0xee41(%rip), %r14      # 0x11220
movq (%r14), %rdi
leal (,%rax,8), %edx
leaq 0x80cf(%rip), %rsi      # 0xa4bf
xorl %eax, %eax
callq 0x10f0
movq (%r14), %rdi
leaq 0x80d9(%rip), %rsi      # 0xa4da
pushq $0x30
popq %rdx
xorl %eax, %eax
callq 0x10f0
movq (%r14), %rcx
leaq 0x80e4(%rip), %rdi      # 0xa4f9
pushq $0x16
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x1190
movq (%r14), %rcx
leaq 0x80e3(%rip), %rdi      # 0xa510
pushq $0x20
popq %rsi
movq %rbx, %rdx
callq 0x1190
movq (%r14), %rcx
leaq 0x7ef7(%rip), %rdi      # 0xa339
pushq $0xa
popq %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/codegen.c
// Function: gen_land
void gen_land(Node *node) {
  Type *l_ty = type(node->lhs);
  Type *r_ty = type(node->rhs);
  int reg_mode;
  char *false_label = new_label();
  char *exit_label = new_label();
  gen(node->lhs);

  if (!is_arith(l_ty) && !is_ptr(l_ty))
    error_at_node(node->lhs, "Illegal operation. (Type mismatch)");
  if (!is_arith(r_ty) && !is_ptr(r_ty))
    error_at_node(node->rhs, "Illegal operation. (Type mismatch)");

  reg_mode = reg_size(l_ty);
  fprintf(output, "\tpop  rax\n");
  fprintf(output, "\tcmp  %s, 0\n", reg_rax[reg_mode]);
  fprintf(output, "\tje   %s\n", false_label);

  gen(node->rhs);

  reg_mode = reg_size(r_ty);
  fprintf(output, "\tpop  rax\n");
  fprintf(output, "\tcmp  %s, 0\n", reg_rax[reg_mode]);
  fprintf(output, "\tje   %s\n", false_label);

  fprintf(output, "\tmov  rax, 1\n");
  emit_jmp(exit_label);

  emit_label(false_label);
  fprintf(output, "\tmov  rax, 0\n");
  emit_label(exit_label);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq 0x8(%rdi), %rdi
callq 0x9610
movq %rax, %r13
movq 0x10(%r15), %rdi
callq 0x9610
movq %rax, %r12
callq 0x12e8
movq %rax, 0x8(%rsp)
callq 0x12e8
movq %rax, 0x10(%rsp)
movq 0x8(%r15), %rdi
callq 0x17e5
movq %r13, %rdi
callq 0x91e8
testb %al, %al
jne 0x2955
movq %r13, %rdi
callq 0x9198
testb %al, %al
jne 0x2955
movq 0x8(%r15), %rdi
leaq 0x7e35(%rip), %rsi      # 0xa783
xorl %eax, %eax
callq 0x4a9e
movq %r12, %rdi
callq 0x91e8
testb %al, %al
jne 0x297f
movq %r12, %rdi
callq 0x9198
testb %al, %al
jne 0x297f
movq 0x10(%r15), %rdi
leaq 0x7e0b(%rip), %rsi      # 0xa783
xorl %eax, %eax
callq 0x4a9e
movq %r13, %rdi
callq 0x14be
movl %eax, %ebx
leaq 0xe890(%rip), %rbp      # 0x11220
movq (%rbp), %rcx
leaq 0x79b5(%rip), %rdi      # 0xa350
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
movq (%rbp), %rdi
movslq %ebx, %rax
leaq 0xe74c(%rip), %rcx      # 0x11100
leaq (%rcx,%rax,4), %rdx
leaq 0x7de7(%rip), %r14      # 0xa7a6
movq %r14, %rsi
xorl %eax, %eax
callq 0x10f0
movq (%rbp), %rdi
leaq 0x7ae1(%rip), %rbx      # 0xa4b5
movq %rbx, %rsi
movq 0x8(%rsp), %r13
movq %r13, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x10(%r15), %rdi
callq 0x17e5
movq %r12, %rdi
callq 0x14be
movl %eax, %r15d
movq (%rbp), %rcx
leaq 0x794b(%rip), %rdi      # 0xa350
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
movq (%rbp), %rdi
movslq %r15d, %rax
leaq 0xe6e2(%rip), %rcx      # 0x11100
leaq (%rcx,%rax,4), %rdx
movq %r14, %rsi
xorl %eax, %eax
callq 0x10f0
movq (%rbp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x10f0
movq (%rbp), %rcx
leaq 0x7d6b(%rip), %rdi      # 0xa7b3
pushq $0xd
popq %rbx
movq %rbx, %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x1190
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x1347
movq %r13, %rdi
callq 0x132c
movq (%rbp), %rcx
leaq 0x7b2c(%rip), %rdi      # 0xa5a6
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1190
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x132c
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/codegen.c
// Function: gen_lor
void gen_lor(Node *node) {
  Type *l_ty = type(node->lhs);
  Type *r_ty = type(node->rhs);
  int reg_mode;
  char *true_label = new_label();
  char *exit_label = new_label();
  gen(node->lhs);

  if (!is_arith(l_ty) && !is_ptr(l_ty))
    error_at_node(node->lhs, "Illegal operation. (Type mismatch)");
  if (!is_arith(r_ty) && !is_ptr(r_ty))
    error_at_node(node->rhs, "Illegal operation. (Type mismatch)");

  reg_mode = reg_size(l_ty);
  fprintf(output, "\tpop  rax\n");
  fprintf(output, "\tcmp  %s, 0\n", reg_rax[reg_mode]);
  fprintf(output, "\tjne  %s\n", true_label);

  gen(node->rhs);

  reg_mode = reg_size(r_ty);
  fprintf(output, "\tpop  rax\n");
  fprintf(output, "\tcmp  %s, 0\n", reg_rax[reg_mode]);
  fprintf(output, "\tjne  %s\n", true_label);

  fprintf(output, "\tmov  rax, 0\n");
  emit_jmp(exit_label);

  emit_label(true_label);
  fprintf(output, "\tmov  rax, 1\n");
  emit_label(exit_label);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq 0x8(%rdi), %rdi
callq 0x9610
movq %rax, %r13
movq 0x10(%r15), %rdi
callq 0x9610
movq %rax, %r12
callq 0x12e8
movq %rax, 0x8(%rsp)
callq 0x12e8
movq %rax, 0x10(%rsp)
movq 0x8(%r15), %rdi
callq 0x17e5
movq %r13, %rdi
callq 0x91e8
testb %al, %al
jne 0x2b0b
movq %r13, %rdi
callq 0x9198
testb %al, %al
jne 0x2b0b
movq 0x8(%r15), %rdi
leaq 0x7c7f(%rip), %rsi      # 0xa783
xorl %eax, %eax
callq 0x4a9e
movq %r12, %rdi
callq 0x91e8
testb %al, %al
jne 0x2b35
movq %r12, %rdi
callq 0x9198
testb %al, %al
jne 0x2b35
movq 0x10(%r15), %rdi
leaq 0x7c55(%rip), %rsi      # 0xa783
xorl %eax, %eax
callq 0x4a9e
movq %r13, %rdi
callq 0x14be
movl %eax, %ebx
leaq 0xe6da(%rip), %rbp      # 0x11220
movq (%rbp), %rcx
leaq 0x77ff(%rip), %rdi      # 0xa350
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
movq (%rbp), %rdi
movslq %ebx, %rax
leaq 0xe596(%rip), %rcx      # 0x11100
leaq (%rcx,%rax,4), %rdx
leaq 0x7c31(%rip), %r14      # 0xa7a6
movq %r14, %rsi
xorl %eax, %eax
callq 0x10f0
movq (%rbp), %rdi
leaq 0x7c37(%rip), %rbx      # 0xa7c1
movq %rbx, %rsi
movq 0x8(%rsp), %r13
movq %r13, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x10(%r15), %rdi
callq 0x17e5
movq %r12, %rdi
callq 0x14be
movl %eax, %r15d
movq (%rbp), %rcx
leaq 0x7795(%rip), %rdi      # 0xa350
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
movq (%rbp), %rdi
movslq %r15d, %rax
leaq 0xe52c(%rip), %rcx      # 0x11100
leaq (%rcx,%rax,4), %rdx
movq %r14, %rsi
xorl %eax, %eax
callq 0x10f0
movq (%rbp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x10f0
movq (%rbp), %rcx
leaq 0x79a8(%rip), %rdi      # 0xa5a6
pushq $0xd
popq %rbx
movq %rbx, %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x1190
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x1347
movq %r13, %rdi
callq 0x132c
movq (%rbp), %rcx
leaq 0x7b83(%rip), %rdi      # 0xa7b3
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1190
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x132c
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/codegen.c
// Function: gen_lnot
void gen_lnot(Node *node) {
  Type *l_ty = type(node->lhs);
  int reg_mode;
  char *false_label = new_label();
  char *exit_label = new_label();
  gen(node->lhs);

  if (!is_arith(l_ty) && !is_ptr(l_ty))
    error_at_node(node->lhs, "Illegal operation. (Type mismatch)");

  reg_mode = reg_size(l_ty);
  fprintf(output, "\tpop  rax\n");
  fprintf(output, "\tcmp  %s, 0\n", reg_rax[reg_mode]);
  fprintf(output, "\tjne  %s\n", false_label);

  fprintf(output, "\tmov  rax, 1\n");
  emit_jmp(exit_label);

  emit_label(false_label);
  fprintf(output, "\tmov  rax, 0\n");
  emit_label(exit_label);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movq 0x8(%rdi), %rdi
callq 0x9610
movq %rax, %r15
callq 0x12e8
movq %rax, %r14
callq 0x12e8
movq %rax, %rbx
movq 0x8(%r12), %rdi
callq 0x17e5
movq %r15, %rdi
callq 0x91e8
testb %al, %al
jne 0x2cb0
movq %r15, %rdi
callq 0x9198
testb %al, %al
jne 0x2cb0
movq 0x8(%r12), %rdi
leaq 0x7ada(%rip), %rsi      # 0xa783
xorl %eax, %eax
callq 0x4a9e
movq %r15, %rdi
callq 0x14be
movl %eax, %ebp
leaq 0xe55f(%rip), %r13      # 0x11220
movq (%r13), %rcx
leaq 0x7684(%rip), %rdi      # 0xa350
pushq $0xa
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x1190
movq (%r13), %rdi
movslq %ebp, %rax
leaq 0xe417(%rip), %rcx      # 0x11100
leaq (%rcx,%rax,4), %rdx
leaq 0x7ab2(%rip), %rsi      # 0xa7a6
xorl %eax, %eax
callq 0x10f0
movq (%r13), %rdi
leaq 0x7abb(%rip), %rsi      # 0xa7c1
movq %r14, %rdx
xorl %eax, %eax
callq 0x10f0
movq (%r13), %rcx
leaq 0x7a98(%rip), %rdi      # 0xa7b3
pushq $0xd
popq %r12
movq %r12, %rsi
movq %r15, %rdx
callq 0x1190
movq %rbx, %rdi
callq 0x1347
movq %r14, %rdi
callq 0x132c
movq (%r13), %rcx
leaq 0x7861(%rip), %rdi      # 0xa5a6
movq %r12, %rsi
movq %r15, %rdx
callq 0x1190
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x132c
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/codegen.c
// Function: gen_initialize
void gen_initialize(Type *l_ty, int offset, Node *rhs) {
  if (is_array(l_ty) && is_array(type(rhs))) {
    Vector *vec = rhs->nodes;
    Type *ty = l_ty->ptr_to;
    int size = l_ty->array_size;
    for (int i = 0; i < vec_len(vec); i++) {
      if (size <= i) break;
      if (vec->data[i]->kind == ND_INIT) {
        gen_initialize(ty, offset, vec->data[i]);
      } else {
        gen(vec->data[i]);
        fprintf(output, "\tlea  rax, [rbp - %d]\n", offset);
        store(ty);
      }
      offset -= sizeof_type(ty);
    }
  } else if (is_struct(l_ty) && is_struct(type(rhs))) {
    Vector *vec = rhs->nodes;
    MemberInfo *member = l_ty->member;
    for (int i = 0; i < vec_len(vec); i++) {
      if (vec->data[i]->kind == ND_INIT) {
        gen_initialize(member->type, offset - member->offset, vec->data[i]);
      } else {
        gen(vec->data[i]);
        fprintf(output, "\tlea  rax, [rbp - %d]\n", offset - member->offset);
        store(member->type);
      }
      member = member->next;
    }
  } else {
    error_at_node(rhs, "Unsupported initializer.");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
callq 0x919f
testb %al, %al
je 0x2e34
movq %r15, %rdi
callq 0x9610
movq %rax, %rdi
callq 0x919f
testb %al, %al
je 0x2e34
movq 0x48(%r15), %r15
movq 0x8(%r14), %r12
movslq 0x10(%r14), %r13
leaq 0x75c0(%rip), %r14      # 0xa389
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x34f2
cltq
cmpq %rax, %rbp
jge 0x2ee8
cmpq %r13, %rbp
jge 0x2ee8
movq (%r15), %rax
movq (%rax,%rbp,8), %rdx
cmpl $0x3, (%rdx)
jne 0x2dff
movq %r12, %rdi
movl %ebx, %esi
callq 0x2d82
jmp 0x2e25
movq %rdx, %rdi
callq 0x17e5
leaq 0xe412(%rip), %rax      # 0x11220
movq (%rax), %rdi
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x10f0
movq %r12, %rdi
callq 0x1fc2
movq %r12, %rdi
callq 0x929b
subl %eax, %ebx
incq %rbp
jmp 0x2dcb
movq %r14, %rdi
callq 0x91ad
testb %al, %al
je 0x2ec9
movq %r15, %rdi
callq 0x9610
movq %rax, %rdi
callq 0x91ad
testb %al, %al
je 0x2ec9
movq 0x48(%r15), %r15
addq $0x20, %r14
leaq 0xe3b9(%rip), %r13      # 0x11220
leaq 0x751b(%rip), %r12      # 0xa389
xorl %ebp, %ebp
movq (%r14), %r14
movq %r15, %rdi
callq 0x34f2
cltq
cmpq %rax, %rbp
jge 0x2ee8
movq (%r15), %rax
movq (%rax,%rbp,8), %rdx
cmpl $0x3, (%rdx)
jne 0x2e9f
movq 0x10(%r14), %rdi
movl %ebx, %esi
subl 0x18(%r14), %esi
callq 0x2d82
jmp 0x2ec4
movq %rdx, %rdi
callq 0x17e5
movq (%r13), %rdi
movl %ebx, %edx
subl 0x18(%r14), %edx
movq %r12, %rsi
xorl %eax, %eax
callq 0x10f0
movq 0x10(%r14), %rdi
callq 0x1fc2
incq %rbp
jmp 0x2e70
leaq 0x8902(%rip), %rsi      # 0xb7d2
movq %r15, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4a9e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/codegen.c
// Function: eval_const
Node *eval_const(Node *node) {
  long res;
  switch (node->kind) {
    case ND_NUM:
      return node;
    case ND_ADD:
      res = eval_const(node->lhs)->num_val + eval_const(node->rhs)->num_val;
      return new_node_num(res, NULL);
    case ND_SUB:
      res = eval_const(node->lhs)->num_val - eval_const(node->rhs)->num_val;
      return new_node_num(res, NULL);
    case ND_MUL:
      res = eval_const(node->lhs)->num_val * eval_const(node->rhs)->num_val;
      return new_node_num(res, NULL);
    default:
      if (node->kind != ND_NUM)
        error_at_node(node,
                      "Calculation in an initializer is not supported yet.");
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %eax
decl %eax
cmpl $0x5, %eax
ja 0x3128
leaq 0x7049(%rip), %rcx      # 0xa104
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rbx), %rdi
callq 0x30a4
movq 0x20(%rax), %r14
movq 0x10(%rbx), %rdi
callq 0x30a4
addq 0x20(%rax), %r14
jmp 0x3117
movq 0x8(%rbx), %rdi
callq 0x30a4
movq 0x20(%rax), %r14
movq 0x10(%rbx), %rdi
callq 0x30a4
subq 0x20(%rax), %r14
jmp 0x3117
movq 0x8(%rbx), %rdi
callq 0x30a4
movq 0x20(%rax), %r14
movq 0x10(%rbx), %rdi
callq 0x30a4
imulq 0x20(%rax), %r14
movq %r14, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5200
leaq 0x78cf(%rip), %rsi      # 0xa9fe
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a9e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/container.c
// Function: vec_new
Vector *vec_new() {
  Vector *vec = (Vector *)malloc(sizeof(Vector));
  vec->data = (Node **)malloc(5 * sizeof(void *));
  vec->len = 0;
  vec->capacity = 5;
  return vec;
}

// Assembly:
pushq %rbx
pushq $0x10
popq %rdi
callq 0x1110
movq %rax, %rbx
pushq $0x28
popq %rdi
callq 0x1110
movq %rax, (%rbx)
movabsq $0x500000000, %rax      # imm = 0x500000000
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/container.c
// Function: vec_push
void vec_push(Vector *vec, Node *data) {
  if (vec->len == vec->capacity) {
    vec->capacity *= 2;
    vec->data = realloc(vec->data, vec->capacity * sizeof(void *));
  }
  vec->data[vec->len++] = data;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rdi), %ecx
movq (%rdi), %rax
cmpl 0xc(%rdi), %ecx
jne 0x3527
movslq %ecx, %rsi
addl %ecx, %ecx
movl %ecx, 0xc(%r14)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x1140
movq %rax, (%r14)
movl 0x8(%r14), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%r14)
movslq %ecx, %rcx
movq %rbx, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/container.c
// Function: test_vec
void test_vec() {
  Vector *vec = vec_new();
  for (int i = 0; i < 100; i++) vec_push(vec, new_node_num(i, NULL));
  assert_expect(__LINE__, 100, vec_len(vec));
  assert_expect(__LINE__, 0, vec->data[0]->num_val);
  assert_expect(__LINE__, 50, vec->data[50]->num_val);
  assert_expect(__LINE__, 99, vec->data[99]->num_val);
  fprintf(stderr, "test_vec() cleared\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %r14d, %r14d
callq 0x34c8
movq %rax, %rbx
cmpq $0x64, %r14
je 0x356c
movq %r14, %rdi
xorl %esi, %esi
callq 0x5200
movq %rbx, %rdi
movq %rax, %rsi
callq 0x34f6
incq %r14
jmp 0x354c
movslq 0x8(%rbx), %rdx
pushq $0x1c
popq %rdi
pushq $0x64
popq %rsi
callq 0x801c
movq (%rbx), %rbx
movq (%rbx), %rax
movq 0x20(%rax), %rdx
pushq $0x1d
popq %rdi
xorl %esi, %esi
callq 0x801c
movq 0x190(%rbx), %rax
movq 0x20(%rax), %rdx
pushq $0x1e
popq %rdi
pushq $0x32
popq %rsi
callq 0x801c
movq 0x318(%rbx), %rax
movq 0x20(%rax), %rdx
pushq $0x1f
popq %rdi
pushq $0x63
popq %rsi
callq 0x801c
movq 0xda36(%rip), %rax      # 0x10ff8
movq (%rax), %rcx
leaq 0x7510(%rip), %rdi      # 0xaadc
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1190
nop
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/debug.c
// Function: print_tokens
void print_tokens(FILE *stream, Token *token) {
  fprintf(stream, "// ");
  while (token) {
    print_token(stream, token);
    if (token->kind == TK_SEMI) fprintf(stream, "\n// ");
    token = token->next;
  }
  fprintf(stream, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7695(%rip), %rdi      # 0xad17
pushq $0x3
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1190
leaq 0x767b(%rip), %r12      # 0xad16
pushq $0x4
popq %r13
testq %r14, %r14
je 0x36cc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35e0
cmpl $0x1c, (%r14)
jne 0x36c6
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1190
movq 0x8(%r14), %r14
jmp 0x369f
pushq $0xa
popq %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x10c0
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/debug.c
// Function: print_nodes
void print_nodes() {
  int len = vec_len(ext_declarations);
  for (int i = 0; i < len; i++) {
    Node *node = ext_declarations->data[i];
    fprintf(output, "// ");
    print_node(node);
    fprintf(output, "\n");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xd1a3(%rip), %rax      # 0x11238
movq (%rax), %rdi
callq 0x34f2
movl %eax, %ebx
xorl %r14d, %r14d
testl %eax, %eax
cmovlel %r14d, %ebx
leaq 0xd171(%rip), %r15      # 0x11220
pushq $0x1
popq %r12
pushq $0xa
popq %rbp
cmpq %r14, %rbx
je 0x40f8
leaq 0xd176(%rip), %rax      # 0x11238
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %r13
movq (%r15), %rcx
leaq 0x6c41(%rip), %rdi      # 0xad17
pushq $0x3
popq %rsi
movq %r12, %rdx
callq 0x1190
movq %r13, %rdi
callq 0x36e0
movq (%r15), %rsi
movl %ebp, %edi
callq 0x10c0
incq %r14
jmp 0x40b6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/debug.c
// Function: print_struct_member
void print_struct_member(FILE *stream, MemberInfo *member) {
  bool first = true;
  while (member) {
    if (!first) fprintf(stream, ", ");
    first = false;
    print_type(stream, member->type);
    if (member->ident)
      fprintf(stream, "<%.*s:%d>", member->ident->len, member->ident->str,
              member->offset);
    else
      fprintf(stream, "<>");
    member = member->next;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movb $0x1, %al
pushq $0x2
popq %r12
pushq $0x1
popq %r13
leaq 0x6df7(%rip), %rbp      # 0xaf20
leaq 0x6d91(%rip), %r15      # 0xaec1
testq %rbx, %rbx
je 0x4195
testb $0x1, %al
jne 0x414a
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x1190
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x3d91
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x4179
movl 0x28(%rax), %edx
movq 0x20(%rax), %rcx
movl 0x18(%rbx), %r8d
movq %r14, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x10f0
jmp 0x418e
leaq 0x6daa(%rip), %rdi      # 0xaf2a
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x1190
movq (%rbx), %rbx
xorl %eax, %eax
jmp 0x4130
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/debug.c
// Function: print_enum_member
void print_enum_member(MemberInfo *member) {
  bool first = true;
  while (member) {
    if (!first) fprintf(output, ", ");
    first = false;
    print_type(output, member->type);
    member = member->next;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movb $0x1, %al
leaq 0xd067(%rip), %r13      # 0x11220
leaq 0x6d01(%rip), %r14      # 0xaec1
pushq $0x2
popq %r15
pushq $0x1
popq %r12
testq %rbx, %rbx
je 0x41f7
testb $0x1, %al
jne 0x41e3
movq (%r13), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1190
movq (%r13), %rdi
movq 0x10(%rbx), %rsi
callq 0x3d91
movq (%rbx), %rbx
xorl %eax, %eax
jmp 0x41c8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/debug.c
// Function: print_locals
void print_locals() {
  LVar *var = locals;
  while (var) {
    fprintf(output, "//    %.*s  offset:%d  ", var->token->len, var->token->str,
            var->offset);
    print_type(output, var->type);
    fprintf(output, "\n");
    var = var->next;
  }
  fprintf(output, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xd039(%rip), %r14      # 0x11248
leaq 0xd00a(%rip), %r15      # 0x11220
leaq 0x6d10(%rip), %rbx      # 0xaf2d
pushq $0xa
popq %rbp
movq (%r14), %r14
movq (%r15), %rsi
testq %r14, %r14
je 0x425f
movq 0x8(%r14), %rax
movl 0x28(%rax), %edx
movq 0x20(%rax), %rcx
movl 0x18(%r14), %r8d
movq %rsi, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10f0
movq (%r15), %rdi
movq 0x10(%r14), %rsi
callq 0x3d91
movq (%r15), %rsi
movl %ebp, %edi
callq 0x10c0
jmp 0x4220
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x10c0
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/debug.c
// Function: print_globals
void print_globals() {
  Global *global = globals;
  fprintf(output, "// Globals\n");
  while (global) {
    fprintf(output, "// %.*s ", global->token->len, global->token->str);
    print_type(output, global->type);
    print_node(global->body);
    fprintf(output, "\n");
    global = global->next;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xcfb1(%rip), %rax      # 0x11230
movq (%rax), %r14
leaq 0xcf97(%rip), %r15      # 0x11220
movq (%r15), %rcx
leaq 0x6cb2(%rip), %rdi      # 0xaf45
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
leaq 0x6cac(%rip), %rbx      # 0xaf51
pushq $0xa
popq %rbp
testq %r14, %r14
je 0x42e9
movq (%r15), %rdi
movq 0x8(%r14), %rax
movl 0x28(%rax), %edx
movq 0x20(%rax), %rcx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10f0
movq (%r15), %rdi
movq 0x10(%r14), %rsi
callq 0x3d91
movq 0x18(%r14), %rdi
callq 0x36e0
movq (%r15), %rsi
movl %ebp, %edi
callq 0x10c0
movq (%r14), %r14
jmp 0x42a8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/debug.c
// Function: print_funcs
void print_funcs() {
  Function *func = functions;
  fprintf(output, "// Functions\n");
  while (func) {
    fprintf(output, "// %.*s ", func->token->len, func->token->str);
    print_type(output, func->type);
    fprintf(output, "\n");
    func = func->next;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xcf66(%rip), %rax      # 0x11268
movq (%rax), %r14
leaq 0xcf14(%rip), %r15      # 0x11220
movq (%r15), %rcx
leaq 0x6c44(%rip), %rdi      # 0xaf5a
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
leaq 0x6c29(%rip), %rbx      # 0xaf51
pushq $0xa
popq %rbp
testq %r14, %r14
je 0x4363
movq (%r15), %rdi
movq 0x8(%r14), %rax
movl 0x28(%rax), %edx
movq 0x20(%rax), %rcx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10f0
movq (%r15), %rdi
movq 0x10(%r14), %rsi
callq 0x3d91
movq (%r15), %rsi
movl %ebp, %edi
callq 0x10c0
movq (%r14), %r14
jmp 0x432b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/debug.c
// Function: print_strings
void print_strings() {
  fprintf(output, "// Strings\n");
  int i = 0;
  while (i < vec_len(strings)) {
    Token *t = strings->data[i]->token;
    fprintf(output, "// \"");
    for (; t; t = t->next) fprintf(output, "%.*s", t->len, t->str);
    fprintf(output, "\"\n");
    i++;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xcea0(%rip), %r14      # 0x11220
movq (%r14), %rcx
leaq 0x6bde(%rip), %rdi      # 0xaf68
pushq $0xb
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x1190
leaq 0xce79(%rip), %r15      # 0x11218
leaq 0x66f2(%rip), %rbp      # 0xaa98
xorl %r12d, %r12d
movq (%r15), %rdi
callq 0x34f2
cltq
cmpq %rax, %r12
jge 0x4418
movq (%r15), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x50(%rax), %r13
movq (%r14), %rcx
leaq 0x6ba4(%rip), %rdi      # 0xaf74
pushq $0x4
popq %rsi
movq %rbx, %rdx
callq 0x1190
movq (%r14), %rax
testq %r13, %r13
je 0x43fe
movl 0x28(%r13), %edx
movq 0x20(%r13), %rcx
movq %rax, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x10f0
movq 0x8(%r13), %r13
jmp 0x43db
leaq 0x6d31(%rip), %rdi      # 0xb136
pushq $0x2
popq %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x1190
incq %r12
jmp 0x43a9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/debug.c
// Function: print_structs
void print_structs() {
  TagName *tag = tagnames;
  fprintf(output, "\n// Tagnames\n");
  while (tag) {
    if (tag->ident)
      fprintf(output, "// %.*s ", tag->ident->len, tag->ident->str);
    else
      fprintf(output, "// anonymus ");
    if (is_struct(tag->type)) {
      fprintf(output, "struct { ");
      print_struct_member(output, tag->type->member);
      fprintf(output, "}\n");
    } else if (is_enum(tag->type)) {
      fprintf(output, "enum { ");
      print_enum_member(tag->type->member);
      fprintf(output, "}\n");
    } else if (is_enum_el(tag->type)) {
      fprintf(output, "enum_el { %d }\n", tag->type->offset);
    }
    tag = tag->next;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xce1f(%rip), %rax      # 0x11258
movq (%rax), %r12
leaq 0xcddd(%rip), %r13      # 0x11220
movq (%r13), %rcx
leaq 0x6b2b(%rip), %rdi      # 0xaf79
pushq $0xd
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x1190
leaq 0x6b50(%rip), %rbp      # 0xafb3
pushq $0x2
popq %r14
leaq 0x6ae3(%rip), %r15      # 0xaf51
testq %r12, %r12
je 0x455f
movq 0x8(%r12), %rcx
movq (%r13), %rax
testq %rcx, %rcx
je 0x449b
movl 0x28(%rcx), %edx
movq 0x20(%rcx), %rcx
movq %rax, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x10f0
jmp 0x44b0
leaq 0x6ae5(%rip), %rdi      # 0xaf87
pushq $0xc
popq %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x1190
movq 0x10(%r12), %rdi
callq 0x91ad
testb %al, %al
je 0x44e8
movq (%r13), %rcx
leaq 0x6acb(%rip), %rdi      # 0xaf94
pushq $0x9
popq %rsi
movq %rbx, %rdx
callq 0x1190
movq (%r13), %rdi
movq 0x10(%r12), %rax
movq 0x20(%rax), %rsi
callq 0x4107
jmp 0x451a
movq 0x10(%r12), %rdi
callq 0x91b4
testb %al, %al
je 0x4535
movq (%r13), %rcx
leaq 0x6a9d(%rip), %rdi      # 0xaf9e
pushq $0x7
popq %rsi
movq %rbx, %rdx
callq 0x1190
movq 0x10(%r12), %rax
movq 0x20(%rax), %rdi
callq 0x41a4
movq (%r13), %rcx
movq %rbp, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1190
movq (%r12), %r12
jmp 0x446e
movq 0x10(%r12), %rdi
callq 0x91bb
testb %al, %al
je 0x452c
movq (%r13), %rdi
movq 0x10(%r12), %rax
movl 0x28(%rax), %edx
leaq 0x6a50(%rip), %rsi      # 0xafa6
xorl %eax, %eax
callq 0x10f0
jmp 0x452c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/debug.c
// Function: print_typedefs
void print_typedefs() {
  fprintf(output, "\n// Typedef\n");
  Typedef *tdef = tdef_names;
  while (tdef) {
    fprintf(output, "// %.*s ", tdef->ident->len, tdef->ident->str);
    print_type(output, tdef->type);
    fprintf(output, "\n");
    tdef = tdef->next;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xcca4(%rip), %r14      # 0x11220
movq (%r14), %rcx
leaq 0x6a30(%rip), %rdi      # 0xafb6
pushq $0xc
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
leaq 0xccc8(%rip), %r15      # 0x11260
leaq 0x69b2(%rip), %rbx      # 0xaf51
pushq $0xa
popq %rbp
movq (%r15), %r15
testq %r15, %r15
je 0x45da
movq (%r14), %rdi
movq 0x10(%r15), %rax
movl 0x28(%rax), %edx
movq 0x20(%rax), %rcx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10f0
movq (%r14), %rdi
movq 0x8(%r15), %rsi
callq 0x3d91
movq (%r14), %rsi
movl %ebp, %edi
callq 0x10c0
jmp 0x45a2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/error.c
// Function: get_line
int get_line(char *p, char *source) {
  char *cursor;
  int line = 1;
  if (p < source) error("Illegal position in source.");
  while (cursor = strchr(source, '\n')) {
    if (cursor > p) break;
    source = cursor + 1;
    line++;
  }
  return line;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpq %rsi, %rdi
jb 0x4621
movq %rsi, %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
pushq $0xa
popq %r14
movq %rax, %rdi
movl %r14d, %esi
callq 0x10a0
testq %rax, %rax
je 0x461a
cmpq %rbx, %rax
ja 0x461a
incq %rax
incl %ebp
jmp 0x45fe
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x699b(%rip), %rdi      # 0xafc3
xorl %eax, %eax
callq 0x462f
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/error.c
// Function: get_pos
PosInfo *get_pos(char *p, char *source) {
  char *cursor;
  int line = 1;
  while (cursor = strchr(source, '\n')) {
    if (cursor > p) break;
    source = cursor + 1;
    line++;
  }
  if (!cursor) cursor = strchr(p, '\0');

  PosInfo *pos = calloc(1, sizeof(PosInfo));
  pos->line = line;
  pos->pos_in_line = (int)(p - source);
  pos->line_start = source;
  pos->line_len = (int)(cursor - source);
  return pos;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x1
popq %r12
pushq $0xa
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq 0x10a0
movq %rax, %r15
testq %rax, %rax
je 0x470a
cmpq %rbx, %r15
ja 0x470a
incq %r15
incl %r12d
movq %r15, %r14
jmp 0x46e8
testq %r15, %r15
jne 0x471d
movq %rbx, %rdi
callq 0x1090
movq %rax, %r15
addq %rbx, %r15
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x10d0
movl %r12d, (%rax)
subl %r14d, %ebx
movl %ebx, 0x4(%rax)
movq %r14, 0x8(%rax)
subl %r14d, %r15d
movl %r15d, 0x10(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/error.c
// Function: print_error_line
void print_error_line(FileInfo *fi, PosInfo *pos, int len) {
  fprintf(stderr, "error in file: %s:%d\n", fi->file_name, pos->line);
  fprintf(stderr, "%.*s\n", pos->line_len, pos->line_start);
  fprintf(stderr, "%*s%.*s\n", pos->pos_in_line, "", len,
          "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq 0xc868(%rip), %r15      # 0x10ff8
movq (%r15), %rax
movq 0x8(%rdi), %rdx
movl (%rsi), %ecx
leaq 0x6865(%rip), %rsi      # 0xb005
movq %rax, %rdi
xorl %eax, %eax
callq 0x10f0
movq (%r15), %rdi
movl 0x10(%r14), %edx
movq 0x8(%r14), %rcx
leaq 0x62f8(%rip), %rsi      # 0xaab4
xorl %eax, %eax
callq 0x10f0
movq (%r15), %rdi
movl 0x4(%r14), %edx
leaq 0x684a(%rip), %rsi      # 0xb01b
leaq 0x6960(%rip), %rcx      # 0xb138
leaq 0x6845(%rip), %r9       # 0xb024
movl %ebx, %r8d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x10f0
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/error.c
// Function: error_at_char
void error_at_char(FileInfo *fi, char *err_char, char *fmt, ...) {
  va_list ap;
  va_start(ap, fmt);

  PosInfo *pos = get_pos(err_char, fi->start);
  print_error_line(fi, pos, 1);
  vfprintf(stderr, fmt, ap);
  fprintf(stderr, "\n");
  exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x20(%rsp), %rsi
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x4850
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r15
movq %rsi, 0x10(%r15)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%r15)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%r15)
movq 0x10(%rdi), %rsi
movq %rdx, %rdi
callq 0x46d3
pushq $0x1
popq %rbp
movq %r14, %rdi
movq %rax, %rsi
movl %ebp, %edx
callq 0x477f
movq 0xc765(%rip), %r14      # 0x10ff8
movq (%r14), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1160
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x10c0
movl %ebp, %edi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/error.c
// Function: error_at_token
void error_at_token(Token *token, char *fmt, ...) {
  va_list ap;
  va_start(ap, fmt);

  FileInfo *fi = get_file_info(token->str);
  PosInfo *pos = get_pos(token->str, fi->start);

  print_error_line(fi, pos, token->len);
  vfprintf(stderr, fmt, ap);
  fprintf(stderr, "\n");
  exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x4917
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rsi, 0x10(%r14)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r14)
movq 0x20(%rdi), %rdi
callq 0x4745
movq %rax, %r12
movq 0x20(%r15), %rdi
movq 0x10(%rax), %rsi
callq 0x46d3
movl 0x28(%r15), %edx
movq %r12, %rdi
movq %rax, %rsi
callq 0x477f
movq 0xc692(%rip), %r15      # 0x10ff8
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1160
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x10c0
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/error.c
// Function: new_span
Span *new_span(Token *token) {
  char *start = token->str;
  Span *span = calloc(1, sizeof(Span));
  span->start = start;
  span->end = start + token->len;
  return span;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %r14
pushq $0x1
popq %rdi
pushq $0x10
popq %rsi
callq 0x10d0
movq %r14, (%rax)
movslq 0x28(%rbx), %rcx
addq %r14, %rcx
movq %rcx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/error.c
// Function: merge_span
void merge_span(Span *span1, Span *span2) {
  if (!span1 || !span2) {
    fprintf(stderr, "null span\n");
    return;
  }
  // fprintf(stderr, "merge (%d:%d) (%d:%d)\n", span1->start, span1->end,
  //       span2->start, span2->end);
  if (span2->start < span1->start) span1->start = span2->start;
  if (span1->end < span2->end) span1->end = span2->end;
  return;
}

// Assembly:
testq %rdi, %rdi
je 0x49d7
testq %rsi, %rsi
je 0x49d7
movq (%rsi), %rax
cmpq (%rdi), %rax
jae 0x49c8
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
cmpq %rax, 0x8(%rdi)
jae 0x49d6
movq %rax, 0x8(%rdi)
retq
movq 0xc61a(%rip), %rax      # 0x10ff8
movq (%rax), %rcx
leaq 0x665a(%rip), %rdi      # 0xb042
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/error.c
// Function: get_node_span
Span *get_node_span(Node *node) {
  Span *span;
  // print_node(node);
  switch (node->kind) {
    case ND_IDENT:
    case ND_NUM:
    case ND_LVAR:
    case ND_GVAR:
    case ND_STR:
    case ND_INIT:
      span = new_span(node->token);
      break;
    case ND_ADD:
    case ND_SUB:
    case ND_MUL:
    case ND_DIV:
    case ND_EQ:
    case ND_NEQ:
    case ND_GE:
    case ND_GT:

    case ND_LAND:
    case ND_LOR:
    case ND_NOT:
    case ND_AND:
    case ND_OR:
    case ND_XOR:
    case ND_SHR:
    case ND_SHL:

    case ND_ASSIGN:
      span = new_span(node->token);
      merge_span(span, get_node_span(node->lhs));
      merge_span(span, get_node_span(node->rhs));
      break;
    case ND_ADDR:
    case ND_DEREF:
    case ND_MEMBER:
    case ND_CALL:
    case ND_CAST:
      span = new_span(node->token);
      merge_span(span, get_node_span(node->lhs));
      break;
    default:
      fprintf(stderr, "node span is not determined for this Node type.\n");
      span = new_span(node->token);
  }
  // fprintf(stderr, "span (%d:%d)\n", span->start, span->end);
  return span;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x1c, %eax
ja 0x4a80
movl $0x2ffff0, %ecx         # imm = 0x2FFFF0
btl %eax, %ecx
jae 0x4a31
movq 0x50(%rbx), %rdi
callq 0x4987
movq %rax, %r14
movq 0x8(%rbx), %rdi
callq 0x49f3
movq %r14, %rdi
movq %rax, %rsi
callq 0x49b3
movq 0x10(%rbx), %rdi
jmp 0x4a65
movl $0x300000f, %ecx        # imm = 0x300000F
btl %eax, %ecx
jae 0x4a4b
movq 0x50(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4987
movl $0x1cc00000, %ecx       # imm = 0x1CC00000
btl %eax, %ecx
jae 0x4a80
movq 0x50(%rbx), %rdi
callq 0x4987
movq %rax, %r14
movq 0x8(%rbx), %rdi
callq 0x49f3
movq %r14, %rdi
movq %rax, %rsi
callq 0x49b3
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0xc571(%rip), %rax      # 0x10ff8
movq (%rax), %rcx
leaq 0x65bc(%rip), %rdi      # 0xb04d
pushq $0x30
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
jmp 0x4a3b
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/error.c
// Function: error_at_node
void error_at_node(Node *node, char *fmt, ...) {
  va_list ap;
  va_start(ap, fmt);

  Span *span = get_node_span(node);
  FileInfo *fi = get_file_info(span->start);
  PosInfo *pos = get_pos(span->start, fi->start);

  print_error_line(fi, pos, (int)(span->end - span->start));
  vfprintf(stderr, fmt, ap);
  fprintf(stderr, "\n");
  exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x4aff
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rsi, 0x10(%r14)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r14)
callq 0x49f3
movq %rax, %r15
movq (%rax), %rdi
callq 0x4745
movq %rax, %r12
movq (%r15), %rdi
movq 0x10(%rax), %rsi
callq 0x46d3
movl 0x8(%r15), %edx
subl (%r15), %edx
movq %r12, %rdi
movq %rax, %rsi
callq 0x477f
movq 0xc4a1(%rip), %r15      # 0x10ff8
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1160
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x10c0
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/monocc.c
// Function: read_file
char *read_file(char *path) {
  FILE *fp = fopen(path, "r");
  if (!fp) error("cannot open %s: %s\n", path, strerror(errno));

  if (fseek(fp, 0, SEEK_END) == -1)
    error("%s: fseek: %s\n", path, strerror(errno));
  size_t size = ftell(fp);
  if (fseek(fp, 0, SEEK_SET) == -1)
    error("%s: fseek: %s\n", path, strerror(errno));

  char *buf = calloc(1, size + 8);
  fread(buf, size, 1, fp);

  if (size == 0 || buf[size - 1] != '\n') buf[size++] = '\n';
  buf[size] = '\0';
  fclose(fp);
  // fprintf(stderr, "monocc: file read\n");
  // fprintf(stderr, "%s", buf);
  return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x6e48(%rip), %rsi      # 0xb9d2
callq 0x1150
movq %rax, %rbx
testq %rax, %rax
jne 0x4bb7
callq 0x1030
movl (%rax), %edi
callq 0x11a0
leaq 0x6520(%rip), %rdi      # 0xb0ca
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x462f
pushq $0x2
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1130
cmpl $-0x1, %eax
jne 0x4be9
callq 0x1030
movl (%rax), %edi
callq 0x11a0
leaq 0x6502(%rip), %rdi      # 0xb0de
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x462f
movq %rbx, %rdi
callq 0x1100
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1130
cmpl $-0x1, %eax
jne 0x4c25
callq 0x1030
movl (%rax), %edi
callq 0x11a0
leaq 0x64c6(%rip), %rdi      # 0xb0de
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x462f
leaq 0x8(%r15), %rsi
pushq $0x1
popq %r12
movq %r12, %rdi
callq 0x10d0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1070
testq %r15, %r15
je 0x4c56
cmpb $0xa, -0x1(%r14,%r15)
je 0x4c5e
movb $0xa, (%r14,%r15)
incq %r15
movb $0x0, (%r14,%r15)
movq %rbx, %rdi
callq 0x1080
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/monocc.c
// Function: create_token
Token *create_token(TokenKind kind, char *str, int len) {
  Token *new_token = calloc(1, sizeof(Token));
  new_token->kind = kind;
  new_token->str = str;
  new_token->len = len;
  return new_token;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %ebp
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x10d0
movl %ebp, (%rax)
movq %r14, 0x20(%rax)
movl %ebx, 0x28(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/parse.c
// Function: new_node_num
Node *new_node_num(long val, Token *token) {
  Node *node = calloc(1, sizeof(Node));
  node->kind = ND_NUM;
  node->num_val = val;
  node->token = token;
  node->type = new_type_int();
  return node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x68
popq %rsi
callq 0x10d0
movq %rax, %r15
movl $0x1, (%rax)
movq %r14, 0x20(%rax)
movq %rbx, 0x50(%rax)
xorl %eax, %eax
callq 0x9084
movq %rax, 0x58(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/parse.c
// Function: new_node_ident
Node *new_node_ident(Token *token) {
  Node *node = calloc(1, sizeof(Node));
  node->kind = ND_IDENT;
  node->token = token;
  return node;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rdi
pushq $0x68
popq %rsi
callq 0x10d0
movq %rbx, 0x50(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/parse.c
// Function: new_node_lvar
Node *new_node_lvar(LVar *lvar, Token *token) {
  Node *node = calloc(1, sizeof(Node));
  node->kind = ND_LVAR;
  node->lvar = lvar;
  node->token = token;
  node->type = lvar->type;
  return node;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x68
popq %rsi
callq 0x10d0
movl $0x18, (%rax)
movq %r14, 0x30(%rax)
movq %rbx, 0x50(%rax)
movq 0x10(%r14), %rcx
movq %rcx, 0x58(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/parse.c
// Function: new_node_gvar
Node *new_node_gvar(Global *gvar, Token *token) {
  Node *node = calloc(1, sizeof(Node));
  node->kind = ND_GVAR;
  node->token = token;
  node->type = gvar->type;
  return node;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x68
popq %rsi
callq 0x10d0
movl $0x19, (%rax)
movq %rbx, 0x50(%rax)
movq 0x10(%r14), %rcx
movq %rcx, 0x58(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/parse.c
// Function: new_node_binary
Node *new_node_binary(NodeKind kind, Node *lhs, Node *rhs, Token *op_token) {
  Node *node = calloc(1, sizeof(Node));
  node->kind = kind;
  node->lhs = get_ptr_if_array(lhs);
  node->rhs = get_ptr_if_array(rhs);
  node->token = op_token;
  // node->type = type(node);
  return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
pushq $0x1
popq %rdi
pushq $0x68
popq %rsi
callq 0x10d0
movq %rax, %r12
movl %ebp, (%rax)
movq %r15, %rdi
callq 0x5470
movq %rax, 0x8(%r12)
movq %r14, %rdi
callq 0x5470
movq %rax, 0x10(%r12)
movq %rbx, 0x50(%r12)
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq