LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/fnf/fnf.c
// Function: print_fnf
void print_fnf(char* type, FILE* file, const Fnf* fnf) {
  fprintf(file,"p %s %"PRIlitS" %"PRIsS"\n",type,fnf->var_count,fnf->litset_count);
  for (SddSize i=0; i<fnf->litset_count; i++) {
    LitSet* litset = fnf->litsets + i;
    for (SddLiteral j=0; j<litset->literal_count; j++) fprintf(file,"%"PRIlitS" ",litset->literals[j]);
    fprintf(file,"0\n");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rdx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
leaq 0x20446(%rip), %rsi     # 0x23132
movq %r14, %rdi
xorl %eax, %eax
callq 0x2150
cmpq $0x0, 0x8(%rbx)
je 0x2d68
leaq 0x20426(%rip), %r15     # 0x2312a
xorl %r13d, %r13d
movq 0x10(%rbx), %rbp
leaq (,%r13,2), %rax
addq %r13, %rax
shlq $0x4, %rax
cmpq $0x0, 0x8(%rbp,%rax)
jle 0x2d46
addq %rax, %rbp
xorl %r12d, %r12d
movq 0x10(%rbp), %rax
movq (%rax,%r12,8), %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2150
incq %r12
cmpq 0x8(%rbp), %r12
jl 0x2d28
movl $0x2, %esi
movl $0x1, %edx
leaq 0x203e9(%rip), %rdi     # 0x23140
movq %r14, %rcx
callq 0x2290
incq %r13
cmpq 0x8(%rbx), %r13
jb 0x2d07
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/fnf/io.c
// Function: cnf_int_strtok
static int cnf_int_strtok() {
  static const char* whitespace = " \t\n\v\f\r";
  char* token = strtok(NULL,whitespace);
  test_parse_fnf_file(token == NULL,"Unexpected end of file.");
  return atoi(token);
}

// Assembly:
pushq %rbx
leaq 0x1fb4f(%rip), %rsi     # 0x231cb
xorl %edi, %edi
callq 0x2230
movq %rax, %rbx
xorl %edi, %edi
testq %rax, %rax
sete %dil
leaq 0x1fb83(%rip), %rsi     # 0x23219
callq 0x3666
movq %rbx, %rdi
popq %rbx
jmp 0x2260
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/trim/move.c
// Function: is_feature_var_in_vtree
int is_feature_var_in_vtree(SddLiteral* const feature_vars,
    const size_t num_vars, Vtree* vtree) {
  if (sdd_vtree_is_leaf(vtree)) {
    SddLiteral var = sdd_vtree_var(vtree);
    for (int i = 0; i < num_vars; i++) { // enough to check 1 feature var
      if (feature_vars[i] == var) return 1;
    }
    return 0;
  }
  return is_feature_var_in_vtree(feature_vars, num_vars, sdd_vtree_left(vtree));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
callq 0x9dd0
movq %r15, %rdi
testl %eax, %eax
jne 0x36ce
callq 0x6930
movq %rax, %r15
movq %rax, %rdi
jmp 0x36b5
callq 0x6970
testq %rbx, %rbx
je 0x3703
movl $0x1, %ecx
cmpq %rax, (%r14)
je 0x3705
movl $0x1, %ecx
movq %rcx, %rdx
cmpq %rcx, %rbx
je 0x36f9
leaq 0x1(%rdx), %rcx
cmpq %rax, (%r14,%rdx,8)
jne 0x36e7
xorl %ecx, %ecx
cmpq %rbx, %rdx
setb %cl
jmp 0x3705
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/trim/move.c
// Function: sdd_move_var_to_pos
SddNode* sdd_move_var_to_pos(SddLiteral var, int to_left, Vtree* new_sibling,
    SddNode* node, SddManager* manager) {
  if (to_left) {
    Vtree* left = sdd_vtree_left(new_sibling);
    if (left != NULL && sdd_vtree_var(left) == var) {
      return node;
    }
  } else {
    Vtree* right = sdd_vtree_right(new_sibling);
    if (right != NULL && sdd_vtree_var(right) == var) {
      return node;
    }
  }

  // Condition the SDD node on positive and negative literals of var.
  // Resulting SDD nodes do not contain var, and now we can move it freely.
  SddNode* node1 = sdd_condition(var, node, manager);
  SddNode* node0 = sdd_condition(-var, node, manager);

  // Garbage collect node
  sdd_ref(node1, manager);
  sdd_ref(node0, manager);
  sdd_deref(node, manager);
  sdd_manager_garbage_collect(manager);

  // Move variable to left/right of new_sibling and join the SDDs
  SddNode* tmp1;
  SddNode* tmp0;
  move_var_in_vtree(var, to_left ? 'l' : 'r', new_sibling, manager);
  node1 = sdd_conjoin(sdd_manager_literal(var,manager), tmp1=node1, manager);
  node0 = sdd_conjoin(sdd_manager_literal(-var,manager), tmp0=node0, manager);
  SddNode* return_node = sdd_disjoin(node1, node0, manager);

  // Garbage collect node1 and node0
  sdd_ref(return_node, manager);
  sdd_deref(tmp1, manager);
  sdd_deref(tmp0, manager);
  sdd_manager_garbage_collect(manager);

  return return_node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbp
movq %rdx, %rdi
testl %esi, %esi
je 0x3738
callq 0x6930
movb $0x6c, %r12b
jmp 0x3740
callq 0x6940
movb $0x72, %r12b
testq %rax, %rax
je 0x3756
movq %rax, %rdi
callq 0x6970
cmpq %rbp, %rax
je 0x3835
movb %r12b, 0xf(%rsp)
movq %rbp, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xdf10
movq %rax, %r13
movq %r15, 0x10(%rsp)
movq %rbp, %r15
negq %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xdf10
movq %rax, %r12
movq %r13, %rdi
movq %rbx, %rsi
callq 0x99a0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x99a0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9a90
movq %rbx, %rdi
callq 0x6610
movzbl 0xf(%rsp), %esi
movq %rbp, %rdi
movq 0x10(%rsp), %rdx
movq %rbx, %rcx
callq 0xa360
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x65a0
movq %rax, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x65f0
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x65a0
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x65f0
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x6600
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x99a0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x9a90
movq %r12, %rdi
movq %rbx, %rsi
callq 0x9a90
movq %rbx, %rdi
callq 0x6610
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/trim/move.c
// Function: sdd_move_feature_to_pos
SddNode* sdd_move_feature_to_pos(SddNode* node, SddManager* manager,
    SddLiteral* const feature_vars, const size_t num_vars, const int rl_pos,
    const int no_check) {
  SddNode* return_node = node;

  // new_sibling should point to rl_pos'th node in the rightmost path
  Vtree* new_sibling = sdd_vtree_of(node);  
  for (int i = 0; i < rl_pos; i++) new_sibling = sdd_vtree_right(new_sibling);

  // Return if already in position
  if (!no_check && is_feature_var_in_vtree(feature_vars, num_vars,
                                           sdd_vtree_left(new_sibling))) {
    return return_node;
  }

  for (int i = 0; i < num_vars; i++) {
    // Move the first indicator to the left of new_sibling, and the rest to
    // the right of new_sibling
    return_node = sdd_move_var_to_pos(feature_vars[i], (i==0), new_sibling,
                                      return_node, manager);
    new_sibling = sdd_vtree_of(sdd_manager_literal(feature_vars[i],manager));
  }

  return return_node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0x65e0
movq %rax, %r13
testl %ebp, %ebp
jle 0x3881
movq %r13, %rdi
callq 0x6940
movq %rax, %r13
decl %ebp
jne 0x3872
cmpl $0x0, 0x4(%rsp)
je 0x388f
testq %r14, %r14
jne 0x38b4
jmp 0x38f3
movq %r13, %rdi
callq 0x6930
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x36a4
testl %eax, %eax
sete %al
testq %r14, %r14
setne %cl
testb %cl, %al
je 0x38f3
xorl %ebp, %ebp
movq (%r15,%rbp,8), %rdi
xorl %esi, %esi
testq %rbp, %rbp
sete %sil
movq %r13, %rdx
movq %rbx, %rcx
movq %r12, %r8
callq 0x370d
movq %rax, %rbx
movq (%r15,%rbp,8), %rdi
movq %r12, %rsi
callq 0x65a0
movq %rax, %rdi
callq 0x65e0
movq %rax, %r13
incq %rbp
cmpq %rbp, %r14
jne 0x38b6
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/trim/search.c
// Function: update_constrained_positions
void update_constrained_positions(
    const Vtree* vtree, const int y, const int xy,
    SddLiteral* y_vtree, SddLiteral* xy_vtree) {
  if (y == 0) { // update Y-constrained vtree position
    *y_vtree = sdd_vtree_position(vtree);
  } 
  if (xy == 0) { // update XY-constrained vtree position
    *xy_vtree = sdd_vtree_position(vtree);
    return;
  }
  update_constrained_positions(sdd_vtree_right(vtree), y-1, xy-1, y_vtree, xy_vtree);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r12
xorl %r13d, %r13d
cmpl %r13d, %r15d
jne 0x3934
movq %r12, %rdi
callq 0x6990
movq %rax, (%r14)
movq %r12, %rdi
cmpl %r13d, %ebp
je 0x3949
callq 0x6940
movq %rax, %r12
incl %r13d
jmp 0x3924
callq 0x6990
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/trim/search.c
// Function: compute_maa_with_sdd
void compute_maa_with_sdd(SearchData* data, SearchResult* result, SddNode** node, SddManager* manager,
  char* subset, int feature_to_remove, int y_size, SddWmc* maa, SddWmc* bound, int move_only) {
  // Move feature_to_remove to left child of Y-constrained node
  Feature* feature = data->features[feature_to_remove];
  *node = sdd_move_feature_to_pos(*node, manager, feature->indicators,
                                  feature->num_indicators, y_size+1, 0); // need to move to y_size+1 since moving down

  Vtree* vtree = sdd_manager_vtree(manager);
  SddLiteral y_vtree, xy_vtree;   
  update_constrained_positions(vtree, y_size, data->num_features, &y_vtree, &xy_vtree);

  if (move_only) return;

  // Compute E-SDP
  EsdpManager* e_manager = esdp_manager_new(*node, manager, data->literal_weights);  
  *bound = compute_mpa(e_manager, data->decision, data->threshold, xy_vtree, y_vtree, maa);

  esdp_manager_free(e_manager);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r14
movq 0x60(%rsp), %rbp
movq 0x58(%rsp), %rbx
movl 0x50(%rsp), %r13d
movq 0x28(%rdi), %rax
movslq %r9d, %rcx
movq (%rax,%rcx,8), %rax
movq (%rdx), %rdi
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leal 0x1(%r13), %r8d
movq %r15, %rsi
xorl %r9d, %r9d
callq 0x3847
movq %rax, (%r12)
movq %r15, %rdi
callq 0x6870
movl 0x20(%r14), %edx
leaq 0x10(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %rax, %rdi
movl %r13d, %esi
callq 0x3908
cmpl $0x0, 0x68(%rsp)
je 0x3a29
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rdi
movq 0x8(%r14), %rdx
movq %r15, %rsi
callq 0xe2d0
movq %rax, %r15
movq 0x18(%r14), %rsi
movsd 0x30(%r14), %xmm0
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq %rax, %rdi
movq %rbx, %r8
callq 0xe6b0
movsd %xmm0, (%rbp)
movq %r15, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe380
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/trim/search.c
// Function: cmp_by_bound_inc
static inline
int cmp_by_bound_inc(const void* n1, const void* n2) {
  const SddWmc s1 = (*((const SddWmc**) n1))[1];
  const SddWmc s2 = (*((const SddWmc**) n2))[1];
  SddWmc diff = s1 - s2;
  if (fabs(diff) < DBL_EPSILON) return 0;
  return (diff > 0) ? 1 : -1;
}

// Assembly:
movq (%rdi), %rax
movsd 0x8(%rax), %xmm0
movq (%rsi), %rax
subsd 0x8(%rax), %xmm0
movapd 0x1f222(%rip), %xmm1    # 0x23250
xorpd %xmm2, %xmm2
xorl %eax, %eax
ucomisd %xmm2, %xmm0
andpd %xmm0, %xmm1
seta %al
xorl %ecx, %ecx
movsd 0x1f1ef(%rip), %xmm0    # 0x23238
ucomisd %xmm1, %xmm0
leal -0x1(%rax,%rax), %eax
cmoval %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/trim/utils.c
// Function: bsearch_locate
int bsearch_locate(char** sorted_arr, const int n, const char* str) {
  int mid = n / 2;
  int cmp = strcmp(str, sorted_arr[mid]);
  
  if (n == 0 || (n == 1 && cmp != 0)) {
    return -1;
  }

  if (cmp == 0) {
    return mid;
  } else if (cmp < 0) {
    return bsearch_locate(sorted_arr, mid, str);
  } else {
    return mid + bsearch_locate(sorted_arr+mid, n-mid, str);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
xorl %r15d, %r15d
movl %ebp, %r12d
shrl $0x1f, %ebp
addl %r12d, %ebp
sarl %ebp
movslq %ebp, %r13
movq (%r14,%r13,8), %rsi
movq %rbx, %rdi
callq 0x2140
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %r12d, %r12d
je 0x461d
cmpl $0x1, %r12d
jne 0x4606
testl %ecx, %ecx
jne 0x461d
testl %ecx, %ecx
je 0x461b
js 0x45d6
leaq (%r14,%r13,8), %r14
subl %r13d, %r12d
addl %r13d, %r15d
movl %r12d, %ebp
jmp 0x45d6
movl %ebp, %eax
addl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/trim/utils.c
// Function: free_search_data
void free_search_data(SearchData* data) {
  for (int i = 0; i < data->num_features; i++) {
    free(data->features[i]->indicators);
    free(data->features[i]);
  }
  free(data->features);
  free(data->literal_weights - data->var_count);
  free(data->costs);
  free(data);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
je 0x4dfa
xorl %r14d, %r14d
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rax
movq (%rax), %rdi
callq 0x2030
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
cmpq %r14, 0x20(%rbx)
ja 0x4dd4
movq 0x28(%rbx), %rdi
callq 0x2030
movq (%rbx), %rax
movq 0x8(%rbx), %rdi
shlq $0x3, %rax
subq %rax, %rdi
callq 0x2030
movq 0x40(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/trim/utils.c
// Function: print_search_data
void print_search_data(SearchData* data) {
  printf("num_features: %"PRIsS", threshold: %.2f, budget: %.2f\n",
         data->num_features, data->threshold, data->budget);
  for (int i = 0; i < data->num_features; i++) {
    printf("Feature %d: %d indicators ", i, data->features[i]->num_indicators);
    for (int j = 0; j < data->features[i]->num_indicators; j++) {
      printf("%d,", data->features[i]->indicators[j]);
    }
    printf("\n");
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rsi
movsd 0x30(%rdi), %xmm0
cvtss2sd 0x38(%rdi), %xmm1
leaq 0x1e51e(%rip), %rdi     # 0x2336d
movb $0x2, %al
callq 0x20e0
cmpq $0x0, 0x20(%rbx)
je 0x4ece
leaq 0x1e53b(%rip), %r14     # 0x2339f
leaq 0x1e249(%rip), %r15     # 0x230b4
xorl %r12d, %r12d
movq 0x28(%rbx), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rdx
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x20e0
movq 0x28(%rbx), %rax
movq (%rax,%r12,8), %rax
cmpq $0x0, 0x8(%rax)
je 0x4ebb
xorl %r13d, %r13d
movq (%rax), %rax
movq (%rax,%r13,8), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x20e0
incq %r13
movq 0x28(%rbx), %rax
movq (%rax,%r12,8), %rax
cmpq %r13, 0x8(%rax)
ja 0x4e99
movl $0xa, %edi
callq 0x2040
incq %r12
cmpq %r12, 0x20(%rbx)
ja 0x4e6e
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/trim/utils.c
// Function: update_search_result
void update_search_result(SearchResult* result, const SddWmc new_score,
    const float new_cost, const char* new_subset, const SddSize num_features) {
  result->best_score = new_score;
  result->cost = new_cost;
  for (int i = 0; i < num_features; i++) {
    result->best_subset[i] = new_subset[i];
  }
}

// Assembly:
movsd %xmm0, (%rdi)
movss %xmm1, 0x10(%rdi)
testq %rdx, %rdx
je 0x4f50
xorl %eax, %eax
movb (%rsi,%rax), %cl
movq 0x8(%rdi), %r8
movb %cl, (%r8,%rax)
incq %rax
cmpq %rax, %rdx
jne 0x4f3d
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/tabix.c
// Function: error_errno
static void HTS_FORMAT(HTS_PRINTF_FMT, 1, 2) HTS_NORETURN
error_errno(const char *format, ...)
{
    va_list ap;
    int eno = errno;
    fflush(stdout);
    if (format) {
        va_start(ap, format);
        vfprintf(stderr, format, ap);
        va_end(ap);
    }
    if (eno) {
        fprintf(stderr, "%s%s\n", format ? ": " : "", strerror(eno));
    } else {
        fprintf(stderr, "\n");
    }
    fflush(stderr);
    exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x61d1
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)
callq 0x4050
movl (%rax), %ebp
movq 0xcbdd1(%rip), %rax     # 0xd1fb0
movq (%rax), %rdi
callq 0x45b0
testq %rbx, %rbx
je 0x6223
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0xcbdc0(%rip), %rax     # 0xd1fd8
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x46c0
movq 0xcbdae(%rip), %r15     # 0xd1fd8
movq (%r15), %r14
testl %ebp, %ebp
je 0x6276
testq %rbx, %rbx
leaq 0xa7282(%rip), %rax     # 0xad4bd
leaq 0xa741a(%rip), %rbx     # 0xad65c
cmoveq %rax, %rbx
movl %ebp, %edi
callq 0x4150
leaq 0xa52d9(%rip), %rsi     # 0xab52d
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4730
movq (%r15), %rdi
callq 0x45b0
movl $0x1, %edi
callq 0x4600
movl $0xa, %edi
movq %r14, %rsi
callq 0x4660
jmp 0x6264
// File: /workspace/github_c_makefile_star2_O3/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
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)
xorl %r14d, %r14d
movq %r14, %rdi
xorl %esi, %esi
callq 0x5864
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3f3e
incq %r14
cmpq $0x64, %r14
jne 0x120b
movslq 0x8(%rbx), %rdx
pushq $0x1c
popq %rdi
pushq $0x64
popq %rsi
callq 0x9424
movq (%rbx), %rbx
movq (%rbx), %rax
movq 0x20(%rax), %rdx
pushq $0x1d
popq %rdi
xorl %esi, %esi
callq 0x9424
movq 0x190(%rbx), %rax
movq 0x20(%rax), %rdx
pushq $0x1e
popq %rdi
pushq $0x32
popq %rsi
callq 0x9424
movq 0x318(%rbx), %rax
movq 0x20(%rax), %rdx
pushq $0x1f
popq %rdi
pushq $0x63
popq %rsi
callq 0x9424
movq 0x11d79(%rip), %rax     # 0x12ff8
movq (%rax), %rcx
leaq 0xb853(%rip), %rdi      # 0xcadc
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O3/sisshiki1969[P]monocc/src/type.c
// Function: error_types
void error_types(Type *l_ty, Type *r_ty) {
  fprintf(stderr, "\nLeft: ");
  print_type(stderr, l_ty);
  fprintf(stderr, "\nRight: ");
  print_type(stderr, r_ty);
  fprintf(stderr, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1180e(%rip), %r12     # 0x12ff8
movq (%r12), %rcx
leaq 0xc47d(%rip), %rdi      # 0xdc72
pushq $0x7
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x1190
movq (%r12), %rdi
movq %r14, %rsi
callq 0x475b
movq (%r12), %rcx
leaq 0xc45f(%rip), %rdi      # 0xdc7a
pushq $0x8
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x475b
movq (%r12), %rsi
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x10c0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/sisshiki1969[P]monocc/src/codegen.c
// Function: new_label
char *new_label() {
  char *label = (char *)malloc(10);
  if (!label) error("Could not allocate memmory.");
  sprintf(label, ".L%06d", label_count++);
  return label;
}

// Assembly:
pushq %rbx
movl $0xa, %edi
callq 0x1110
movq %rax, %rbx
testq %rax, %rax
jne 0x1979
leaq 0xa7e6(%rip), %rdi      # 0xc158
xorl %eax, %eax
callq 0x508c
movl 0x11869(%rip), %edx     # 0x131e8
leal 0x1(%rdx), %eax
movl %eax, 0x11860(%rip)     # 0x131e8
leaq 0xa7e5(%rip), %rsi      # 0xc174
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1170
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/sisshiki1969[P]monocc/src/codegen.c
// Function: push_loop_switch
void push_loop_switch(Node *node) {
  char *break_label = new_label();
  Loop *label = (Loop *)calloc(1, sizeof(Loop));
  label->break_dest = break_label;
  label->continue_dest = NULL;
  label->node = node;
  label->next = labels;
  labels = label;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1958
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x10d0
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
movq 0x1175f(%rip), %rcx     # 0x131f0
movq %rcx, (%rax)
movq %rax, 0x11755(%rip)     # 0x131f0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/sisshiki1969[P]monocc/src/codegen.c
// Function: get_continue
char *get_continue(Token *token) {
  if (!labels)
    error_at_token(token,
                   "a continue statement may only be used within a loop.");
  return labels->continue_dest;
}

// Assembly:
pushq %rax
movq 0x11733(%rip), %rax     # 0x131f0
testq %rax, %rax
jne 0x1ad7
leaq 0xa6e8(%rip), %rsi      # 0xc1b1
xorl %eax, %eax
callq 0x52cd
movq 0x11719(%rip), %rax     # 0x131f0
movq 0x8(%rax), %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/sisshiki1969[P]monocc/src/codegen.c
// Function: get_break
char *get_break(Token *token) {
  if (!labels)
    error_at_token(
        token, "a break statement may only be used within a loop or switch.");
  return labels->break_dest;
}

// Assembly:
pushq %rax
movq 0x1170b(%rip), %rax     # 0x131f0
testq %rax, %rax
jne 0x1aff
leaq 0xa6f5(%rip), %rsi      # 0xc1e6
xorl %eax, %eax
callq 0x52cd
movq 0x116f1(%rip), %rax     # 0x131f0
movq 0x10(%rax), %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/sisshiki1969[P]monocc/src/codegen.c
// Function: get_inner_switch
Node *get_inner_switch() {
  Loop *cursor = labels;
  while (cursor && !cursor->node) cursor = cursor->next;
  if (!cursor) error("get_inner_switch(): Internal error.");
  return cursor->node;
}

// Assembly:
pushq %rax
leaq 0x116e3(%rip), %rcx     # 0x131f0
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x1b20
movq 0x18(%rcx), %rax
testq %rax, %rax
je 0x1b0d
jmp 0x1b36
leaq 0xa6fb(%rip), %rdi      # 0xc222
xorl %eax, %eax
callq 0x508c
movq 0x18, %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/sisshiki1969[P]monocc/src/codegen.c
// Function: reg_size
int reg_size(Type *type) {
  int data_size = sizeof_type(type);
  if (data_size == 8)
    return 0;
  else if (data_size == 4)
    return 1;
  else if (data_size == 2)
    return 2;
  else if (data_size == 1)
    return 3;
  else
    error("Internal error in reg_size(): Illegal data size (%d bytes).",
          data_size);
}

// Assembly:
pushq %rax
callq 0xae77
leal -0x1(%rax), %ecx
cmpl $0x8, %ecx
jae 0x1b5e
movl $0x8b, %edx
btl %ecx, %edx
jae 0x1b5e
movl %ecx, %eax
leaq 0xaf63(%rip), %rcx      # 0xcabc
movl (%rcx,%rax,4), %eax
jmp 0x1b6e
leaq 0xa6e1(%rip), %rdi      # 0xc246
movl %eax, %esi
xorl %eax, %eax
callq 0x508c
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/sisshiki1969[P]monocc/src/codegen.c
// Function: load
void load(Node *node) {
  Type *ty = type(node);
  switch (reg_size(ty)) {
    case 0:
      fprintf(output, "\tmov  rax, [rax]\n");
      break;
    case 1:
      fprintf(output, "\tmov  eax, [rax]\n");
      break;
    case 2:
      if (is_signed(ty)) {
        fprintf(output, "\tmovsx  eax, WORD PTR [rax]\n");
      } else {
        fprintf(output, "\tmovzx  eax, WORD PTR [rax]\n");
      }
      break;
    case 3:
      if (is_signed(ty)) {
        fprintf(output, "\tmovsx eax, BYTE PTR [rax]\n");
      } else {
        fprintf(output, "\tmovzx eax, BYTE PTR [rax]\n");
      }
      break;
    default:
      error_at_node(node, "Size of the variable is unknown.");
  }
  fprintf(output, "\tpush rax\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0xb225
movq %rax, %rbx
movq %rax, %rdi
callq 0x1b38
cmpl $0x3, %eax
ja 0x1c07
movl %eax, %eax
leaq 0xa46f(%rip), %rcx      # 0xc004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1167b(%rip), %rax     # 0x13220
movq (%rax), %rcx
leaq 0xa6d3(%rip), %rdi      # 0xc282
jmp 0x1c00
movq %rbx, %rdi
callq 0xadd6
leaq 0x11660(%rip), %rcx     # 0x13220
movq (%rcx), %rcx
testb %al, %al
je 0x1c1a
leaq 0xa6d8(%rip), %rdi      # 0xc2a6
jmp 0x1c21
movq %rbx, %rdi
callq 0xadd6
leaq 0x11641(%rip), %rcx     # 0x13220
movq (%rcx), %rcx
testb %al, %al
je 0x1c28
leaq 0xa6f3(%rip), %rdi      # 0xc2e0
jmp 0x1c2f
leaq 0x1162a(%rip), %rax     # 0x13220
movq (%rax), %rcx
leaq 0xa694(%rip), %rdi      # 0xc294
movl $0x11, %esi
jmp 0x1c34
leaq 0xa70a(%rip), %rsi      # 0xc318
movq %r14, %rdi
xorl %eax, %eax
callq 0x5502
jmp 0x1c3e
leaq 0xa6a2(%rip), %rdi      # 0xc2c3
movl $0x1c, %esi
jmp 0x1c34
leaq 0xa6cd(%rip), %rdi      # 0xc2fc
movl $0x1b, %esi
movl $0x1, %edx
callq 0x1190
leaq 0x115db(%rip), %rax     # 0x13220
movq (%rax), %rcx
leaq 0xa6ea(%rip), %rdi      # 0xc339
movl $0xa, %esi
movl $0x1, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O3/sisshiki1969[P]monocc/src/codegen.c
// Function: cast
void cast(Type *ty_from, Type *ty_to) {
  // if (!is_arith(ty_from) || !is_arith(ty_to)) return;
  int sz_from = reg_size(ty_from);
  int sz_to = reg_size(ty_to);
  if (sz_from <= sz_to) {
    return;
  }
  char *mnemonic;
  if (is_signed(ty_to)) {
    mnemonic = "movsx";
  } else {
    mnemonic = "movzx";
  };
  switch (reg_size(ty_from)) {
    case 0:
      break;
    case 1:
      fprintf(output, "\tpop  rax\n");
      if (is_signed(ty_to)) {
        fprintf(output, "\tmovsx rax, eax\n");
      } else {
        fprintf(output, "\tmov  eax, eax\n");
      }
      fprintf(output, "\tpush rax\n");
      break;
    case 2:
    case 3:
      fprintf(output, "\tpop  rax\n");
      fprintf(output, "\t%s rax, %s\n", mnemonic, reg_rax[reg_size(ty_from)]);
      fprintf(output, "\tpush rax\n");
      break;
    default:
      break;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1b38
movl %eax, %ebp
movq %r14, %rdi
callq 0x1b38
cmpl %eax, %ebp
jle 0x1d48
movq %r14, %rdi
callq 0xadd6
movl %eax, %ebp
movq %rbx, %rdi
callq 0x1b38
leal -0x2(%rax), %ecx
cmpl $0x2, %ecx
jae 0x1d06
leaq 0xa69a(%rip), %rax      # 0xc344
leaq 0xa699(%rip), %r14      # 0xc34a
testb %bpl, %bpl
cmovneq %rax, %r14
leaq 0x11561(%rip), %r15     # 0x13220
movq (%r15), %rcx
leaq 0xa687(%rip), %rdi      # 0xc350
movl $0xa, %esi
movl $0x1, %edx
callq 0x1190
movq (%r15), %r15
movq %rbx, %rdi
callq 0x1b38
cltq
leaq 0x11414(%rip), %rcx     # 0x13100
leaq (%rcx,%rax,4), %rcx
leaq 0xa685(%rip), %rsi      # 0xc37c
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10f0
jmp 0x1d69
cmpl $0x1, %eax
jne 0x1d48
leaq 0x1150e(%rip), %rbx     # 0x13220
movq (%rbx), %rcx
leaq 0xa634(%rip), %rdi      # 0xc350
movl $0xa, %esi
movl $0x1, %edx
callq 0x1190
movq %r14, %rdi
callq 0xadd6
movq (%rbx), %rcx
testb %al, %al
je 0x1d53
leaq 0xa61a(%rip), %rdi      # 0xc35b
movl $0x10, %esi
jmp 0x1d5f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa612(%rip), %rdi      # 0xc36c
movl $0xf, %esi
movl $0x1, %edx
callq 0x1190
leaq 0x114b0(%rip), %rax     # 0x13220
movq (%rax), %rcx
leaq 0xa5bf(%rip), %rdi      # 0xc339
movl $0xa, %esi
movl $0x1, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O3/sisshiki1969[P]monocc/src/codegen.c
// Function: gen_addr_to_rax
void gen_addr_to_rax(Node *node) {
  if (node->kind == ND_LVAR) {
    emit_lvar_addr(node->lvar);
    return;
  } else if (node->kind == ND_GVAR) {
    emit_gvar_addr(node);
    return;
  } else if (node->kind == ND_DEREF) {
    gen(node->lhs);
    fprintf(output, "\tpop  rax\n");
  } else if (node->kind == ND_STR) {
    fprintf(output, "\tlea  rax, .LS%06d[rip]\n", node->str_id);
    return;
  } else if (node->kind == ND_MEMBER) {
    gen_addr_to_rax(node->lhs);
    fprintf(output, "\tadd  rax, %d\n", node->offset);
  } else {
    error_at_node(node, "Can not get address.");
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %ecx
leal -0x17(%rcx), %eax
cmpl $0x4, %eax
ja 0x1e1f
leaq 0xa228(%rip), %rcx      # 0xc014
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rbx), %rdi
callq 0x1eaf
leaq 0x1141b(%rip), %rax     # 0x13220
movq (%rax), %rcx
leaq 0xa541(%rip), %rdi      # 0xc350
movl $0xa, %esi
movl $0x1, %edx
popq %rbx
jmp 0x1190
cmpl $0x2, %ecx
jne 0x1e3a
leaq 0x113f5(%rip), %rax     # 0x13220
movq (%rax), %rdi
movl 0x28(%rbx), %edx
leaq 0xa57e(%rip), %rsi      # 0xc3b6
jmp 0x1ea7
leaq 0xa59d(%rip), %rsi      # 0xc3de
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x5502
leaq 0x113cd(%rip), %rax     # 0x13220
movq (%rax), %rdi
movq 0x50(%rbx), %rax
movl 0x28(%rax), %edx
movq 0x20(%rax), %rcx
leaq 0xa538(%rip), %rsi      # 0xc3a0
xorl %eax, %eax
popq %rbx
jmp 0x10f0
movq 0x8(%rbx), %rdi
callq 0x1dd7
leaq 0x113a0(%rip), %rax     # 0x13220
movq (%rax), %rdi
movl 0x38(%rbx), %edx
leaq 0xa542(%rip), %rsi      # 0xc3cf
jmp 0x1ea7
movq 0x30(%rbx), %rax
leaq 0x11386(%rip), %rcx     # 0x13220
movq (%rcx), %rdi
movl 0x18(%rax), %edx
leaq 0xa4e2(%rip), %rsi      # 0xc389
xorl %eax, %eax
popq %rbx
jmp 0x10f0
// File: /workspace/github_c_makefile_star2_O3/sisshiki1969[P]monocc/src/codegen.c
// Function: store
void store(Type *ty) {
  if (is_struct(ty)) {
    fprintf(output, "\tpop  rsi\n");

    int size = sizeof_type(ty);
    int i = 0;
    while (i <= size - 8) {
      fprintf(output, "\tmov  rdi, QWORD PTR [rsi + %d]\n", i);
      fprintf(output, "\tmov  QWORD PTR [rax + %d], rdi\n", i);
      i += 8;
    }
    while (i < size) {
      fprintf(output, "\tmov  dil, BYTE PTR [rsi + %d]\n", i);
      fprintf(output, "\tmov  BYTE PTR [rax + %d], dil\n", i);
      i++;
    }
    fprintf(output, "\tpush rax\n");
  } else {
    fprintf(output, "\tpop  rdi\n");
    fprintf(output, "\tmov  [rax], %s\n", reg_rdi[reg_size(ty)]);
    fprintf(output, "\tpush rdi\n");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xad89
leaq 0x10a31(%rip), %r13     # 0x13220
movq (%r13), %rcx
testb %al, %al
je 0x289f
leaq 0x9bf1(%rip), %rdi      # 0xc3f3
movl $0xa, %esi
movl $0x1, %edx
callq 0x1190
movq %rbx, %rdi
callq 0xae77
movl %eax, %ebx
xorl %ebp, %ebp
cmpl $0x8, %eax
jl 0x285e
leal -0x8(%rbx), %r12d
leaq 0x9bd1(%rip), %r14      # 0xc3fe
leaq 0x9beb(%rip), %r15      # 0xc41f
xorl %ebp, %ebp
movq (%r13), %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x10f0
movq (%r13), %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x10f0
addl $0x8, %ebp
cmpl %r12d, %ebp
jle 0x2836
leaq 0x9ad4(%rip), %r14      # 0xc339
cmpl %ebx, %ebp
jge 0x28e6
leaq 0x9bd0(%rip), %r15      # 0xc440
leaq 0x9be9(%rip), %r12      # 0xc460
movq (%r13), %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x10f0
movq (%r13), %rdi
movq %r12, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x10f0
incl %ebp
cmpl %ebp, %ebx
jne 0x2877
jmp 0x28e6
leaq 0x9bda(%rip), %rdi      # 0xc480
movl $0xa, %esi
movl $0x1, %edx
callq 0x1190
movq (%r13), %r14
movq %rbx, %rdi
callq 0x1b38
cltq
leaq 0x10846(%rip), %rcx     # 0x13110
leaq (%rcx,%rax,4), %rdx
leaq 0x9bb6(%rip), %rsi      # 0xc48b
movq %r14, %rdi
xorl %eax, %eax
callq 0x10f0
leaq 0x9bb6(%rip), %r14      # 0xc49c
movq (%r13), %rcx
movl $0xa, %esi
movl $0x1, %edx
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O3/sisshiki1969[P]monocc/src/codegen.c
// Function: gen_if
void gen_if(Node *node) {
  char *else_str = new_label();
  char *end_str = new_label();
  gen(node->lhs);
  fprintf(output, "\tpop  rax\n");
  fprintf(output, "\tcmp  rax, 0\n");
  fprintf(output, "\tje   %s\n", else_str);
  gen_stmt(node->rhs);
  emit_jmp(end_str);
  emit_label(else_str);
  gen_stmt(node->xhs);
  emit_label(end_str);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x1958
movq %rax, %r15
callq 0x1958
movq %rax, %r14
movq 0x8(%rbx), %rdi
callq 0x1eaf
leaq 0x108ea(%rip), %r13     # 0x13220
movq (%r13), %rcx
leaq 0x9a0f(%rip), %rdi      # 0xc350
movl $0xa, %esi
movl $0x1, %edx
callq 0x1190
movq (%r13), %rcx
leaq 0x9b4c(%rip), %rdi      # 0xc4a7
movl $0xd, %esi
movl $0x1, %edx
callq 0x1190
movq (%r13), %rdi
leaq 0x9b40(%rip), %rsi      # 0xc4b5
movq %r15, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x10(%rbx), %rdi
callq 0x29d8
movq (%r13), %rdi
leaq 0x97ed(%rip), %rsi      # 0xc180
movq %r14, %rdx
xorl %eax, %eax
callq 0x10f0
movq (%r13), %rdi
leaq 0x97d3(%rip), %r12      # 0xc17b
movq %r12, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x18(%rbx), %rdi
callq 0x29d8
movq (%r13), %rdi
movq %r12, %rsi
movq %r14, %rdx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x10f0
// File: /workspace/github_c_makefile_star2_O3/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 0x1a20
movq 0x107c5(%rip), %rax     # 0x131f0
testq %rax, %rax
jne 0x2a49
movq 0x50(%rbx), %rdi
leaq 0x9776(%rip), %rsi      # 0xc1b1
xorl %eax, %eax
callq 0x52cd
movq 0x107a7(%rip), %rax     # 0x131f0
movq 0x8(%rax), %r12
movq 0x10(%rax), %r14
leaq 0x107c8(%rip), %r13     # 0x13220
movq (%r13), %rdi
leaq 0x9718(%rip), %r15      # 0xc17b
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x8(%rbx), %rdi
callq 0x1eaf
movq (%r13), %rcx
leaq 0x98cc(%rip), %rdi      # 0xc350
movl $0xa, %esi
movl $0x1, %edx
callq 0x1190
movq (%r13), %rcx
leaq 0x9a09(%rip), %rdi      # 0xc4a7
movl $0xd, %esi
movl $0x1, %edx
callq 0x1190
movq (%r13), %rdi
leaq 0x99fd(%rip), %rsi      # 0xc4b5
movq %r14, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x10(%rbx), %rdi
callq 0x29d8
movq (%r13), %rdi
leaq 0x96aa(%rip), %rsi      # 0xc180
movq %r12, %rdx
xorl %eax, %eax
callq 0x10f0
movq (%r13), %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x106f8(%rip), %rax     # 0x131f0
movq (%rax), %rax
movq %rax, 0x106ee(%rip)     # 0x131f0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1a20
callq 0x1958
movq %rax, %rbx
movq 0x106c2(%rip), %rax     # 0x131f0
testq %rax, %rax
jne 0x2b4c
movq 0x50(%r15), %rdi
leaq 0x9673(%rip), %rsi      # 0xc1b1
xorl %eax, %eax
callq 0x52cd
movq 0x106a4(%rip), %rax     # 0x131f0
movq 0x8(%rax), %r12
movq 0x10(%rax), %r14
movq 0x8(%r15), %rdi
callq 0x1eaf
leaq 0x106bc(%rip), %rbp     # 0x13220
movq (%rbp), %rdi
leaq 0x960c(%rip), %r13      # 0xc17b
movq %r13, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x10(%r15), %rdi
callq 0x1eaf
movq (%rbp), %rcx
leaq 0x97c0(%rip), %rdi      # 0xc350
movl $0xa, %esi
movl $0x1, %edx
callq 0x1190
movq (%rbp), %rcx
leaq 0x98fd(%rip), %rdi      # 0xc4a7
movl $0xd, %esi
movl $0x1, %edx
callq 0x1190
movq (%rbp), %rdi
leaq 0x98f1(%rip), %rsi      # 0xc4b5
movq %r14, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x48(%r15), %rax
movq (%rax), %rax
movq (%rax), %rdi
callq 0x29d8
movq (%rbp), %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x18(%r15), %rdi
callq 0x1eaf
cmpq $0x0, 0x18(%r15)
je 0x2c18
movq (%rbp), %rcx
leaq 0x9747(%rip), %rdi      # 0xc350
movl $0xa, %esi
movl $0x1, %edx
callq 0x1190
movq (%rbp), %rdi
leaq 0x955d(%rip), %rsi      # 0xc180
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10f0
movq (%rbp), %rdi
leaq 0x9543(%rip), %rsi      # 0xc17b
movq %r14, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x105a7(%rip), %rax     # 0x131f0
movq (%rax), %rax
movq %rax, 0x1059d(%rip)     # 0x131f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2c9b
pushq %r15
pushq %r14
pushq %rbx
movq 0x48(%rdi), %rbx
movq %rbx, %rdi
callq 0x3f3a
testl %eax, %eax
jle 0x2c96
movl %eax, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x29d8
incq %r15
cmpq %r15, %r14
jne 0x2c82
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq 0x48(%rdi), %rdi
callq 0x3f3a
leaq 0x10573(%rip), %rbx     # 0x13220
movq (%rbx), %rdi
leal (,%rax,8), %edx
leaq 0x9801(%rip), %rsi      # 0xc4bf
xorl %eax, %eax
callq 0x10f0
movq (%rbx), %rdi
leaq 0x980b(%rip), %rsi      # 0xc4da
movl $0x30, %edx
xorl %eax, %eax
callq 0x10f0
movq (%rbx), %rcx
leaq 0x9814(%rip), %rdi      # 0xc4f9
movl $0x16, %esi
movl $0x1, %edx
callq 0x1190
movq (%rbx), %rcx
leaq 0x9812(%rip), %rdi      # 0xc510
movl $0x20, %esi
movl $0x1, %edx
callq 0x1190
movq (%rbx), %rcx
leaq 0x9622(%rip), %rdi      # 0xc339
movl $0xa, %esi
movl $0x1, %edx
popq %rbx
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
movq %rdi, %r12
movq 0x8(%rdi), %rdi
callq 0xb225
movq %rax, %r15
callq 0x1958
movq %rax, %r14
callq 0x1958
movq %rax, %rbx
movq 0x8(%r12), %rdi
callq 0x1eaf
movq %r15, %rdi
callq 0xadc4
testb %al, %al
jne 0x363f
movq %r15, %rdi
callq 0xad74
testb %al, %al
jne 0x363f
movq 0x8(%r12), %rdi
leaq 0x914b(%rip), %rsi      # 0xc783
xorl %eax, %eax
callq 0x5502
movq %r15, %rdi
callq 0x1b38
movl %eax, %ebp
leaq 0xfbd0(%rip), %r12      # 0x13220
movq (%r12), %rcx
leaq 0x8cf5(%rip), %rdi      # 0xc350
movl $0xa, %esi
movl $0x1, %edx
callq 0x1190
movq (%r12), %rdi
movslq %ebp, %rax
leaq 0xfa88(%rip), %rcx      # 0x13100
leaq (%rcx,%rax,4), %rdx
leaq 0x9123(%rip), %rsi      # 0xc7a6
xorl %eax, %eax
callq 0x10f0
movq (%r12), %rdi
leaq 0x912c(%rip), %rsi      # 0xc7c1
movq %r14, %rdx
xorl %eax, %eax
callq 0x10f0
movq (%r12), %rcx
leaq 0x9109(%rip), %rdi      # 0xc7b3
movl $0xd, %esi
movl $0x1, %edx
callq 0x1190
movq (%r12), %rdi
leaq 0x8abc(%rip), %rsi      # 0xc180
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10f0
movq (%r12), %rdi
leaq 0x8aa2(%rip), %r15      # 0xc17b
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10f0
movq (%r12), %rcx
leaq 0x8eb5(%rip), %rdi      # 0xc5a6
movl $0xd, %esi
movl $0x1, %edx
callq 0x1190
movq (%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x10f0
// File: /workspace/github_c_makefile_star2_O3/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, %r14
movl %esi, %ebx
movq %rdi, %r12
callq 0xad7b
testb %al, %al
je 0x3819
movq %r14, %rdi
callq 0xb225
movq %rax, %rdi
callq 0xad7b
testb %al, %al
je 0x3819
movq 0x48(%r14), %r14
movq 0x8(%r12), %r15
movl 0x10(%r12), %ebp
movq %r14, %rdi
callq 0x3f3a
testl %eax, %eax
setg %al
testl %ebp, %ebp
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x38c2
movl %ebp, %r13d
movl $0x1, %r12d
movq (%r14), %rax
movq -0x8(%rax,%r12,8), %rdx
cmpl $0x3, (%rdx)
jne 0x37be
movq %r15, %rdi
movl %ebx, %esi
callq 0x3739
jmp 0x37e8
movq %rdx, %rdi
callq 0x1eaf
leaq 0xfa53(%rip), %rax      # 0x13220
movq (%rax), %rdi
leaq 0x8bb2(%rip), %rsi      # 0xc389
movl %ebx, %edx
xorl %eax, %eax
callq 0x10f0
movq %r15, %rdi
callq 0x27d5
movq %r15, %rdi
callq 0xae77
movl %eax, %ebp
movq %r14, %rdi
callq 0x3f3a
cltq
cmpq %rax, %r12
jge 0x38c2
subl %ebp, %ebx
leaq 0x1(%r12), %rax
cmpq %r13, %r12
movq %rax, %r12
jb 0x37a5
jmp 0x38c2
movq %r12, %rdi
callq 0xad89
testb %al, %al
je 0x38d1
movq %r14, %rdi
callq 0xb225
movq %rax, %rdi
callq 0xad89
testb %al, %al
je 0x38d1
movq 0x48(%r14), %r14
movq 0x20(%r12), %r12
movq %r14, %rdi
callq 0x3f3a
testl %eax, %eax
jle 0x38c2
leaq 0xf9c3(%rip), %r13      # 0x13220
leaq 0x8b25(%rip), %r15      # 0xc389
xorl %ebp, %ebp
movq (%r14), %rax
movq (%rax,%rbp,8), %rdx
cmpl $0x3, (%rdx)
jne 0x3885
movq 0x10(%r12), %rdi
movl %ebx, %esi
subl 0x18(%r12), %esi
callq 0x3739
jmp 0x38ac
movq %rdx, %rdi
callq 0x1eaf
movq (%r13), %rdi
movl %ebx, %edx
subl 0x18(%r12), %edx
movq %r15, %rsi
xorl %eax, %eax
callq 0x10f0
movq 0x10(%r12), %rdi
callq 0x27d5
incq %rbp
movq (%r12), %r12
movq %r14, %rdi
callq 0x3f3a
cltq
cmpq %rax, %rbp
jl 0x3866
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9f12(%rip), %rsi      # 0xd7ea
movq %r14, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5502
// File: /workspace/github_c_makefile_star2_O3/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 0x3b3f
leaq 0x8632(%rip), %rcx      # 0xc104
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rbx), %rdi
callq 0x3abb
movq 0x20(%rax), %r14
movq 0x10(%rbx), %rdi
callq 0x3abb
addq 0x20(%rax), %r14
jmp 0x3b2e
movq 0x8(%rbx), %rdi
callq 0x3abb
movq 0x20(%rax), %r14
movq 0x10(%rbx), %rdi
callq 0x3abb
subq 0x20(%rax), %r14
jmp 0x3b2e
movq 0x8(%rbx), %rdi
callq 0x3abb
movq 0x20(%rax), %r14
movq 0x10(%rbx), %rdi
callq 0x3abb
imulq 0x20(%rax), %r14
movq %r14, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5864
leaq 0x8eb8(%rip), %rsi      # 0xc9fe
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5502
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8cea(%rip), %rdi      # 0xcd17
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
testq %r14, %r14
je 0x407a
leaq 0x8ccb(%rip), %r15      # 0xcd16
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3f88
cmpl $0x1c, (%r14)
jne 0x4071
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1190
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x404b
movl $0xa, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x10c0
// File: /workspace/github_c_makefile_star2_O3/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 0xe78b(%rip), %r15      # 0x13238
movq (%r15), %rdi
callq 0x3f3a
testl %eax, %eax
jle 0x4b0b
movl %eax, %r12d
xorl %r13d, %r13d
leaq 0xe75a(%rip), %rbp      # 0x13220
leaq 0x824a(%rip), %rbx      # 0xcd17
movq (%r15), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %r14
movq (%rbp), %rcx
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x1190
movq %r14, %rdi
callq 0x408c
movq (%rbp), %rsi
movl $0xa, %edi
callq 0x10c0
incq %r13
cmpq %r13, %r12
jne 0x4acd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq