LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/parse.c
// Function: equality
static Node *equality() {
  Node *lhs = relational();
  Token *tok;
  for (;;) {
    if ((tok = match("=="))) {
      Node *node = new_node(NEQ, tok);
      node->lhs = lhs;
      node->rhs = relational();
      lhs = node;
    } else if ((tok = match("!="))) {
      Node *node = new_node(NNE, tok);
      node->lhs = lhs;
      node->rhs = relational();
      lhs = node;
    } else {
      return lhs;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
callq 0xad66
movq %rax, %r15
leaq 0x4567(%rip), %rbx      # 0xf273
leaq 0x4563(%rip), %r14      # 0xf276
movq %rbx, %rdi
callq 0xa09f
testq %rax, %rax
je 0xad27
movl $0xc, %edi
jmp 0xad39
movq %r14, %rdi
callq 0xa09f
testq %rax, %rax
je 0xad57
movl $0xd, %edi
movq %rax, %rsi
callq 0x9bd0
movq %rax, %r12
movq %r15, 0x18(%rax)
callq 0xad66
movq %rax, 0x20(%r12)
movq %r12, %r15
jmp 0xad13
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/parse.c
// Function: relational
static Node *relational() {
  Node *lhs = add();
  Token *tok;
  for (;;) {
    if ((tok = match("<"))) {
      Node *node = new_node(NLT, tok);
      node->lhs = lhs;
      node->rhs = add();
      lhs = node;
    } else if ((tok = match("<="))) {
      Node *node = new_node(NLE, tok);
      node->lhs = lhs;
      node->rhs = add();
      lhs = node;
    } else if ((tok = match(">"))) {
      Node *node = new_node(NGT, tok);
      node->lhs = lhs;
      node->rhs = add();
      lhs = node;
    } else if ((tok = match(">="))) {
      Node *node = new_node(NGE, tok);
      node->lhs = lhs;
      node->rhs = add();
      lhs = node;
    } else {
      return lhs;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0xae12
movq %rax, %r12
leaq 0x47c6(%rip), %rbx      # 0xf546
leaq 0x47b7(%rip), %r14      # 0xf53e
leaq 0x44f9(%rip), %r15      # 0xf287
leaq 0x47ad(%rip), %r13      # 0xf542
movq %rbx, %rdi
callq 0xa09f
testq %rax, %rax
je 0xada9
movl $0x8, %edi
jmp 0xade3
movq %r14, %rdi
callq 0xa09f
testq %rax, %rax
je 0xadbd
movl $0x9, %edi
jmp 0xade3
movq %r15, %rdi
callq 0xa09f
testq %rax, %rax
je 0xadd1
movl $0xa, %edi
jmp 0xade3
movq %r13, %rdi
callq 0xa09f
testq %rax, %rax
je 0xae00
movl $0xb, %edi
movq %rax, %rsi
callq 0x9bd0
movq %rax, %rbp
movq %r12, 0x18(%rax)
callq 0xae12
movq %rax, 0x20(%rbp)
movq %rbp, %r12
jmp 0xad95
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/parse.c
// Function: add
static Node *add() {
  Node *lhs = mul();
  Token *tok;
  for (;;) {
    if ((tok = match("+"))) {
      Node *node = new_node(NADD, tok);
      node->lhs = lhs;
      node->rhs = mul();
      lhs = node;
    } else if ((tok = match("-"))) {
      Node *node = new_node(NSUB, tok);
      node->lhs = lhs;
      node->rhs = mul();
      lhs = node;
    } else {
      return lhs;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
callq 0xae83
movq %rax, %r15
leaq 0x4461(%rip), %rbx      # 0xf28a
leaq 0x445d(%rip), %r14      # 0xf28d
movq %rbx, %rdi
callq 0xa09f
testq %rax, %rax
je 0xae44
movl $0x3, %edi
jmp 0xae56
movq %r14, %rdi
callq 0xa09f
testq %rax, %rax
je 0xae74
movl $0x4, %edi
movq %rax, %rsi
callq 0x9bd0
movq %rax, %r12
movq %r15, 0x18(%rax)
callq 0xae83
movq %rax, 0x20(%r12)
movq %r12, %r15
jmp 0xae30
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/parse.c
// Function: mul
static Node *mul() {
  Node *lhs = cast();
  Token *tok;
  for (;;) {
    if ((tok = match("*"))) {
      Node *node = new_node(NMUL, tok);
      node->lhs = lhs;
      node->rhs = cast();
      lhs = node;
    } else if ((tok = match("/"))) {
      Node *node = new_node(NDIV, tok);
      node->lhs = lhs;
      node->rhs = cast();
      lhs = node;
    } else if ((tok = match("%"))) {
      Node *node = new_node(NMOD, tok);
      node->lhs = lhs;
      node->rhs = cast();
      lhs = node;
    } else {
      return lhs;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
callq 0xaf0d
movq %rax, %r12
leaq 0x43ad(%rip), %rbx      # 0xf248
leaq 0x4609(%rip), %r14      # 0xf4ab
leaq 0x43d0(%rip), %r15      # 0xf279
movq %rbx, %rdi
callq 0xa09f
testq %rax, %rax
je 0xaebd
movl $0x5, %edi
jmp 0xaee3
movq %r14, %rdi
callq 0xa09f
testq %rax, %rax
je 0xaed1
movl $0x6, %edi
jmp 0xaee3
movq %r15, %rdi
callq 0xa09f
testq %rax, %rax
je 0xaf00
movl $0x7, %edi
movq %rax, %rsi
callq 0x9bd0
movq %rax, %r13
movq %r12, 0x18(%rax)
callq 0xaf0d
movq %rax, 0x20(%r13)
movq %r13, %r12
jmp 0xaea9
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/parse.c
// Function: cast
static Node *cast() {
  if (eq_reserved(peek(0), "(") && is_typename(peek(1))) {
    Token *token = peek(0);
    consume();
    Type *type = type_specifier();
    while (match("*")) {
      type = ptr_to(type);
    }
    if (!match(")")) {
      parse_error(")", peek(0));
    }
    Node *node = new_node(NCAST, token);
    node->type = type;
    node->expr = cast();
    return node;
  } else {
    return unary();
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x823f(%rip), %rdi      # 0x13158
leaq 0x490e(%rip), %rsi      # 0xf82e
callq 0xdab0
testb %al, %al
je 0xafc4
movq 0x8224(%rip), %rax      # 0x13158
movq (%rax), %rdi
callq 0xaff5
testl %eax, %eax
je 0xafc4
movq 0x820d(%rip), %rbx      # 0x13158
movq (%rbx), %rax
movq %rax, 0x8203(%rip)      # 0x13158
callq 0xa5b8
movq %rax, %r14
leaq 0x42e4(%rip), %rdi      # 0xf248
callq 0xa09f
testq %rax, %rax
je 0xaf8d
leaq 0x42d3(%rip), %r15      # 0xf248
movq %r14, %rdi
callq 0x9cf6
movq %rax, %r14
movq %r15, %rdi
callq 0xa09f
testq %rax, %rax
jne 0xaf75
leaq 0x4338(%rip), %rdi      # 0xf2cc
callq 0xa09f
testq %rax, %rax
je 0xafce
movl $0x28, %edi
movq %rbx, %rsi
callq 0x9bd0
movq %rax, %rbx
movq %r14, 0x10(%rax)
callq 0xaf0d
movq %rax, 0x38(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
popq %rbx
popq %r14
popq %r15
jmp 0xb05d
movq 0x8183(%rip), %rbx      # 0x13158
leaq 0x3074(%rip), %rdi      # 0xe050
leaq 0x42e9(%rip), %rsi      # 0xf2cc
xorl %eax, %eax
callq 0xd86a
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcd01
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/parse.c
// Function: is_typename
static int is_typename(Token *t) {
  if (eq_reserved(t, "struct")) {
    return 1;
  }

  if (eq_reserved(t, "enum")) {
    return 1;
  }

  if (t->tag == TIDENT || t->tag == TRESERVED) {
    for (TypeDef *td = typedefs; td != NULL; td = td->next) {
      if (streq(t->ident, td->name)) {
        return 1;
      }
    }
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x420f(%rip), %rsi      # 0xf213
callq 0xdab0
movl $0x1, %ebx
testb %al, %al
jne 0xb055
leaq 0x422a(%rip), %rsi      # 0xf243
movq %r14, %rdi
callq 0xdab0
testb %al, %al
jne 0xb055
movl 0x8(%r14), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0xb053
leaq 0x8130(%rip), %r15      # 0x13168
movq (%r15), %r15
testq %r15, %r15
je 0xb053
movq 0x10(%r14), %rdi
movq 0x8(%r15), %rsi
callq 0xd9ca
testl %eax, %eax
je 0xb038
jmp 0xb055
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/parse.c
// Function: find_var
static Node *find_var(Token *tok, char *name) {
  for (LVar *env = local_env; env != NULL; env = env->next) {
    if (streq(name, env->name)) {
      return new_var(tok, env->name, env->type, env->offset);
    }
  }

  for (GVar *env = global_env; env != NULL; env = env->next) {
    if (streq(name, env->name)) {
      return new_gvar(tok, env->name, env->type);
    }
  }

  for (Enum *env = enum_env; env != NULL; env = env->next) {
    if (streq(name, env->name)) {
      Node *val = clone_node(env->val);
      val->token = tok;
      return val;
    }
  }

  bad_token(tok, format("%s is not defined\n", name));
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x79e7(%rip), %r15      # 0x13180
movq (%r15), %r15
testq %r15, %r15
je 0xb7d8
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0xd9ca
testl %eax, %eax
je 0xb799
movq 0x8(%r15), %r14
movq 0x10(%r15), %r12
movslq 0x18(%r15), %r15
movl $0x1, %edi
movq %rbx, %rsi
callq 0x9bd0
movq %r14, 0x40(%rax)
movq %r12, 0x10(%rax)
movq %r15, 0x48(%rax)
jmp 0xb842
leaq 0x7981(%rip), %r15      # 0x13160
movq (%r15), %r15
testq %r15, %r15
je 0xb816
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0xd9ca
testl %eax, %eax
je 0xb7df
movq 0x8(%r15), %r14
movq 0x10(%r15), %r15
movl $0x2, %edi
movq %rbx, %rsi
callq 0x9bd0
movq %r14, 0x40(%rax)
movq %r15, 0x10(%rax)
jmp 0xb842
leaq 0x795b(%rip), %r15      # 0x13178
movq (%r15), %r15
testq %r15, %r15
je 0xb84e
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0xd9ca
testl %eax, %eax
je 0xb81d
movq 0x10(%r15), %rdi
callq 0x9c54
movq %rbx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3a3a(%rip), %rdi      # 0xf28f
movq %r14, %rsi
xorl %eax, %eax
callq 0xd86a
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcd01
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/parse.c
// Function: comma
static Node *comma() {
  Node *lhs = assign();

  Token *tok;
  for (;;) {
    if ((tok = match(","))) {
      Node *node = new_node(NCOMMA, tok);
      node->lhs = lhs;
      node->rhs = assign();
      lhs = node;
    } else {
      return lhs;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
callq 0xaa0b
movq %rax, %rbx
leaq 0x27d0(%rip), %rdi      # 0xe04e
callq 0xa09f
testq %rax, %rax
je 0xb8be
leaq 0x27bf(%rip), %r14      # 0xe04e
movl $0x15, %edi
movq %rax, %rsi
callq 0x9bd0
movq %rax, %r15
movq %rbx, 0x18(%rax)
callq 0xaa0b
movq %rax, 0x20(%r15)
movq %r14, %rdi
callq 0xa09f
movq %r15, %rbx
testq %rax, %rax
jne 0xb88f
jmp 0xb8c1
movq %rbx, %r15
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/parse.c
// Function: add_lvar
static void add_lvar(Token *tok, char *name, Type *ty) {
  local_size += size_of(ty);
  LVar *lvar = calloc(sizeof(LVar), 1);
  lvar->name = name;
  lvar->type = ty;
  lvar->offset = local_size;
  lvar->next = local_env;
  local_env = lvar;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x9bf4
movq %rax, %r15
addq 0x78a9(%rip), %r15      # 0x13190
movq %r15, 0x78a2(%rip)      # 0x13190
movl $0x20, %edi
movl $0x1, %esi
callq 0x20f0
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
movl %r15d, 0x18(%rax)
movq 0x7870(%rip), %rcx      # 0x13180
movq %rcx, (%rax)
movq %rax, 0x7866(%rip)      # 0x13180
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/parse.c
// Function: declaration
static Node *declaration() {
  // variable definition
  Node *decl = declarator(type_specifier());
  add_lvar(decl->token, decl->name, decl->type);

  Token *tok;
  if ((tok = match("="))) {
    Node *comma = new_node(NCOMMA, tok);
    comma->lhs = decl;
    comma->rhs = read_initializer(tok, find_var(tok, decl->name));
    return comma;
  }

  return decl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
callq 0xa5b8
movq %rax, %rdi
callq 0xa931
movq %rax, %r15
movq 0x10(%rax), %rsi
movq 0x40(%rax), %rdi
callq 0xb8ca
leaq 0x3399(%rip), %rdi      # 0xf277
callq 0xa09f
testq %rax, %rax
je 0xbf92
movq %rax, %r14
movl $0x15, %edi
movq %rax, %rsi
callq 0x9bd0
movq %rax, %rbx
movq %r15, 0x18(%rax)
movq 0x40(%r15), %rsi
movq %r14, %rdi
callq 0xb784
movq %rax, %r15
leaq 0x330a(%rip), %rdi      # 0xf223
callq 0xa09f
testq %rax, %rax
je 0xbf6b
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xbfa1
movq %rax, %r14
leaq 0x3227(%rip), %rdi      # 0xf161
callq 0xa09f
testq %rax, %rax
jne 0xbf8b
movq 0x720d(%rip), %rbx      # 0x13158
leaq 0x20fe(%rip), %rdi      # 0xe050
leaq 0x3208(%rip), %rsi      # 0xf161
xorl %eax, %eax
callq 0xd86a
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcd01
callq 0xaa0b
movq %rax, %r12
movl $0x17, %edi
movq %r14, %rsi
callq 0x9bd0
movq %rax, %r14
movq %r15, 0x18(%rax)
movq %r12, 0x20(%rax)
movq %r14, 0x20(%rbx)
movq %rbx, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/parse.c
// Function: read_init_list
static Node *read_init_list(Token *token, Node *var, int i) {
  Node *node = new_assign_node(
      token, 0, new_subscript(token, var, new_int_node(token, i)), assign());
  if (eq_reserved(peek(0), "}")) {
    Node *comma = new_node(NCOMMA, token);
    comma->lhs = node;
    comma->rhs = var;
    return comma;
  }
  if (!match(",")) {
    parse_error(",", peek(0));
  }
  Node *comma = new_node(NCOMMA, token);
  comma->lhs = node;
  comma->rhs = read_init_list(token, var, i + 1);
  return comma;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x9bd0
movq %rax, %r15
movl %ebp, 0x28(%rax)
callq 0x9cac
movq %rax, 0x10(%r15)
movl $0x1a, %edi
movq %r14, %rsi
callq 0x9bd0
movq %rax, %r12
movl $0x3, %edi
movq %r14, %rsi
callq 0x9bd0
movq %rax, 0x38(%r12)
movq %rbx, 0x18(%rax)
movq %r15, 0x20(%rax)
callq 0xaa0b
movq %rax, %r13
movl $0x17, %edi
movq %r14, %rsi
callq 0x9bd0
movq %rax, %r15
movq %r12, 0x18(%rax)
movq %r13, 0x20(%rax)
movq 0x713a(%rip), %rdi      # 0x13158
leaq 0x313c(%rip), %rsi      # 0xf161
callq 0xdab0
testb %al, %al
je 0xc044
movl $0x15, %edi
movq %r14, %rsi
callq 0x9bd0
movq %rax, %r12
movq %r15, 0x18(%rax)
jmp 0xc07b
leaq 0x2003(%rip), %rdi      # 0xe04e
callq 0xa09f
testq %rax, %rax
je 0xc092
movl $0x15, %edi
movq %r14, %rsi
callq 0x9bd0
movq %rax, %r12
movq %r15, 0x18(%rax)
incl %ebp
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0xbfa1
movq %rax, %rbx
movq %rbx, 0x20(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x70bf(%rip), %rbx      # 0x13158
leaq 0x1fb0(%rip), %rdi      # 0xe050
leaq 0x1fa7(%rip), %rsi      # 0xe04e
xorl %eax, %eax
callq 0xd86a
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcd01
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/parse.c
// Function: expr_stmt
static Node *expr_stmt() {
  Node *node = new_node(NEXPR_STMT, peek(0));
  node->expr = expr();
  if (!match(";")) {
    parse_error("expr stmt: ;", peek(0));
  }
  return node;
}

// Assembly:
pushq %rbx
movq 0x7097(%rip), %rsi      # 0x13158
movl $0x1c, %edi
callq 0x9bd0
movq %rax, %rbx
callq 0xb86a
movq %rax, 0x38(%rbx)
leaq 0x3245(%rip), %rdi      # 0xf323
callq 0xa09f
testq %rax, %rax
je 0xc0ed
movq %rbx, %rax
popq %rbx
retq
movq 0x7064(%rip), %rbx      # 0x13158
leaq 0x1f55(%rip), %rdi      # 0xe050
leaq 0x3237(%rip), %rsi      # 0xf339
xorl %eax, %eax
callq 0xd86a
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcd01
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/regalloc.c
// Function: scan
void scan(Vector* regs) {
  IReg** used = calloc(NUM_REGS, sizeof(IReg*));

  for (int i = 0; i < regs->length; i++) {
    IReg* reg = regs->ptr[i];
    bool found = false;

    for (int i = 0; i < NUM_REGS - 1; i++) {
      if (!(used[i] && reg->def < used[i]->last_use)) {
        assert(i < NUM_REGS);
        reg->real_reg = i;
        used[i] = reg;
        found = true;
        break;
      }
    }

    if (!found) {
      used[NUM_REGS - 1] = reg;
      int k = choose_to_spill(used);
      reg->real_reg = k;
      used[k]->real_reg = NUM_REGS - 1;
      used[k]->spill = true;
      used[k] = reg;
      error("error: register allocation %s\n", show_ireg(reg));
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x7, %edi
movl $0x8, %esi
callq 0x20f0
movq %rax, %rbx
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xc16e
movq (%r14), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %r14
xorl %esi, %esi
movq (%rbx,%rsi,8), %rdi
testq %rdi, %rdi
je 0xc15f
movl 0x10(%r14), %r8d
cmpl 0x14(%rdi), %r8d
jge 0xc15f
incq %rsi
cmpq $0x6, %rsi
jne 0xc141
jmp 0xc176
movl %esi, (%r14)
movq %r14, (%rbx,%rsi,8)
incq %rdx
cmpq %rax, %rdx
jne 0xc13b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, 0x30(%rbx)
movq %rbx, %rdi
callq 0xc1ae
movl %eax, (%r14)
cltq
movq (%rbx,%rax,8), %rax
movl $0x6, (%rax)
movb $0x1, 0x18(%rax)
movq %r14, %rdi
callq 0x8cb1
leaq 0x31a2(%rip), %rdi      # 0xf346
movq %rax, %rsi
xorl %eax, %eax
callq 0xd930
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/regalloc.c
// Function: choose_to_spill
static int choose_to_spill(IReg **used) {
  int k = 0;
  for (int i = 1; i < NUM_REGS; i++) {
    if (used[k]->last_use < used[i]->last_use) {
      k = i;
    }
  }
  return k;

}

// Assembly:
xorl %edx, %edx
movl $0x1, %ecx
movslq %edx, %rax
movq (%rdi,%rax,8), %rax
movl 0x14(%rax), %esi
movq (%rdi,%rcx,8), %r8
movl %ecx, %eax
cmpl 0x14(%r8), %esi
jl 0xc1cd
movl %edx, %eax
incq %rcx
movl %eax, %edx
cmpq $0x7, %rcx
jne 0xc1b5
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/sema.c
// Function: sema
void sema(Program* prog) {
  for (GVar* gvar = prog->globals; gvar != NULL; gvar = gvar->next) {
    walk(gvar->init);
    if (gvar->inits != NULL) {
      for (size_t i = 0; i < gvar->inits->length; i++) {
        walk(gvar->inits->ptr[i]);
      }
    }
  }

  funcs = prog->funcs;
  switches = new_vec();
  for (size_t i = 0; i < prog->funcs->length; i++) {
    Function* fn = prog->funcs->ptr[i];
    if (fn->body)
      walk(fn->body);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0xc473
movq 0x18(%r14), %rdi
callq 0xc4bf
movq 0x20(%r14), %rax
testq %rax, %rax
je 0xc46e
cmpq $0x0, 0x10(%rax)
je 0xc46e
xorl %r15d, %r15d
movq (%rax), %rax
movq (%rax,%r15,8), %rdi
callq 0xc4bf
incq %r15
movq 0x20(%r14), %rax
cmpq 0x10(%rax), %r15
jb 0xc455
movq (%r14), %r14
jmp 0xc434
movq (%rbx), %rax
movq %rax, 0x6d1b(%rip)      # 0x13198
xorl %eax, %eax
callq 0x307c
movq %rax, 0x6d15(%rip)      # 0x131a0
movq (%rbx), %rax
cmpq $0x0, 0x10(%rax)
je 0xc4b9
xorl %r14d, %r14d
movq (%rax), %rcx
movq (%rcx,%r14,8), %rcx
movq 0x10(%rcx), %rdi
testq %rdi, %rdi
je 0xc4b0
callq 0xc4bf
movq (%rbx), %rax
incq %r14
cmpq 0x10(%rax), %r14
jb 0xc498
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/sema.c
// Function: rewrite_arith_node
static void rewrite_arith_node(Node* node) {
  /* ポインタ演算を通常の整数演算に置き換える */
  if (type_of(node->lhs)->ty == TY_PTR && type_of(node->rhs)->ty != TY_PTR) {
    Node* rhs = node->rhs;
    Node* new = new_node(NMUL, rhs->token);
    new->lhs = rhs;
    new->rhs = new_node(NINT, rhs->token);
    new->rhs->integer = size_of(type_of(node->lhs)->ptr_to);
    new->rhs->type = ptr_to(type_of(node->lhs)->ptr_to);
    new->type = new->rhs->type;
    node->rhs = new;
  } else if (type_of(node->rhs)->ty == TY_PTR && type_of(node->lhs)->ty != TY_PTR) {
    Node* lhs = node->lhs;
    Node* new = new_node(NMUL, lhs->token);
    new->lhs = lhs;
    new->rhs = new_node(NINT, lhs->token);
    new->rhs->integer = size_of(type_of(node->rhs)->ptr_to);
    new->rhs->type = ptr_to(type_of(node->lhs)->ptr_to);
    new->type = new->rhs->type;
    node->lhs = new;
  }

  Type* type = arith_conv(type_of(node->lhs), type_of(node->rhs));

  node->type = type;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x9d62
cmpl $0x4, (%rax)
jne 0xca2d
movq 0x20(%rbx), %rdi
callq 0x9d62
cmpl $0x4, (%rax)
jne 0xcabc
movq 0x20(%rbx), %rdi
callq 0x9d62
cmpl $0x4, (%rax)
movq 0x18(%rbx), %r15
jne 0xcb23
movq %r15, %rdi
callq 0x9d62
cmpl $0x4, (%rax)
movq 0x18(%rbx), %r15
je 0xcb23
movq 0x8(%r15), %rsi
movl $0x5, %edi
callq 0x9bd0
movq %rax, %r14
movq %r15, 0x18(%rax)
movq 0x8(%r15), %rsi
xorl %edi, %edi
callq 0x9bd0
movq %rax, 0x20(%r14)
movq 0x20(%rbx), %rdi
callq 0x9d62
movq 0x18(%rax), %rdi
callq 0x9bf4
movq 0x20(%r14), %rcx
movl %eax, 0x28(%rcx)
movq 0x18(%rbx), %rdi
callq 0x9d62
movq 0x18(%rax), %rdi
callq 0x9cf6
movq 0x20(%r14), %rcx
movq %rax, 0x10(%rcx)
movq %rax, 0x10(%r14)
movq %r14, 0x18(%rbx)
movq %r14, %r15
jmp 0xcb23
movq 0x20(%rbx), %r15
movq 0x8(%r15), %rsi
movl $0x5, %edi
callq 0x9bd0
movq %rax, %r14
movq %r15, 0x18(%rax)
movq 0x8(%r15), %rsi
xorl %edi, %edi
callq 0x9bd0
movq %rax, 0x20(%r14)
movq 0x18(%rbx), %rdi
callq 0x9d62
movq 0x18(%rax), %rdi
callq 0x9bf4
movq 0x20(%r14), %rcx
movl %eax, 0x28(%rcx)
movq 0x18(%rbx), %rdi
callq 0x9d62
movq 0x18(%rax), %rdi
callq 0x9cf6
movq 0x20(%r14), %rcx
movq %rax, 0x10(%rcx)
movq %rax, 0x10(%r14)
movq %r14, 0x20(%rbx)
movq 0x18(%rbx), %r15
movq %r15, %rdi
callq 0x9d62
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x9d62
movq %r14, %rdi
movq %rax, %rsi
callq 0xcb4c
movq %rax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/sema.c
// Function: arith_conv
static Type* arith_conv(Type* t1, Type* t2) {
  Type* type = NULL;

  if (t1->ty == TY_STRUCT || t2->ty == TY_STRUCT) {
    error("error(arith_conv):");
    dump_type(t1);
    eprintf("\n");
    dump_type(t2);
    eprintf("\n");
  }

  /* 左辺と右辺のサイズが大きい方の型をnodeに割り当てる */
  if (size_of(t1) >= size_of(t2)) {
    type = t1;
  } else {
    type = t2;
  }

  if (type->array_size != 0) {
    /* 配列型になった場合はポインタ型に変換する */
    type = clone_type(type);
    type->array_size = 0;
  }

  return type;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x5, (%rdi)
je 0xcb9b
movq %rsi, %r14
cmpl $0x5, (%rsi)
je 0xcb9b
movq %rdi, %rbx
callq 0x9bf4
movq %rax, %r15
movq %r14, %rdi
callq 0x9bf4
cmpq %rax, %r15
cmovbq %r14, %rbx
cmpq $0x0, 0x20(%rbx)
je 0xcb92
movq %rbx, %rdi
callq 0x9c21
movq %rax, %rbx
movq $0x0, 0x20(%rax)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x287b(%rip), %rdi      # 0xf41d
xorl %eax, %eax
callq 0xd930
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/sema.c
// Function: ret_type
static Type* ret_type(char* name) {
  for (size_t i = 0; i < funcs->length; i++) {
    Function* fn = funcs->ptr[i];
    if (streq(name, fn->name)) {
      return fn->ret_type;
    }
  }
  eprintf("undefined function %s\n", name);
  return int_type();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x65e0(%rip), %rax      # 0x13198
cmpq $0x0, 0x10(%rax)
je 0xcbe8
xorl %r14d, %r14d
movq (%rax), %rax
movq (%rax,%r14,8), %r15
movq (%r15), %rsi
movq %rbx, %rdi
callq 0xd9ca
testl %eax, %eax
jne 0xcc03
incq %r14
movq 0x65b6(%rip), %rax      # 0x13198
cmpq 0x10(%rax), %r14
jb 0xcbc2
leaq 0x2841(%rip), %rdi      # 0xf430
movq %rbx, %rsi
xorl %eax, %eax
callq 0x21b0
popq %rbx
popq %r14
popq %r15
jmp 0x9cac
movq 0x8(%r15), %rax
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/token.c
// Function: print_line
static void print_line(char* start, char* pos) {
  size_t line = 0;
  size_t column = 0;
  /* char* start = src; // 出力する行の先頭文字 */

  for (char *c = start; c != pos && *c != '\0'; c++) {
    if (*c == '\n') {
      start = c + 1;
      line++;
      column = 0;
    } else {
      column++;
    }
  }

  eprintf("error at (%d, %d)\n\n", line + 1, column + 1);

  // 行を出力
  size_t len = strchr(start, '\n') - start;
  eprintf("%.*s\n", len, start);

  // posまでインデントする
  for (size_t i = 0; i < column; i++) {
    if (start[i] == '\t') {
      eprintf("\t");
    } else {
      eprintf(" ");
    }
  }

  eprintf("^\n\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0xcc7a
movq %rsi, %rax
xorl %r14d, %r14d
movq %rbx, %rcx
xorl %esi, %esi
movzbl (%rcx), %edx
cmpl $0xa, %edx
je 0xcc63
testl %edx, %edx
je 0xcc75
incq %r14
jmp 0xcc6d
leaq 0x1(%rcx), %rbx
incq %rsi
xorl %r14d, %r14d
incq %rcx
cmpq %rax, %rcx
jne 0xcc52
incq %rsi
jmp 0xcc82
movl $0x1, %esi
xorl %r14d, %r14d
leaq 0x1(%r14), %rdx
leaq 0x27fd(%rip), %rdi      # 0xf48a
xorl %eax, %eax
callq 0x21b0
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2090
subq %rbx, %rax
leaq 0x27f3(%rip), %rdi      # 0xf49e
movq %rax, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x21b0
testq %r14, %r14
je 0xccea
leaq 0x27e0(%rip), %r15      # 0xf4a4
leaq 0x1582(%rip), %r12      # 0xe24d
xorl %r13d, %r13d
cmpb $0x9, (%rbx,%r13)
movq %r15, %rdi
je 0xccdb
movq %r12, %rdi
xorl %eax, %eax
callq 0x21b0
incq %r13
cmpq %r13, %r14
jne 0xccce
leaq 0x27b5(%rip), %rdi      # 0xf4a6
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x21b0
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/token.c
// Function: lex
Token* lex(char* path) {
  FILE* file = fopen(path, "r");
  if (file == NULL) {
    error("cannot open file: %s\n", path);
  }

  src = read_file(file);
  fclose(file);
  cur = src;

  Token* current = next_token();
  Token* head = current;

  while ((current->next = next_token()) != NULL) {
    current = current->next;
  }

  return head;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x24bf(%rip), %rsi      # 0xf1de
callq 0x2150
testq %rax, %rax
je 0xcd98
movq %rax, %rbx
callq 0xd9db
movq %rax, %r14
movq %rbx, %rdi
callq 0x20d0
cmpb $-0x1, %al
je 0xcd4d
movsbl %al, %esi
movq %r14, %rdi
callq 0xda0d
jmp 0xcd34
movq %r14, %rdi
callq 0xda87
movq %rax, 0x6454(%rip)      # 0x131b0
movq %rbx, %rdi
callq 0x2070
movq 0x6445(%rip), %rax      # 0x131b0
movq %rax, 0x6446(%rip)      # 0x131b8
callq 0xcda9
movq %rax, %rbx
movq %rax, %r14
callq 0xcda9
movq %rax, (%r14)
movq %rax, %r14
testq %rax, %rax
jne 0xcd7d
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x26d5(%rip), %rdi      # 0xf474
movq %r14, %rsi
xorl %eax, %eax
callq 0xd930
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/token.c
// Function: read_include_path
static char* read_include_path(void) {
  StringBuilder* sb = new_sb();

  if (*cur != '"' && *cur != '<') {
    print_line(src, cur);
    error("expected \" or <, but actual %c\n", *cur);
  }
  consume();

  while (*cur != '"' && *cur != '>') {
    sb_putc(sb, *cur);
    consume();
  }

  consume();
  return sb_run(sb);
}

// Assembly:
pushq %rbx
callq 0xd9db
movq %rax, %rbx
movq 0x5c74(%rip), %rsi      # 0x131b8
movzbl (%rsi), %eax
cmpl $0x3c, %eax
je 0xd551
cmpl $0x22, %eax
jne 0xd5c5
movb $0x1, %al
andb $0x1, %al
movb %al, 0x5c65(%rip)       # 0x131c0
leaq 0x1(%rsi), %rax
movq %rax, 0x5c52(%rip)      # 0x131b8
movzbl 0x1(%rsi), %eax
cmpl $0x22, %eax
je 0xd5aa
cmpl $0x3e, %eax
je 0xd5aa
movsbl %al, %esi
movq %rbx, %rdi
callq 0xda0d
movq 0x5c32(%rip), %rsi      # 0x131b8
movzbl (%rsi), %eax
cmpl $0xc, %eax
jg 0xd595
cmpl $0x9, %eax
je 0xd55b
jmp 0xd5a1
cmpl $0x20, %eax
je 0xd55b
cmpl $0xd, %eax
je 0xd5a6
jmp 0xd551
cmpl $0xa, %eax
jne 0xd551
xorl %eax, %eax
jmp 0xd553
movb $0x1, 0x5c0f(%rip)      # 0x131c0
addq $0x2, %rsi
movq %rsi, 0x5bfc(%rip)      # 0x131b8
movq %rbx, %rdi
popq %rbx
jmp 0xda87
movq 0x5be4(%rip), %rdi      # 0x131b0
callq 0xcc36
movq 0x5be0(%rip), %rax      # 0x131b8
movsbl (%rax), %esi
leaq 0x1f3b(%rip), %rdi      # 0xf51d
xorl %eax, %eax
callq 0xd930
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/token.c
// Function: read_char
static char read_char(void) {
  char c;
  if (*cur == '\\') {
    consume();
    switch (*cur) {
    case 'a':
      c = '\a';
      break;
    case 'b':
      c = '\b';
      break;
    case 'f':
      c = '\f';
      break;
    case 'n':
      c = '\n';
      break;
    case 'r':
      c = '\r';
      break;
    case 't':
      c = '\t';
      break;
    case 'v':
      c = '\v';
      break;
    case '\\':
      c = '\\';
      break;
    case '\'':
      c = '\'';
      break;
    case '\"':
      c = '\"';
      break;
    case '0':
      c = '\0';
      break;
    default:
      print_line(src, cur);
      error("invalid escape sequence: %c\n", *cur);
    }
  } else {
    c = *cur;
  }
  consume();
  return c;
}

// Assembly:
movq 0x5b81(%rip), %rdx      # 0x131b8
movb (%rdx), %al
movzbl %al, %esi
xorl %ecx, %ecx
cmpl $0xc, %esi
jle 0xd691
cmpl $0xd, %esi
je 0xd6ea
cmpl $0x20, %esi
je 0xd6f0
cmpl $0x5c, %esi
jne 0xd69b
movb $0x1, 0x5b5f(%rip)      # 0x131c0
leaq 0x1(%rdx), %rsi
movq %rsi, 0x5b4c(%rip)      # 0x131b8
movb 0x1(%rdx), %al
movzbl %al, %edx
movb $0x1, %cl
cmpl $0x61, %edx
jg 0xd69f
cmpl $0x2f, %edx
jle 0xd6bb
cmpl $0x30, %edx
je 0xd6d5
cmpl $0x5c, %edx
je 0xd6e7
movb $0x7, %al
cmpl $0x61, %edx
je 0xd6e7
jmp 0xd6fb
cmpl $0x9, %esi
je 0xd6f0
cmpl $0xa, %esi
je 0xd6ea
movb $0x1, %cl
jmp 0xd6ea
leal -0x6e(%rdx), %eax
cmpl $0x8, %eax
ja 0xd6c7
leaq 0x1da2(%rip), %rdx      # 0xf450
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movb $0xa, %al
jmp 0xd6e7
cmpl $0x22, %edx
je 0xd6e7
cmpl $0x27, %edx
je 0xd6e7
jmp 0xd6fb
cmpl $0x66, %edx
je 0xd6e5
cmpl $0x62, %edx
jne 0xd6fb
movb $0x8, %al
jmp 0xd6e7
xorl %eax, %eax
jmp 0xd6e7
movb $0xd, %al
jmp 0xd6e7
movb $0x9, %al
jmp 0xd6e7
movb $0xb, %al
jmp 0xd6e7
movb $0xc, %al
movq %rsi, %rdx
movb %cl, 0x5ad0(%rip)       # 0x131c0
incq %rdx
movq %rdx, 0x5abe(%rip)      # 0x131b8
retq
pushq %rax
movq 0x5aad(%rip), %rdi      # 0x131b0
callq 0xcc36
movq 0x5aa9(%rip), %rax      # 0x131b8
movsbl (%rax), %esi
leaq 0x1f07(%rip), %rdi      # 0xf620
xorl %eax, %eax
callq 0xd930
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/token.c
// Function: ident
static Token* ident(char* start) {
  Token* t = new_token(TIDENT, start);
  StringBuilder* sb = new_sb();
  while (isalnum(*cur) || *cur == '_') {
    sb_putc(sb, *cur);
    consume();
  }
  t->ident = sb_run(sb);
  return t;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x38, %esi
callq 0x20f0
movq %rax, %rbx
movl $0x2, 0x8(%rax)
movq 0x5a68(%rip), %rax      # 0x131b0
movq %rax, 0x20(%rbx)
movq %r14, 0x28(%rbx)
movb 0x5a6a(%rip), %al       # 0x131c0
xorb $0x1, %al
movb %al, 0x30(%rbx)
callq 0xd9db
movq %rax, %r14
callq 0x2190
movq %rax, %r15
movq 0x5a46(%rip), %rax      # 0x131b8
movsbq (%rax), %rax
cmpq $0x5f, %rax
je 0xd788
movq (%r15), %rcx
movzwl (%rcx,%rax,2), %ecx
andl $0x8, %ecx
je 0xd7d4
movsbl %al, %esi
movq %r14, %rdi
callq 0xda0d
movq 0x5a1e(%rip), %rax      # 0x131b8
movzbl (%rax), %edx
xorl %ecx, %ecx
cmpl $0xc, %edx
jg 0xd7b0
cmpl $0x9, %edx
je 0xd7c2
cmpl $0xa, %edx
je 0xd7bc
jmp 0xd7ba
cmpl $0xd, %edx
je 0xd7bc
cmpl $0x20, %edx
je 0xd7c2
movb $0x1, %cl
movb %cl, 0x59fe(%rip)       # 0x131c0
leaq 0x1(%rax), %rcx
movq %rcx, 0x59eb(%rip)      # 0x131b8
movsbq 0x1(%rax), %rax
jmp 0xd776
movq %r14, %rdi
callq 0xda87
movq %rax, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/utils.c
// Function: error
void error(const char *fmt, ...) {
#endif
  va_list ap;
  va_start(ap, fmt);
  vfprintf(stderr, fmt, ap);
  va_end(ap);
  exit(1);
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0xd98e
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %rdi, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x5643(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movq %r10, %rsi
callq 0x2170
movl $0x1, %edi
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/utils.c
// Function: new_sb
StringBuilder* new_sb(void) {
  StringBuilder* sb = calloc(1, sizeof(StringBuilder));
  sb->buf = calloc(8, sizeof(char));
  sb->capacity = 8;
  sb->length = 0;
  return sb;
}

// Assembly:
pushq %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x20f0
movq %rax, %rbx
movl $0x8, %edi
movl $0x1, %esi
callq 0x20f0
movq %rax, (%rbx)
movq $0x8, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/utils.c
// Function: sb_putc
void sb_putc(StringBuilder* sb, char c) {
  while (sb->length >= sb->capacity) {
    sb->capacity += 8;
    sb->buf = realloc(sb->buf, sizeof(char) * sb->capacity);
  }
  sb->buf[sb->length] = c;
  sb->length++;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x10(%rdi), %rcx
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
cmpq %rsi, %rcx
jb 0xda42
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
movq %rax, %rdi
callq 0x2140
movq %rax, (%rbx)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rcx
jmp 0xda20
movb %bpl, (%rax,%rcx)
incq 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/utils.c
// Function: sb_run
char* sb_run(StringBuilder* sb) {
  sb_putc(sb, '\0');
  char* ret = sb->buf;
  sb_destory(sb);
  return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0xda0d
movq (%rbx), %r14
movq %rbx, %rdi
callq 0x2030
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/utils.c
// Function: dump_token
void dump_token(Token* tok) {
  switch (tok->tag) {
  case TINT: {
    eprintf("%d", tok->integer);
    break;
  }
  case TSTRING: {
    eprintf("\"%s\"", tok->str);
    break;
  }
  case TIDENT: {
    eprintf("%s", tok->ident);
    break;
  }
  case TRESERVED: {
    eprintf("_%s_", tok->ident);
    break;
  }
  case TDIRECTIVE: {
    eprintf("#%s", tok->ident);
    break;
  }
  }
  if (tok->next != NULL) {
    eprintf(" ");
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpq $0x4, %rax
jbe 0xdae2
cmpq $0x0, (%rbx)
jne 0xdb05
popq %rbx
retq
leaq 0x1b57(%rip), %rcx      # 0xf640
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0xc(%rbx), %esi
leaq 0xee1(%rip), %rdi       # 0xe9dd
xorl %eax, %eax
callq 0x21b0
jmp 0xdada
leaq 0x741(%rip), %rdi       # 0xe24d
xorl %eax, %eax
popq %rbx
jmp 0x21b0
movq 0x10(%rbx), %rsi
leaq 0x1bfb(%rip), %rdi      # 0xf71a
jmp 0xdb46
movq 0x10(%rbx), %rsi
leaq 0x1516(%rip), %rdi      # 0xf042
jmp 0xdb46
movq 0x10(%rbx), %rsi
leaq 0x1bdc(%rip), %rdi      # 0xf715
jmp 0xdb46
movq 0x18(%rbx), %rsi
leaq 0x1bca(%rip), %rdi      # 0xf710
xorl %eax, %eax
callq 0x21b0
jmp 0xdada
// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/utils.c
// Function: show_type_
static void show_type_(StringBuilder* sb, Type* ty) {
  if (ty == NULL) {
    sb_puts(sb, "NULL");
    return;
  }

  switch (ty->ty) {
  case TY_VOID:
    sb_puts(sb, "void");
    break;
  case TY_CHAR:
    sb_puts(sb, "char");
    break;
  case TY_INT:
    sb_puts(sb, "int");
    break;
  case TY_LONG:
    sb_puts(sb, "long");
    break;
  case TY_PTR:
    if (ty->array_size) {
      sb_puts(sb, "array(");
      show_type_(sb, ty->ptr_to);
      sb_puts(sb, format(", %zu)", ty->array_size));
    } else {
      sb_puts(sb, "ptr(");
      show_type_(sb, ty->ptr_to);
      sb_puts(sb, ")");
    }
    break;
  case TY_STRUCT: {
    if (ty->tag) {
      sb_puts(sb, format("struct %s", ty->tag));
    } else {
      sb_puts(sb, "struct");
    }

    // 以下のコードは無限ループを引き起こす
    /* sb_puts(sb, format("struct %s {", ty->tag)); */
    /* for (Field* f = ty->fields; f != NULL; f = f->next) { */
    /*   sb_puts(sb, format("%s(+%zu) : ", f->name, f->offset)); */
    /*   show_type_(sb, f->type, ty->tag); */
    /*   sb_puts(sb, ","); */
    /* } */
    /* sb_puts(sb, "}"); */
    break;
  }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0xdbe1
movq %rsi, %r14
movl (%rsi), %eax
cmpq $0x5, %rax
ja 0xdc60
leaq 0x1a85(%rip), %rcx      # 0xf654
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x15f7(%rip), %rsi      # 0xf1d6
jmp 0xdbe8
leaq 0x1c30(%rip), %rsi      # 0xf818
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xda51
cmpq $0x0, 0x20(%r14)
je 0xdc68
leaq 0x1c18(%rip), %rsi      # 0xf81d
movq %rbx, %rdi
callq 0xda51
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xdbad
movq 0x20(%r14), %rsi
leaq 0x1c00(%rip), %rdi      # 0xf824
jmp 0xdc51
leaq 0x15b3(%rip), %rsi      # 0xf1e0
jmp 0xdbe8
leaq 0x15ae(%rip), %rsi      # 0xf1e4
jmp 0xdbe8
leaq 0x159c(%rip), %rsi      # 0xf1db
jmp 0xdbe8
movq 0x28(%r14), %rsi
testq %rsi, %rsi
je 0xdc8f
leaq 0x1bdf(%rip), %rdi      # 0xf830
xorl %eax, %eax
callq 0xd86a
movq %rbx, %rdi
movq %rax, %rsi
jmp 0xdbeb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1bbc(%rip), %rsi      # 0xf82b
movq %rbx, %rdi
callq 0xda51
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xdbad
leaq 0x1642(%rip), %rsi      # 0xf2cc
jmp 0xdbe8
leaq 0x157d(%rip), %rsi      # 0xf213
jmp 0xdbe8
// File: /workspace/github_c_makefile_star2_O3/codeplea[P]tinyexpr/smoke.c
// Function: test_syntax
void test_syntax() {
    test_case errors[] = {
        {"", 1},
        {"1+", 2},
        {"1)", 2},
        {"(1", 2},
        {"1**1", 3},
        {"1*2(+4", 4},
        {"1*2(1+4", 4},
        {"a+5", 1},
        {"!+5", 1},
        {"_a+5", 1},
        {"#a+5", 1},
        {"1^^5", 3},
        {"1**5", 3},
        {"sin(cos5", 8},
    };


    int i;
    for (i = 0; i < sizeof(errors) / sizeof(test_case); ++i) {
        const char *expr = errors[i].expr;
        const int e = errors[i].answer;

        int err;
        const double r = te_interp(expr, &err);
        lequal(err, e);
        lok(r != r);

        te_expr *n = te_compile(expr, 0, 0, &err);
        lequal(err, e);
        lok(!n);

        if (err != e) {
            printf("FAILED: %s\n", expr);
        }

        const double k = te_interp(expr, 0);
        lok(k != k);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0x8, %ebx
leaq 0xc(%rsp), %r13
leaq 0x4fc0(%rip), %r15      # 0x83bb
leaq 0x810e(%rip), %rax      # 0xb510
movq -0x8(%rbx,%rax), %rbp
cvttsd2si (%rbx,%rax), %r12d
movq %rbp, %rdi
movq %r13, %rsi
callq 0x6e05
movl 0x8cde(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x8cd6(%rip)      # 0xc0fc
movl 0xc(%rsp), %ecx
cmpl %r12d, %ecx
je 0x3460
incl 0x8ccb(%rip)            # 0xc100
leaq 0x4fe5(%rip), %rdi      # 0x8421
movq %r15, %rsi
movl $0xc1, %edx
movl %r12d, %r8d
xorl %eax, %eax
movsd %xmm0, 0x10(%rsp)
callq 0x3090
movsd 0x10(%rsp), %xmm0
movl 0x8c9c(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x8c94(%rip)      # 0xc0fc
ucomisd %xmm0, %xmm0
jp 0x348a
incl 0x8c8c(%rip)            # 0xc100
leaq 0x4f32(%rip), %rdi      # 0x83ad
movq %r15, %rsi
movl $0xc2, %edx
xorl %eax, %eax
callq 0x3090
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r13, %r14
movq %r13, %rcx
callq 0x6c46
movq %rax, %r13
movl 0x8c57(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x8c4f(%rip)      # 0xc0fc
movl 0xc(%rsp), %ecx
cmpl %r12d, %ecx
je 0x34db
incl 0x8c44(%rip)            # 0xc100
leaq 0x4f5e(%rip), %rdi      # 0x8421
movq %r15, %rsi
movl $0xc5, %edx
movl %r12d, %r8d
xorl %eax, %eax
callq 0x3090
movl 0x8c21(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x8c19(%rip)      # 0xc0fc
testq %r13, %r13
je 0x3504
incl 0x8c12(%rip)            # 0xc100
leaq 0x4eb8(%rip), %rdi      # 0x83ad
movq %r15, %rsi
movl $0xc6, %edx
xorl %eax, %eax
callq 0x3090
cmpl %r12d, 0xc(%rsp)
movq %r14, %r13
je 0x351f
leaq 0x4f1e(%rip), %rdi      # 0x8433
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3090
movq %rbp, %rdi
xorl %esi, %esi
callq 0x6e05
incl 0x8bcd(%rip)            # 0xc0fc
ucomisd %xmm0, %xmm0
jp 0x3551
incl 0x8bc5(%rip)            # 0xc100
leaq 0x4e6b(%rip), %rdi      # 0x83ad
movq %r15, %rsi
movl $0xcd, %edx
xorl %eax, %eax
callq 0x3090
addq $0x10, %rbx
cmpq $0xe8, %rbx
jne 0x33fb
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/codeplea[P]tinyexpr/smoke.c
// Function: test_nans
void test_nans() {

    const char *nans[] = {
        "0/0",
        "1%0",
        "1%(1%0)",
        "(1%0)%1",
        "fac(-1)",
        "ncr(2, 4)",
        "ncr(-2, 4)",
        "ncr(2, -4)",
        "npr(2, 4)",
        "npr(-2, 4)",
        "npr(2, -4)",
    };

    int i;
    for (i = 0; i < sizeof(nans) / sizeof(const char *); ++i) {
        const char *expr = nans[i];

        int err;
        const double r = te_interp(expr, &err);
        lequal(err, 0);
        lok(r != r);

        te_expr *n = te_compile(expr, 0, 0, &err);
        lok(n);
        lequal(err, 0);
        const double c = te_eval(n);
        lok(c != c);
        te_free(n);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0xc(%rsp), %rbx
leaq 0x4e22(%rip), %r14      # 0x83ad
leaq 0x4e29(%rip), %r15      # 0x83bb
leaq 0x4e88(%rip), %r12      # 0x8421
xorl %ebp, %ebp
leaq 0x804e(%rip), %rax      # 0xb5f0
movq (%rbp,%rax), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x6e05
movl 0x8b44(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x8b3c(%rip)      # 0xc0fc
movl 0xc(%rsp), %ecx
testl %ecx, %ecx
je 0x35f5
incl 0x8b32(%rip)            # 0xc100
movq %r12, %rdi
movq %r15, %rsi
movl $0xe8, %edx
xorl %r8d, %r8d
xorl %eax, %eax
movsd %xmm0, 0x10(%rsp)
callq 0x3090
movsd 0x10(%rsp), %xmm0
movl 0x8b07(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x8aff(%rip)      # 0xc0fc
ucomisd %xmm0, %xmm0
jp 0x361b
incl 0x8af7(%rip)            # 0xc100
movq %r14, %rdi
movq %r15, %rsi
movl $0xe9, %edx
xorl %eax, %eax
callq 0x3090
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x6c46
movq %rax, %r13
movl 0x8ac9(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x8ac1(%rip)      # 0xc0fc
testq %r13, %r13
jne 0x365e
incl 0x8aba(%rip)            # 0xc100
movq %r14, %rdi
movq %r15, %rsi
movl $0xec, %edx
xorl %eax, %eax
callq 0x3090
movl 0x8a9e(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x8a96(%rip)      # 0xc0fc
movl 0xc(%rsp), %ecx
testl %ecx, %ecx
je 0x3689
incl 0x8a8c(%rip)            # 0xc100
movq %r12, %rdi
movq %r15, %rsi
movl $0xed, %edx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x3090
movq %r13, %rdi
callq 0x664d
incl 0x8a65(%rip)            # 0xc0fc
ucomisd %xmm0, %xmm0
jp 0x36b5
incl 0x8a5d(%rip)            # 0xc100
movq %r14, %rdi
movq %r15, %rsi
movl $0xef, %edx
xorl %eax, %eax
callq 0x3090
movq %r13, %rdi
callq 0x632f
addq $0x8, %rbp
cmpq $0x58, %rbp
jne 0x359b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/codeplea[P]tinyexpr/smoke.c
// Function: test_infs
void test_infs() {

    const char *infs[] = {
            "1/0",
            "log(0)",
            "pow(2,10000000)",
            "fac(300)",
            "ncr(300,100)",
            "ncr(300000,100)",
            "ncr(300000,100)*8",
            "npr(3,2)*ncr(300000,100)",
            "npr(100,90)",
            "npr(30,25)",
    };

    int i;
    for (i = 0; i < sizeof(infs) / sizeof(const char *); ++i) {
        const char *expr = infs[i];

        int err;
        const double r = te_interp(expr, &err);
        lequal(err, 0);
        lok(r == r + 1);

        te_expr *n = te_compile(expr, 0, 0, &err);
        lok(n);
        lequal(err, 0);
        const double c = te_eval(n);
        lok(c == c + 1);
        te_free(n);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0xc(%rsp), %rbx
leaq 0x4cb9(%rip), %r14      # 0x83ad
leaq 0x4cc0(%rip), %r15      # 0x83bb
leaq 0x4d1f(%rip), %r12      # 0x8421
xorl %ebp, %ebp
leaq 0x7f45(%rip), %rax      # 0xb650
movq (%rbp,%rax), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x6e05
movl 0x89db(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x89d3(%rip)      # 0xc0fc
movl 0xc(%rsp), %ecx
testl %ecx, %ecx
je 0x375e
incl 0x89c9(%rip)            # 0xc100
movq %r12, %rdi
movq %r15, %rsi
movl $0x10a, %edx            # imm = 0x10A
xorl %r8d, %r8d
xorl %eax, %eax
movsd %xmm0, 0x10(%rsp)
callq 0x3090
movsd 0x10(%rsp), %xmm0
movl 0x899e(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x8996(%rip)      # 0xc0fc
movapd %xmm0, %xmm1
addsd 0x48d6(%rip), %xmm1     # 0x8048
ucomisd %xmm1, %xmm0
jne 0x377a
jnp 0x3792
incl 0x8980(%rip)            # 0xc100
movq %r14, %rdi
movq %r15, %rsi
movl $0x10b, %edx            # imm = 0x10B
xorl %eax, %eax
callq 0x3090
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x6c46
movq %rax, %r13
movl 0x8952(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x894a(%rip)      # 0xc0fc
testq %r13, %r13
jne 0x37d5
incl 0x8943(%rip)            # 0xc100
movq %r14, %rdi
movq %r15, %rsi
movl $0x10e, %edx            # imm = 0x10E
xorl %eax, %eax
callq 0x3090
movl 0x8927(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x891f(%rip)      # 0xc0fc
movl 0xc(%rsp), %ecx
testl %ecx, %ecx
je 0x3800
incl 0x8915(%rip)            # 0xc100
movq %r12, %rdi
movq %r15, %rsi
movl $0x10f, %edx            # imm = 0x10F
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x3090
movq %r13, %rdi
callq 0x664d
incl 0x88ee(%rip)            # 0xc0fc
movapd %xmm0, %xmm1
addsd 0x482e(%rip), %xmm1     # 0x8048
ucomisd %xmm1, %xmm0
jne 0x3822
jnp 0x383a
incl 0x88d8(%rip)            # 0xc100
movq %r14, %rdi
movq %r15, %rsi
movl $0x111, %edx            # imm = 0x111
xorl %eax, %eax
callq 0x3090
movq %r13, %rdi
callq 0x632f
addq $0x8, %rbp
cmpq $0x50, %rbp
jne 0x3704
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/codeplea[P]tinyexpr/smoke.c
// Function: test_optimize
void test_optimize() {

    test_case cases[] = {
        {"5+5", 10},
        {"pow(2,2)", 4},
        {"sqrt 100", 10},
        {"pi * 2", 6.2832},
    };

    int i;
    for (i = 0; i < sizeof(cases) / sizeof(test_case); ++i) {
        const char *expr = cases[i].expr;
        const double answer = cases[i].answer;

        int err;
        te_expr *ex = te_compile(expr, 0, 0, &err);
        lok(ex);

        /* The answer should be know without
         * even running eval. */
        lfequal(ex->value, answer);
        lfequal(te_eval(ex), answer);

        te_free(ex);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x5fd5(%rip), %rbp      # 0xb870
leaq 0x14(%rsp), %rbx
leaq 0x2b14(%rip), %r15      # 0x83bb
leaq 0x2b15(%rip), %r12      # 0x83c3
xorl %r14d, %r14d
movq (%r14,%rbp), %rdi
movsd 0x8(%r14,%rbp), %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x6c46
movq %rax, %r13
movl 0x6825(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x681d(%rip)      # 0xc0fc
testq %r13, %r13
jne 0x5906
incl 0x6816(%rip)            # 0xc100
leaq 0x2abc(%rip), %rdi      # 0x83ad
movq %r15, %rsi
movl $0x234, %edx            # imm = 0x234
xorl %eax, %eax
callq 0x3090
movl 0x67f6(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x67ee(%rip)      # 0xc0fc
movsd 0x8(%r13), %xmm0
movapd %xmm0, %xmm1
subsd 0x8(%rsp), %xmm1
movapd %xmm1, %xmm2
andpd 0x26e6(%rip), %xmm2     # 0x8010
ucomisd 0x270e(%rip), %xmm2     # 0x8040
ja 0x593a
ucomisd %xmm1, %xmm1
jnp 0x595e
incl 0x67c0(%rip)            # 0xc100
movq %r12, %rdi
movq %r15, %rsi
movl $0x238, %edx            # imm = 0x238
movsd 0x8(%rsp), %xmm1
movb $0x2, %al
callq 0x3090
movl 0x679e(%rip), %eax      # 0xc0fc
incl %eax
movl %eax, 0x6796(%rip)      # 0xc0fc
movq %r13, %rdi
callq 0x664d
movsd 0x8(%rsp), %xmm2
subsd %xmm2, %xmm0
movapd %xmm0, %xmm1
andpd 0x268c(%rip), %xmm1     # 0x8010
ucomisd 0x26b4(%rip), %xmm1     # 0x8040
ja 0x5994
ucomisd %xmm0, %xmm0
jnp 0x59ba
incl 0x6766(%rip)            # 0xc100
movq %r13, %rdi
callq 0x664d
movq %r12, %rdi
movq %r15, %rsi
movl $0x239, %edx            # imm = 0x239
movsd 0x8(%rsp), %xmm1
movb $0x2, %al
callq 0x3090
movq %r13, %rdi
callq 0x632f
addq $0x10, %r14
cmpq $0x40, %r14
jne 0x58b1
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq