LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/UCLA-StarAI[P]TrimBN/src/fnf/compiler.c
// Function: fnf_to_sdd_auto
SddNode* fnf_to_sdd_auto(Fnf* fnf, SddManager* manager) {
  SddCompilerOptions* options = sdd_manager_options(manager);
  int verbose      = options->verbose;
  BoolOp op        = fnf->op;
  SddSize count    = fnf->litset_count;
  LitSet** litsets = (LitSet**) malloc(count*sizeof(LitSet*));
  for (SddSize i=0; i<count; i++) litsets[i] = fnf->litsets + i;

  if(verbose) { printf("\nclauses: %ld ",count); fflush(stdout); }
  SddNode* node = ONE(manager,op);
  for(int i=0; i<count; i++) {
    sort_litsets_by_lca(litsets+i,count-i,manager);
    sdd_ref(node,manager);
    SddNode* l = apply_litset(litsets[i],manager);
    sdd_deref(node,manager);
    node = sdd_apply(l,node,op,manager);
    if(verbose) { printf("%ld ",count-i-1); fflush(stdout); }
  }
  free(litsets);
  return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x5fd0
movl 0x58(%rax), %eax
movl %eax, 0xc(%rsp)
movzwl 0x18(%r15), %ebp
movq 0x8(%r15), %r14
leaq (,%r14,8), %rdi
callq 0x21b0
movq %rax, %r12
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x2621
movq 0x10(%r15), %rdx
addq %rax, %rdx
movq %rdx, (%r12,%rcx,8)
incq %rcx
addq $0x30, %rax
jmp 0x2608
cmpl $0x0, 0xc(%rsp)
je 0x2648
leaq 0x20ab7(%rip), %rdi     # 0x230e6
movq %r14, %rsi
xorl %eax, %eax
callq 0x20e0
movq 0x28980(%rip), %rax     # 0x2afc0
movq (%rax), %rdi
callq 0x21c0
movq %r12, 0x10(%rsp)
movq %rbx, %rdi
testw %bp, %bp
je 0x265c
callq 0x5d30
jmp 0x2661
callq 0x5d20
movq %rax, %r12
movzwl %bp, %ebp
movq 0x10(%rsp), %r15
testq %r14, %r14
je 0x26e7
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2a89
movq %r12, %rdi
movq %rbx, %rsi
callq 0x9140
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x2703
movq %rax, %r13
movq %r12, %rdi
movq %rbx, %rsi
callq 0x9230
movq %r13, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %rbx, %rcx
callq 0xb1a0
movq %rax, %r12
cmpl $0x0, 0xc(%rsp)
je 0x26de
leaq -0x1(%r14), %rsi
leaq 0x20a28(%rip), %rdi     # 0x230f0
xorl %eax, %eax
callq 0x20e0
movq 0x288ea(%rip), %rax     # 0x2afc0
movq (%rax), %rdi
callq 0x21c0
decq %r14
addq $0x8, %r15
jmp 0x266c
movq 0x10(%rsp), %rdi
callq 0x2030
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/UCLA-StarAI[P]TrimBN/src/fnf/compiler.c
// Function: apply_litset
SddNode* apply_litset(LitSet* litset, SddManager* manager) {

  BoolOp op            = litset->op; //conjoin (term) or disjoin (clause)
  SddLiteral* literals = litset->literals;
  SddNode* node        = ONE(manager,op); //will not be gc'd
  
  for(SddLiteral i=0; i<litset->literal_count; i++) {
    SddNode* literal = sdd_manager_literal(literals[i],manager);
    node             = sdd_apply(node,literal,op,manager);
  }
  
  return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x18(%rdi), %ebp
movq 0x10(%rdi), %r12
movq %rsi, %rdi
testw %bp, %bp
je 0x272b
callq 0x5d30
jmp 0x2730
callq 0x5d20
movq %rax, %r15
xorl %r13d, %r13d
movzwl %bp, %ebp
cmpq 0x8(%r14), %r13
jge 0x2763
movq (%r12,%r13,8), %rdi
movq %rbx, %rsi
callq 0x5d40
movq %r15, %rdi
movq %rax, %rsi
movl %ebp, %edx
movq %rbx, %rcx
callq 0xb1a0
movq %rax, %r15
incq %r13
jmp 0x2739
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/UCLA-StarAI[P]TrimBN/src/fnf/compiler.c
// Function: fnf_to_sdd_manual
SddNode* fnf_to_sdd_manual(Fnf* fnf, SddManager* manager) {
  SddCompilerOptions* options = sdd_manager_options(manager);
  int verbose      = options->verbose;
  int period       = options->vtree_search_mode;
  BoolOp op        = fnf->op;
  SddSize count    = fnf->litset_count;
  LitSet** litsets = (LitSet**) malloc(count*sizeof(LitSet*));
  for (SddSize i=0; i<count; i++) litsets[i] = fnf->litsets + i;
  sort_litsets_by_lca(litsets,count,manager);

  if(verbose) { printf("\nclauses: %ld ",count); fflush(stdout); }
  SddNode* node = ONE(manager,op);
  for(int i=0; i<count; i++) {
    if(period > 0 && i > 0 && i%period==0) {
      // after every period clauses
      sdd_ref(node,manager);
      if(options->verbose) { printf("* "); fflush(stdout); }
      sdd_manager_minimize_limited(manager);
      sdd_deref(node,manager);
      sort_litsets_by_lca(litsets+i,count-i,manager);
    }

    SddNode* l = apply_litset(litsets[i],manager);
    node = sdd_apply(l,node,op,manager);
    if(verbose) { printf("%ld ",count-i-1); fflush(stdout); }
  }
  free(litsets);
  return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x5fd0
movl 0x50(%rax), %ecx
movl %ecx, 0x4(%rsp)
movq %rax, 0x10(%rsp)
movl 0x58(%rax), %eax
movl %eax, (%rsp)
movzwl 0x18(%r14), %ebp
movq 0x8(%r14), %r15
leaq (,%r15,8), %rdi
callq 0x21b0
movq %rax, %r12
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %r15
je 0x27d9
movq 0x10(%r14), %rdx
addq %rax, %rdx
movq %rdx, (%r12,%rcx,8)
incq %rcx
addq $0x30, %rax
jmp 0x27c0
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2a89
cmpl $0x0, (%rsp)
je 0x280d
leaq 0x208f2(%rip), %rdi     # 0x230e6
movq %r15, %rsi
xorl %eax, %eax
callq 0x20e0
movq 0x287bb(%rip), %rax     # 0x2afc0
movq (%rax), %rdi
callq 0x21c0
movq %rbx, %rdi
testw %bp, %bp
je 0x281c
callq 0x5d30
jmp 0x2821
callq 0x5d20
movq %rax, %r13
movzwl %bp, %ebp
movq %r12, 0x8(%rsp)
xorl %r14d, %r14d
testq %r15, %r15
je 0x2900
cmpl $0x0, 0x4(%rsp)
setle %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x28ab
movl %r14d, %eax
xorl %edx, %edx
divl 0x4(%rsp)
testl %edx, %edx
jne 0x28ab
movq %r13, %rdi
movq %rbx, %rsi
callq 0x9140
movq 0x10(%rsp), %rax
cmpl $0x0, 0x58(%rax)
je 0x288a
leaq 0x20881(%rip), %rdi     # 0x230f5
xorl %eax, %eax
callq 0x20e0
movq 0x2873e(%rip), %rax     # 0x2afc0
movq (%rax), %rdi
callq 0x21c0
movq %rbx, %rdi
callq 0x6040
movq %r13, %rdi
movq %rbx, %rsi
callq 0x9230
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2a89
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x2703
movq %rax, %rdi
movq %r13, %rsi
movl %ebp, %edx
movq %rbx, %rcx
callq 0xb1a0
movq %rax, %r13
cmpl $0x0, (%rsp)
je 0x28f1
leaq -0x1(%r15), %rsi
leaq 0x20815(%rip), %rdi     # 0x230f0
xorl %eax, %eax
callq 0x20e0
movq 0x286d7(%rip), %rax     # 0x2afc0
movq (%rax), %rdi
callq 0x21c0
incq %r14
decq %r15
addq $0x8, %r12
jmp 0x282f
movq 0x8(%rsp), %rdi
callq 0x2030
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/UCLA-StarAI[P]TrimBN/src/fnf/compiler.c
// Function: fnf_to_sdd
SddNode* fnf_to_sdd(Fnf* fnf, SddManager* manager) {
  SddNode* test = degenerate_fnf_test(fnf,manager);
  if (test != NULL) return test;
  SddCompilerOptions* options = sdd_manager_options(manager);

  if(options->vtree_search_mode < 0) {
    sdd_manager_auto_gc_and_minimize_on(manager);
    return fnf_to_sdd_auto(fnf,manager);
  } else {
    sdd_manager_auto_gc_and_minimize_off(manager);
    return fnf_to_sdd_manual(fnf,manager);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x18(%rdi), %eax
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x295c
movq 0x10(%r14), %rdx
addq $0x8, %rdx
incq %rcx
decq %rcx
je 0x2976
cmpq $0x0, (%rdx)
leaq 0x30(%rdx), %rdx
jne 0x293e
testw %ax, %ax
je 0x2961
movq %rbx, %rdi
callq 0x5d20
jmp 0x2969
testw %ax, %ax
je 0x2952
movq %rbx, %rdi
callq 0x5d30
testq %rax, %rax
je 0x2976
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x5fd0
cmpl $0x0, 0x50(%rax)
js 0x299e
movq %rbx, %rdi
callq 0x58e0
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2775
movq %rbx, %rdi
callq 0x58d0
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x25c8
// File: /workspace/github_c_makefile_star2_O2/UCLA-StarAI[P]TrimBN/src/fnf/utils.c
// Function: litset_cmp_lca
int litset_cmp_lca(const void* litset1_loc, const void* litset2_loc) {

  LitSet* litset1 = *(LitSet**)litset1_loc;
  LitSet* litset2 = *(LitSet**)litset2_loc;

  Vtree* vtree1 = litset1->vtree;
  Vtree* vtree2 = litset2->vtree;
  SddLiteral p1 = sdd_vtree_position(vtree1);
  SddLiteral p2 = sdd_vtree_position(vtree2);
  
  if(vtree1!=vtree2 && (sdd_vtree_is_sub(vtree2,vtree1) || (!sdd_vtree_is_sub(vtree1,vtree2) && (p1 > p2)))) return 1;
  else if(vtree1!=vtree2 && (sdd_vtree_is_sub(vtree1,vtree2) || (!sdd_vtree_is_sub(vtree2,vtree1) && (p1 < p2)))) return -1;
  else {
	
  SddLiteral l1 = litset1->literal_count;
  SddLiteral l2 = litset2->literal_count;
  
  if(l1 > l2) return 1;
  else if(l1 < l2) return -1;
  else { 
    //so the litset order is unique
  	//without this, final litset order may depend on system
    SddSize id1 = litset1->id;
    SddSize id2 = litset2->id;
    if(id1 > id2) return 1;
    else if(id1 < id2) return -1;
    else return 0;
  }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rbp
movq (%rsi), %r15
movq 0x20(%rbp), %r14
movq 0x20(%r15), %r12
movq %r14, %rdi
callq 0x6130
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x6130
pushq $0x1
popq %rbx
pushq $-0x1
popq %rcx
cmpq %r12, %r14
je 0x2a53
movq %rax, %r13
movq %r12, %rdi
movq %r14, %rsi
callq 0x9760
testl %eax, %eax
jne 0x2a78
movq %r14, %rdi
movq %r12, %rsi
callq 0x9760
testl %eax, %eax
sete %al
cmpq %r13, (%rsp)
setg %cl
testb %cl, %al
jne 0x2a78
movq %r14, %rdi
movq %r12, %rsi
callq 0x9760
testl %eax, %eax
je 0x2a31
pushq $-0x1
popq %rbx
jmp 0x2a78
movq %r12, %rdi
movq %r14, %rsi
callq 0x9760
testl %eax, %eax
sete %al
cmpq %r13, (%rsp)
setl %cl
testb %cl, %al
pushq $-0x1
popq %rcx
je 0x2a53
movl %ecx, %ebx
jmp 0x2a78
movq 0x8(%r15), %rax
cmpq %rax, 0x8(%rbp)
jg 0x2a78
movl %ecx, %ebx
jl 0x2a78
movq (%rbp), %rax
movq (%r15), %rcx
xorl %edx, %edx
cmpq %rcx, %rax
sbbl %edx, %edx
cmpq %rcx, %rax
pushq $0x1
popq %rbx
cmovbel %edx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/UCLA-StarAI[P]TrimBN/src/fnf/utils.c
// Function: sort_litsets_by_lca
void sort_litsets_by_lca(LitSet** litsets, SddSize size, SddManager* manager) {
  //compute lcas of litsets
  for(SddLiteral i=0; i<size; i++) {
    LitSet* litset = litsets[i];
    litset->vtree  = sdd_manager_lca_of_literals(litset->literal_count,litset->literals,manager);
  }
  //sort
  qsort((LitSet**)litsets,size,sizeof(LitSet*),litset_cmp_lca);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x2ac0
movq (%r14,%r12,8), %r13
movl 0x8(%r13), %edi
movq 0x10(%r13), %rsi
movq %r15, %rdx
callq 0x97e0
movq %rax, 0x20(%r13)
incq %r12
jmp 0x2a9e
leaq -0x10f(%rip), %rcx      # 0x29b8
pushq $0x8
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2060
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x205a3(%rip), %rsi     # 0x230f8
movq %r14, %rdi
xorl %eax, %eax
callq 0x2150
leaq 0x2058a(%rip), %r15     # 0x230f0
xorl %r12d, %r12d
cmpq 0x8(%rbx), %r12
jae 0x2bb3
imulq $0x30, %r12, %r13
addq 0x10(%rbx), %r13
xorl %ebp, %ebp
cmpq 0x8(%r13), %rbp
jge 0x2b99
movq 0x10(%r13), %rax
movq (%rax,%rbp,8), %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2150
incq %rbp
jmp 0x2b79
leaq 0x20566(%rip), %rdi     # 0x23106
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x2290
incq %r12
jmp 0x2b69
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/UCLA-StarAI[P]TrimBN/src/fnf/io.c
// Function: read_cnf
Cnf* read_cnf(const char* filename) {
 Cnf* cnf = read_fnf(filename);
 //declare as cnf
  cnf->op=CONJOIN;
  for(SddSize i=0; i<cnf->litset_count; i++) cnf->litsets[i].op=DISJOIN;
  return cnf;
}

// Assembly:
pushq %rax
callq 0x2be8
andw $0x0, 0x18(%rax)
movq 0x8(%rax), %rcx
pushq $0x18
popq %rdx
xorl %esi, %esi
cmpq %rcx, %rsi
jae 0x2eba
movq 0x10(%rax), %rdi
movw $0x1, (%rdi,%rdx)
incq %rsi
addq $0x30, %rdx
jmp 0x2ea2
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/UCLA-StarAI[P]TrimBN/src/fnf/io.c
// Function: read_dnf
Dnf* read_dnf(const char* filename) {
 Dnf* dnf = read_fnf(filename);
 //declare as dnf
  dnf->op=DISJOIN;
  for(SddSize i=0; i<dnf->litset_count; i++) dnf->litsets[i].op=CONJOIN;
  return dnf;
}

// Assembly:
pushq %rax
callq 0x2be8
movw $0x1, 0x18(%rax)
movq 0x8(%rax), %rcx
pushq $0x18
popq %rdx
xorl %esi, %esi
cmpq %rcx, %rsi
jae 0x2ee8
movq 0x10(%rax), %rdi
andw $0x0, (%rdi,%rdx)
incq %rsi
addq $0x30, %rdx
jmp 0x2ed1
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x20231(%rip), %rsi     # 0x2314c
xorl %edi, %edi
callq 0x2230
movq %rax, %rbx
xorl %edi, %edi
testq %rax, %rax
sete %dil
leaq 0x20265(%rip), %rsi     # 0x2319a
callq 0x2eea
movq %rbx, %rdi
popq %rbx
jmp 0x2260
nop
// File: /workspace/github_c_makefile_star2_O2/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 %r15, %rdi
callq 0x9570
movq %r15, %rdi
testl %eax, %eax
jne 0x2f6b
callq 0x60d0
movq %rax, %r15
jmp 0x2f52
callq 0x6110
xorl %edx, %edx
movq %rdx, %rcx
cmpq %rdx, %rbx
je 0x2f84
leaq 0x1(%rcx), %rdx
cmpq %rax, (%r14,%rcx,8)
jne 0x2f72
xorl %eax, %eax
cmpq %rbx, %rcx
setb %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2fbd
callq 0x60d0
movb $0x6c, %r12b
jmp 0x2fc5
callq 0x60e0
movb $0x72, %r12b
testq %rax, %rax
je 0x2fdb
movq %rax, %rdi
callq 0x6110
cmpq %rbp, %rax
je 0x30ba
movb %r12b, 0xf(%rsp)
movq %rbp, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xd6b0
movq %rax, %r13
movq %r15, 0x10(%rsp)
movq %rbp, %r15
negq %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xd6b0
movq %rax, %r12
movq %r13, %rdi
movq %rbx, %rsi
callq 0x9140
movq %r12, %rdi
movq %rbx, %rsi
callq 0x9140
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9230
movq %rbx, %rdi
callq 0x5db0
movzbl 0xf(%rsp), %esi
movq %rbp, %rdi
movq 0x10(%rsp), %rdx
movq %rbx, %rcx
callq 0x9b00
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x5d40
movq %rax, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x5d90
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5d40
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x5d90
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x5da0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x9140
movq %r13, %rdi
movq %rbx, %rsi
callq 0x9230
movq %r12, %rdi
movq %rbx, %rsi
callq 0x9230
movq %rbx, %rdi
callq 0x5db0
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_O2/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, (%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0x5d80
movq %rax, %r13
xorl %ebp, %ebp
movl (%rsp), %eax
testl %eax, %eax
cmovgl %eax, %ebp
subl $0x1, %ebp
jb 0x3110
movq %r13, %rdi
callq 0x60e0
movq %rax, %r13
jmp 0x30fe
cmpl $0x0, 0x4(%rsp)
je 0x3158
xorl %ebp, %ebp
cmpq %rbp, %r14
je 0x3172
movq (%r15,%rbp,8), %rdi
xorl %esi, %esi
testq %rbp, %rbp
sete %sil
movq %r13, %rdx
movq %rbx, %rcx
movq %r12, %r8
callq 0x2f92
movq %rax, %rbx
movq (%r15,%rbp,8), %rdi
movq %r12, %rsi
callq 0x5d40
movq %rax, %rdi
callq 0x5d80
movq %rax, %r13
incq %rbp
jmp 0x3119
movq %r13, %rdi
callq 0x60d0
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2f44
testl %eax, %eax
je 0x3117
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x31b0
movq %r12, %rdi
callq 0x6130
movq %rax, (%r14)
movq %r12, %rdi
cmpl %r13d, %ebp
je 0x31c5
callq 0x60e0
movq %rax, %r12
incl %r13d
jmp 0x31a0
callq 0x6130
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_O2/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 0x30cc
movq %rax, (%r12)
movq %r15, %rdi
callq 0x6010
movl 0x20(%r14), %edx
leaq 0x10(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %rax, %rdi
movl %r13d, %esi
callq 0x3184
cmpl $0x0, 0x68(%rsp)
je 0x32a9
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 0xda70
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 0xde50
movsd %xmm0, (%rbp)
movq %r15, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdb20
// File: /workspace/github_c_makefile_star2_O2/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 0x1f994(%rip), %xmm1    # 0x231d0
xorpd %xmm2, %xmm2
xorl %eax, %eax
ucomisd %xmm2, %xmm0
andpd %xmm0, %xmm1
seta %al
xorl %ecx, %ecx
movsd 0x1f961(%rip), %xmm0    # 0x231b8
ucomisd %xmm1, %xmm0
leal -0x1(%rax,%rax), %eax
cmoval %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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, %r14
movl %esi, %ebp
movq %rdi, %r15
movl $0x0, 0x4(%rsp)
pushq $0x2
popq %r13
movl %ebp, %r12d
movl %ebp, %eax
cltd
idivl %r13d
movl %eax, %ebp
movslq %eax, %rbx
movq (%r15,%rbx,8), %rsi
movq %r14, %rdi
callq 0x2140
testl %r12d, %r12d
je 0x3e2e
cmpl $0x1, %r12d
jne 0x3e18
testl %eax, %eax
jne 0x3e2e
testl %eax, %eax
je 0x3e33
js 0x3def
leaq (%r15,%rbx,8), %r15
subl %ebp, %r12d
addl %ebp, 0x4(%rsp)
movl %r12d, %ebp
jmp 0x3def
pushq $-0x1
popq %rax
jmp 0x3e35
movl %ebp, %eax
addl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
xorl %r14d, %r14d
movq 0x28(%rbx), %rdi
cmpq %r14, 0x20(%rbx)
jbe 0x45bd
movq (%rdi,%r14,8), %rax
movq (%rax), %rdi
callq 0x2030
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
jmp 0x4595
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_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rsi
movsd 0x30(%rdi), %xmm0
cvtss2sd 0x38(%rdi), %xmm1
leaq 0x1ecdd(%rip), %rdi     # 0x232ed
movb $0x2, %al
callq 0x20e0
leaq 0x1ed01(%rip), %r14     # 0x2331f
leaq 0x1ea8f(%rip), %r15     # 0x230b4
pushq $0xa
popq %rbp
xorl %r12d, %r12d
cmpq %r12, 0x20(%rbx)
jbe 0x467d
movq 0x28(%rbx), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rdx
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x20e0
xorl %r13d, %r13d
movq 0x28(%rbx), %rax
movq (%rax,%r12,8), %rax
cmpq %r13, 0x8(%rax)
jbe 0x4671
movq (%rax), %rax
movq (%rax,%r13,8), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x20e0
incq %r13
jmp 0x464d
movl %ebp, %edi
callq 0x2040
incq %r12
jmp 0x462b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/UCLA-StarAI[P]TrimBN/src/trim/utils.c
// Function: new_search_result
SearchResult* new_search_result(const SddSize num_features) {
  SearchResult* result =
      (SearchResult*) malloc(sizeof(SearchResult));
  result->best_score = 0;
  result->best_subset = (char*) malloc(num_features * sizeof(char));
  result->cost = 0;
  return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x21b0
movq %rax, %r14
andq $0x0, (%rax)
movq %rbx, %rdi
callq 0x21b0
movq %rax, 0x8(%r14)
andl $0x0, 0x10(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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)
xorl %eax, %eax
cmpq %rax, %rdx
je 0x46f4
movb (%rsi,%rax), %cl
movq 0x8(%rdi), %r8
movb %cl, (%r8,%rax)
incq %rax
jmp 0x46df
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x5dc7
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 0xad1db(%rip), %rax     # 0xb2fb0
movq (%rax), %rdi
callq 0x45b0
testq %rbx, %rbx
je 0x5e19
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 0xad1ca(%rip), %rax     # 0xb2fd8
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x46c0
movq 0xad1b8(%rip), %r15     # 0xb2fd8
movq (%r15), %r14
testl %ebp, %ebp
je 0x5e6a
testq %rbx, %rbx
leaq 0x81665(%rip), %rax     # 0x87496
leaq 0x81805(%rip), %rbx     # 0x8763d
cmoveq %rax, %rbx
movl %ebp, %edi
callq 0x4150
leaq 0x7f6e3(%rip), %rsi     # 0x8552d
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4730
movq (%r15), %rdi
callq 0x45b0
pushq $0x1
popq %rdi
callq 0x4600
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0x4660
jmp 0x5e5a
// File: /workspace/github_c_makefile_star2_O2/Mikejmoffitt[P]romtools/wavlooper/wavlooper.c
// Function: write_smpl_chunk
void write_smpl_chunk(FILE *f, uint32_t start, uint32_t end)
{
	// $00 - $0F
	// The header.
	fputc('s', f);
	fputc('m', f);
	fputc('p', f);
	fputc('l', f);
	// Chunk size minus four
	fwrite32le(0x40 - 4, f);
	// Manufacturer (none)
	fwrite32le(0, f);
	// Product (none in particular)
	fwrite32le(0, f);

	// $10 - $1F
	// Sample period (unspecified)  TODO: Take from incoming wave file?
	fwrite32le(0, f);
	// MIDI unity node (irrelevant)
	fwrite32le(0x40 - 4, f);  // TODO: Isn't this unnecessary?
	// MIDI pitch fraction (n/a)
	fwrite32le(0, f);
	// SMPTE format
	fwrite32le(0, f);

	// $20 - $2B
	// SMPTE offset
	fwrite32le(0, f);
	// Number of sample loops
	fwrite32le(1, f);
	fwrite32le(0, f);

	// The sample loop begins.
	// ID
	fwrite32le(0, f);
	// Type (forward = 0)
	fwrite32le(0, f);
	// Start position
	fwrite32le(start, f);
	// End position
	fwrite32le(end, f);
	// Fraction
	fwrite32le(0, f);
	// Loops (infinity)
	fwrite32le(0, f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
pushq $0x73
popq %rdi
movq %rbx, %rsi
callq 0x1060
pushq $0x6d
popq %rdi
movq %rbx, %rsi
callq 0x1060
pushq $0x70
popq %rdi
movq %rbx, %rsi
callq 0x1060
pushq $0x6c
popq %rdi
movq %rbx, %rsi
callq 0x1060
pushq $0x3c
popq %r15
movl %r15d, %edi
movq %rbx, %rsi
callq 0x119c
xorl %edi, %edi
movq %rbx, %rsi
callq 0x119c
xorl %edi, %edi
movq %rbx, %rsi
callq 0x119c
xorl %edi, %edi
movq %rbx, %rsi
callq 0x119c
movl %r15d, %edi
movq %rbx, %rsi
callq 0x119c
xorl %edi, %edi
movq %rbx, %rsi
callq 0x119c
xorl %edi, %edi
movq %rbx, %rsi
callq 0x119c
xorl %edi, %edi
movq %rbx, %rsi
callq 0x119c
pushq $0x1
popq %rdi
movq %rbx, %rsi
callq 0x119c
xorl %edi, %edi
movq %rbx, %rsi
callq 0x119c
xorl %edi, %edi
movq %rbx, %rsi
callq 0x119c
xorl %edi, %edi
movq %rbx, %rsi
callq 0x119c
movl %r14d, %edi
movq %rbx, %rsi
callq 0x119c
movl %ebp, %edi
movq %rbx, %rsi
callq 0x119c
xorl %edi, %edi
movq %rbx, %rsi
callq 0x119c
xorl %edi, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x119c
// File: /workspace/github_c_makefile_star2_O2/Mikejmoffitt[P]romtools/wavlooper/wavlooper.c
// Function: main
int main(int argc, char **argv)
{
	if (argc < 5)
	{
		usage(argv[0]);
		return 0;
	}

	const char *in_fname = argv[1];
	const char *out_fname = argv[2];
	const uint32_t start = strtoul(argv[3], NULL, 0);
	const uint32_t end = strtoul(argv[4], NULL, 0);

	FILE *fin = fopen(in_fname, "rb");
	if (!fin)
	{
		fprintf(stderr, "Could not open %s for reading.\n", in_fname);
		return -1;
	}

	FILE *fout = fopen(out_fname, "wb");
	if (!fout)
	{
		fprintf(stderr, "Could not open %s for writing.\n", in_fname);
		fclose(fin);
		return -1;
	}

	int fetch = 0;
	while ((fetch = fgetc(fin)) != EOF) fputc(fetch, fout);
	fclose(fin);

	write_smpl_chunk(fout, start, end);
	fclose(fout);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
cmpl $0x4, %edi
jg 0x1300
movq (%r15), %rdi
callq 0x12d1
jmp 0x138d
movq 0x8(%r15), %rbx
movq 0x10(%r15), %r13
movq 0x18(%r15), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1090
movq %rax, %r14
movq 0x20(%r15), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1090
movq %rax, %r12
leaq 0xd07(%rip), %rsi       # 0x2036
movq %rbx, %rdi
callq 0x1080
testq %rax, %rax
je 0x1399
movq %rax, %r15
leaq 0xd13(%rip), %rsi       # 0x2059
movq %r13, %rdi
callq 0x1080
testq %rax, %rax
je 0x13b6
movq %rax, %r13
movq %r15, %rdi
callq 0x1050
cmpl $-0x1, %eax
je 0x136f
movl %eax, %edi
movq %r13, %rsi
callq 0x1060
jmp 0x1356
movq %r15, %rdi
callq 0x1030
movq %r13, %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x11e4
movq %r13, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x2c58(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xc8f(%rip), %rsi       # 0x2039
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1070
jmp 0x13d9
movq 0x2c3b(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xc95(%rip), %rsi       # 0x205c
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1070
movq %r15, %rdi
callq 0x1030
pushq $-0x1
popq %rax
jmp 0x138f
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0xa
popq %rdi
callq 0x1110
movq %rax, %rbx
testq %rax, %rax
jne 0x1307
leaq 0x8e58(%rip), %rdi      # 0xa158
xorl %eax, %eax
callq 0x462f
movl 0xfedb(%rip), %edx      # 0x111e8
leal 0x1(%rdx), %eax
movl %eax, 0xfed2(%rip)      # 0x111e8
leaq 0x8e57(%rip), %rsi      # 0xa174
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1170
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sisshiki1969[P]monocc/src/codegen.c
// Function: push_loop
void push_loop() {
  char *continue_label = new_label();
  char *break_label = new_label();
  Loop *label = (Loop *)calloc(1, sizeof(Loop));
  label->break_dest = break_label;
  label->continue_dest = continue_label;
  label->next = labels;
  labels = label;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x12e8
movq %rax, %rbx
callq 0x12e8
movq %rax, %r14
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x10d0
movq %r14, 0x10(%rax)
movq %rbx, 0x8(%rax)
movq 0xfe14(%rip), %rcx      # 0x111f0
movq %rcx, (%rax)
movq %rax, 0xfe0a(%rip)      # 0x111f0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x12e8
movq %rax, %r14
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x10d0
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
movq 0xfdd9(%rip), %rcx      # 0x111f0
movq %rcx, (%rax)
movq %rax, 0xfdcf(%rip)      # 0x111f0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xfdad(%rip), %rax      # 0x111f0
testq %rax, %rax
jne 0x145d
leaq 0x8d62(%rip), %rsi      # 0xa1b1
xorl %eax, %eax
callq 0x48b3
movq 0xfd93(%rip), %rax      # 0x111f0
movq 0x8(%rax), %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xfd85(%rip), %rax      # 0x111f0
testq %rax, %rax
jne 0x1485
leaq 0x8d6f(%rip), %rsi      # 0xa1e6
xorl %eax, %eax
callq 0x48b3
movq 0xfd6b(%rip), %rax      # 0x111f0
movq 0x10(%rax), %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xfd5d(%rip), %rcx      # 0x111f0
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x14a6
movq 0x18(%rcx), %rax
testq %rax, %rax
je 0x1493
jmp 0x14bc
leaq 0x8d75(%rip), %rdi      # 0xa222
xorl %eax, %eax
callq 0x462f
movq 0x18, %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x929b
leal -0x1(%rax), %ecx
cmpl $0x8, %ecx
jae 0x14e4
movl $0x8b, %edx
btl %ecx, %edx
jae 0x14e4
movl %ecx, %eax
leaq 0x95dd(%rip), %rcx      # 0xaabc
movl (%rcx,%rax,4), %eax
jmp 0x14f4
leaq 0x8d5b(%rip), %rdi      # 0xa246
movl %eax, %esi
xorl %eax, %eax
callq 0x462f
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x9610
movq %rax, %rbx
movq %rax, %rdi
callq 0x14be
cmpl $0x3, %eax
ja 0x158a
movl %eax, %eax
leaq 0x8ae9(%rip), %rcx      # 0xa004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xfcf5(%rip), %rax      # 0x11220
movq (%rax), %rcx
leaq 0x8d4d(%rip), %rdi      # 0xa282
jmp 0x1586
movq %rbx, %rdi
callq 0x91fa
leaq 0xfcda(%rip), %rcx      # 0x11220
movq (%rcx), %rcx
testb %al, %al
je 0x159d
leaq 0x8d52(%rip), %rdi      # 0xa2a6
jmp 0x15a4
movq %rbx, %rdi
callq 0x91fa
leaq 0xfcbb(%rip), %rcx      # 0x11220
movq (%rcx), %rcx
testb %al, %al
je 0x15a8
leaq 0x8d6d(%rip), %rdi      # 0xa2e0
jmp 0x15af
leaq 0xfca4(%rip), %rax      # 0x11220
movq (%rax), %rcx
leaq 0x8d0e(%rip), %rdi      # 0xa294
pushq $0x11
jmp 0x15b1
leaq 0x8d87(%rip), %rsi      # 0xa318
movq %r14, %rdi
xorl %eax, %eax
callq 0x4a9e
jmp 0x15ba
leaq 0x8d1f(%rip), %rdi      # 0xa2c3
pushq $0x1c
jmp 0x15b1
leaq 0x8d4d(%rip), %rdi      # 0xa2fc
pushq $0x1b
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
leaq 0xfc5f(%rip), %rax      # 0x11220
movq (%rax), %rcx
leaq 0x8d6e(%rip), %rdi      # 0xa339
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/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 0x14be
movl %eax, %ebp
movq %r14, %rdi
callq 0x14be
cmpl %eax, %ebp
jle 0x16b5
movq %r14, %rdi
callq 0x91fa
movl %eax, %ebp
movq %rbx, %rdi
callq 0x14be
leal -0x2(%rax), %ecx
cmpl $0x2, %ecx
jae 0x167a
leaq 0x8d22(%rip), %rax      # 0xa344
leaq 0x8d21(%rip), %r14      # 0xa34a
testb %bpl, %bpl
cmovneq %rax, %r14
leaq 0xfbe9(%rip), %r15      # 0x11220
movq (%r15), %rcx
leaq 0x8d0f(%rip), %rdi      # 0xa350
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
movq (%r15), %r15
movq %rbx, %rdi
callq 0x14be
cltq
leaq 0xfaa0(%rip), %rcx      # 0x11100
leaq (%rcx,%rax,4), %rcx
leaq 0x8d11(%rip), %rsi      # 0xa37c
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10f0
jmp 0x16d2
cmpl $0x1, %eax
jne 0x16b5
leaq 0xfb9a(%rip), %rbx      # 0x11220
movq (%rbx), %rcx
leaq 0x8cc0(%rip), %rdi      # 0xa350
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
movq %r14, %rdi
callq 0x91fa
movq (%rbx), %rcx
testb %al, %al
je 0x16c0
leaq 0x8caa(%rip), %rdi      # 0xa35b
pushq $0x10
jmp 0x16c9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8ca5(%rip), %rdi      # 0xa36c
pushq $0xf
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
leaq 0xfb47(%rip), %rax      # 0x11220
movq (%rax), %rcx
leaq 0x8c56(%rip), %rdi      # 0xa339
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/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 0x1780
leaq 0x88c3(%rip), %rcx      # 0xa014
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rbx), %rdi
callq 0x17e5
leaq 0xfab6(%rip), %rax      # 0x11220
movq (%rax), %rcx
leaq 0x8bdc(%rip), %rdi      # 0xa350
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
popq %rbx
jmp 0x1190
cmpl $0x2, %ecx
jne 0x179b
leaq 0xfa94(%rip), %rax      # 0x11220
movq (%rax), %rdi
movl 0x28(%rbx), %edx
leaq 0x8c1d(%rip), %rsi      # 0xa3b6
jmp 0x17d3
leaq 0x8c3c(%rip), %rsi      # 0xa3de
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x4a9e
movq %rbx, %rdi
popq %rbx
jmp 0x1716
movq 0x8(%rbx), %rdi
callq 0x173c
leaq 0xfa5a(%rip), %rax      # 0x11220
movq (%rax), %rdi
movl 0x38(%rbx), %edx
leaq 0x8bfc(%rip), %rsi      # 0xa3cf
xorl %eax, %eax
popq %rbx
jmp 0x10f0
movq 0x30(%rbx), %rdi
popq %rbx
jmp 0x16f8
// File: /workspace/github_c_makefile_star2_O2/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 0x91ad
leaq 0xf244(%rip), %r13      # 0x11220
movq (%r13), %rcx
testb %al, %al
je 0x208a
leaq 0x8404(%rip), %rdi      # 0xa3f3
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
movq %rbx, %rdi
callq 0x929b
movl %eax, %ebx
leal -0x8(%rbx), %r12d
leaq 0x83ef(%rip), %r14      # 0xa3fe
leaq 0x8409(%rip), %r15      # 0xa41f
xorl %ebp, %ebp
cmpl %r12d, %ebp
jg 0x2042
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
jmp 0x2018
leaq 0x83f7(%rip), %r14      # 0xa440
leaq 0x8410(%rip), %r15      # 0xa460
movq (%r13), %rcx
cmpl %ebx, %ebp
jge 0x207b
movq %rcx, %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
incl %ebp
jmp 0x2050
leaq 0x82b7(%rip), %rdi      # 0xa339
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
jmp 0x20df
leaq 0x83ef(%rip), %rdi      # 0xa480
pushq $0xa
popq %r14
pushq $0x1
popq %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %r12
movq %rbx, %rdi
callq 0x14be
cltq
leaq 0xf057(%rip), %rcx      # 0x11110
leaq (%rcx,%rax,4), %rdx
leaq 0x83c7(%rip), %rsi      # 0xa48b
movq %r12, %rdi
xorl %eax, %eax
callq 0x10f0
movq (%r13), %rcx
leaq 0x83c3(%rip), %rdi      # 0xa49c
movq %r14, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/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 0x12e8
movq %rax, %r15
callq 0x12e8
movq %rax, %r14
movq 0x8(%rbx), %rdi
callq 0x17e5
leaq 0xf102(%rip), %r13      # 0x11220
movq (%r13), %rcx
leaq 0x8227(%rip), %rdi      # 0xa350
pushq $0xa
popq %rsi
pushq $0x1
popq %r12
movq %r12, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x8364(%rip), %rdi      # 0xa4a7
pushq $0xd
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r13), %rdi
leaq 0x835c(%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 0x18(%rbx), %rdi
callq 0x2196
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x132c