LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: relational
static Node *relational() {
  Token *tk;
  Node *node = shift();

  for (;;) {
    if (tk = consume("<=")) {
      node = new_bin_node(ND_LTE, node, shift(), tk);
    } else if (tk = consume(">=")) {
      node = new_bin_node(ND_LTE, shift(), node, tk);
    } else if (tk = consume("<")) {
      node = new_bin_node(ND_LT, node, shift(), tk);
    } else if (tk = consume(">")) {
      node = new_bin_node(ND_LT, shift(), node, tk);
    } else {
      return node;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x6624
movq %rax, %r13
leaq 0x9f69(%rip), %r12      # 0x10480
leaq 0x645e(%rip), %rdi      # 0xc97c
callq 0x5244
testb %al, %al
je 0x6535
movq (%r12), %r14
movq 0x8(%r14), %rax
movq %rax, (%r12)
jmp 0x6538
xorl %r14d, %r14d
testq %r14, %r14
je 0x654f
movl $0xa, %ebx
callq 0x6624
movq %r13, %rbp
movq %rax, %r13
jmp 0x6582
leaq 0x642a(%rip), %rdi      # 0xc980
callq 0x5244
testb %al, %al
je 0x656d
movq (%r12), %r14
movq 0x8(%r14), %rax
movq %rax, (%r12)
jmp 0x6570
xorl %r14d, %r14d
testq %r14, %r14
je 0x65b2
movl $0xa, %ebx
callq 0x6624
movq %rax, %rbp
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r15
movl %ebx, (%rax)
movq %r14, 0x8(%rax)
movq %rbp, 0x18(%rax)
movq %r13, 0x20(%rax)
movq %rax, %rdi
callq 0xa308
movq %r15, %r13
jmp 0x6517
leaq 0x6303(%rip), %rdi      # 0xc8bc
callq 0x5244
testb %al, %al
je 0x65d0
movq (%r12), %r14
movq 0x8(%r14), %rax
movq %rax, (%r12)
jmp 0x65d3
xorl %r14d, %r14d
testq %r14, %r14
je 0x65e2
movl $0x9, %ebx
jmp 0x6542
leaq 0x634b(%rip), %rdi      # 0xc934
callq 0x5244
testb %al, %al
je 0x6600
movq (%r12), %r14
movq 0x8(%r14), %rax
movq %rax, (%r12)
jmp 0x6603
xorl %r14d, %r14d
testq %r14, %r14
je 0x6612
movl $0x9, %ebx
jmp 0x657a
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: shift
static Node *shift() {
  Token *tk;
  Node *node = add();
  for (;;) {
    if (tk = consume("<<")) {
      node = new_bin_node(ND_A_LSHIFT, node, add(), tk);
    } else if (tk = consume(">>")) {
      node = new_bin_node(ND_A_RSHIFT, node, add(), tk);
    } else {
      return node;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x66de
movq %rax, %r14
leaq 0x9e42(%rip), %rbp      # 0x10480
leaq 0x6276(%rip), %rdi      # 0xc8bb
callq 0x5244
testb %al, %al
je 0x665c
movq (%rbp), %r15
movq 0x8(%r15), %rax
movq %rax, (%rbp)
jmp 0x665f
xorl %r15d, %r15d
movl $0xf, %ebx
testq %r15, %r15
jne 0x6694
leaq 0x624e(%rip), %rdi      # 0xc8be
callq 0x5244
testb %al, %al
je 0x6687
movq (%rbp), %r15
movq 0x8(%r15), %rax
movq %rax, (%rbp)
jmp 0x668a
xorl %r15d, %r15d
movl $0x10, %ebx
testq %r15, %r15
je 0x66cc
callq 0x66de
movq %rax, %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r13
movl %ebx, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x18(%rax)
movq %r12, 0x20(%rax)
movq %rax, %rdi
callq 0xa308
movq %r13, %r14
jmp 0x663e
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: add
static Node *add() {
  Token *tk;
  Node *node = mul();

  for (;;) {
    if (tk = consume("+")) {
      node = new_add_node(node, mul(), tk);
    } else if (tk = consume("-")) {
      node = new_sub_node(node, mul(), tk);
    } else {
      return node;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
callq 0x691a
movq %rax, %r15
leaq 0x61f5(%rip), %rbx      # 0xc8eb
leaq 0x9d83(%rip), %r13      # 0x10480
leaq 0x6a95(%rip), %r14      # 0xd199
movq %rbx, %rdi
callq 0x5244
testb %al, %al
je 0x671f
movq (%r13), %r12
movq 0x8(%r12), %rax
movq %rax, (%r13)
jmp 0x6722
xorl %r12d, %r12d
testq %r12, %r12
je 0x673f
callq 0x691a
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x6787
movq %rax, %r15
jmp 0x6704
movq %r14, %rdi
callq 0x5244
testb %al, %al
je 0x675a
movq (%r13), %r12
movq 0x8(%r12), %rax
movq %rax, (%r13)
jmp 0x675d
xorl %r12d, %r12d
testq %r12, %r12
je 0x677a
callq 0x691a
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x685d
movq %rax, %r15
jmp 0x6704
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: new_add_node
static Node *new_add_node(Node *lhs, Node *rhs, Token *tk) {
  add_type(lhs);
  add_type(rhs);

  // int x
  // &x + 2
  // => & に intのサイズ(4) * 2 => xのアドレスの 8byte先
  //
  // int x
  // int *y = &x
  // int **z = &y
  // &z + 2
  // => & に intのポインタのサイズ(8) * 2 => zのアドレスの 16byte先
  if (is_integer(lhs->ty) && is_integer(rhs->ty)) {
    // num + num
    return new_bin_node(ND_ADD, lhs, rhs, tk);
  } else if (is_pointer(lhs->ty) && is_integer(rhs->ty)) {
    // ptr + num のケース
    return new_bin_node(ND_PTR_ADD, lhs, rhs, tk);
  } else if (is_integer(lhs->ty) && is_pointer(rhs->ty)){
    // num + ptrのケースなので、入れ替えてptr + num に正規化する
    return new_bin_node(ND_PTR_ADD, rhs, lhs, tk);
  }
  // ここに来た場合 ptr + ptr という不正なパターンになるので落とす
  error_at(token->str, "不正なaddパターンです。");
  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0xa308
movq %r15, %rdi
callq 0xa308
movq 0x10(%r14), %rdi
callq 0xa2f4
testb %al, %al
je 0x67c4
movq 0x10(%r15), %rdi
callq 0xa2f4
movl $0x1, %ebp
testb %al, %al
jne 0x67e3
movq 0x10(%r14), %rdi
callq 0xa2e8
testb %al, %al
je 0x67eb
movq 0x10(%r15), %rdi
callq 0xa2f4
movl $0x2, %ebp
testb %al, %al
je 0x67eb
movq %r14, %r12
movq %r15, %r14
jmp 0x680d
movq 0x10(%r14), %rdi
callq 0xa2f4
testb %al, %al
je 0x6841
movq 0x10(%r15), %rdi
callq 0xa2e8
movl $0x2, %ebp
movq %r15, %r12
testb %al, %al
je 0x6841
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r15
movl %ebp, (%rax)
movq %rbx, 0x8(%rax)
movq %r12, 0x18(%rax)
movq %r14, 0x20(%rax)
movq %rax, %rdi
callq 0xa308
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9c38(%rip), %rax      # 0x10480
movq (%rax), %rax
movq 0x18(%rax), %rdi
leaq 0x6285(%rip), %rsi      # 0xcadb
xorl %eax, %eax
callq 0x487c
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: new_sub_node
static Node *new_sub_node(Node *lhs, Node *rhs, Token *tk) {
  add_type(lhs);
  add_type(rhs);

  if (is_integer(lhs->ty) && is_integer(rhs->ty)) {
    // num - num
    return new_bin_node(ND_SUB, lhs, rhs, tk);
  } else if (is_pointer(lhs->ty) && is_pointer(rhs->ty)) {
    //  ptr - ptr
    return new_bin_node(ND_PTR_DIFF, lhs, rhs, tk);
  } else if (is_pointer(lhs->ty) && is_integer(rhs->ty)) {
    // ptr - num
    return new_bin_node(ND_PTR_SUB, lhs, rhs, tk);
  }
  // ここに来た場合 num - ptr になってしまうので、エラーにする
  error("不正な演算です: num - ptr");
  return NULL; // error で落ちるので実際にはreturnされない
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
callq 0xa308
movq %rbx, %rdi
callq 0xa308
movq 0x10(%r15), %rdi
callq 0xa2f4
testb %al, %al
je 0x689a
movq 0x10(%rbx), %rdi
callq 0xa2f4
movl $0x3, %ebp
testb %al, %al
jne 0x68d8
movq 0x10(%r15), %rdi
callq 0xa2e8
testb %al, %al
je 0x68b9
movq 0x10(%rbx), %rdi
callq 0xa2e8
movl $0x5, %ebp
testb %al, %al
jne 0x68d8
movq 0x10(%r15), %rdi
callq 0xa2e8
testb %al, %al
je 0x690c
movq 0x10(%rbx), %rdi
callq 0xa2f4
movl $0x4, %ebp
testb %al, %al
je 0x690c
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r12
movl %ebp, (%rax)
movq %r14, 0x8(%rax)
movq %r15, 0x18(%rax)
movq %rbx, 0x20(%rax)
movq %rax, %rdi
callq 0xa308
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x61ea(%rip), %rdi      # 0xcafd
xorl %eax, %eax
callq 0x4a3b
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: mul
static Node *mul() {
  Token *tk;
  Node *node = cast();

  for (;;) {
    if (tk = consume("*")) {
      node = new_bin_node(ND_MUL, node, cast(), tk);
    } else if (tk = consume("/")) {
      node = new_bin_node(ND_DIV, node, cast(), tk);
    } else if (tk = consume("%")) {
      node = new_bin_node(ND_MOD, node, cast(), tk);
    } else {
      return node;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x69ff
movq %rax, %r14
leaq 0x9b4c(%rip), %r12      # 0x10480
leaq 0x64ac(%rip), %rdi      # 0xcde7
callq 0x5244
testb %al, %al
je 0x6952
movq (%r12), %r15
movq 0x8(%r15), %rax
movq %rax, (%r12)
jmp 0x6955
xorl %r15d, %r15d
movl $0x6, %ebx
testq %r15, %r15
jne 0x69b5
leaq 0x6484(%rip), %rdi      # 0xcdea
callq 0x5244
testb %al, %al
je 0x697d
movq (%r12), %r15
movq 0x8(%r15), %rax
movq %rax, (%r12)
jmp 0x6980
xorl %r15d, %r15d
movl $0x7, %ebx
testq %r15, %r15
jne 0x69b5
leaq 0x5f30(%rip), %rdi      # 0xc8c1
callq 0x5244
testb %al, %al
je 0x69a8
movq (%r12), %r15
movq 0x8(%r15), %rax
movq %rax, (%r12)
jmp 0x69ab
xorl %r15d, %r15d
movl $0x8, %ebx
testq %r15, %r15
je 0x69ed
callq 0x69ff
movq %rax, %r13
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %rbp
movl %ebx, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x18(%rax)
movq %r13, 0x20(%rax)
movq %rax, %rdi
callq 0xa308
movq %rbp, %r14
jmp 0x6934
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: abstract_declarator
static Type *abstract_declarator(Type *ty) {
  while (consume("*")) {
    ty = pointer_to(ty);
  }
  if (consume("(")) {
    Type *placeholder = calloc(1, sizeof(Type));
    Type *new_ty = abstract_declarator(placeholder);
    expect(")");
    // 入れ子部分を全部パースした後に、その後に続く配列の [] などを含めた(type_suffix)型としてplaceholderを完成させる
    memcpy(placeholder, type_suffix(ty), sizeof(Type));
    return new_ty;
  }

  return type_suffix(ty);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x5f05(%rip), %rdi      # 0xcde7
callq 0x5244
testb %al, %al
je 0x6f1f
leaq 0x958e(%rip), %r15      # 0x10480
leaq 0x5eee(%rip), %r14      # 0xcde7
movq (%r15), %rax
movq 0x8(%rax), %rcx
movq %rcx, (%r15)
testq %rax, %rax
je 0x6f1f
movq %rbx, %rdi
callq 0xa1fc
movq %rax, %rbx
movq %r14, %rdi
callq 0x5244
testb %al, %al
jne 0x6ef9
leaq 0x5650(%rip), %rdi      # 0xc576
callq 0x5244
testb %al, %al
je 0x6f98
leaq 0x954a(%rip), %rax      # 0x10480
movq (%rax), %rcx
movq 0x8(%rcx), %rdx
movq %rdx, (%rax)
testq %rcx, %rcx
je 0x6f98
movl $0x1, %edi
movl $0x30, %esi
callq 0x2100
movq %rax, %r14
movq %rax, %rdi
callq 0x6ed3
movq %rax, %r15
leaq 0x5620(%rip), %rdi      # 0xc589
callq 0x5c3c
movq %rbx, %rdi
callq 0x6fa2
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm0, (%r14)
movups %xmm1, 0x10(%r14)
movups %xmm2, 0x20(%r14)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x6fa2
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: type_suffix
static Type *type_suffix(Type *base) {
  if (!consume("[")) {
    return base;
  }

  int array_size = 0;
  int is_incomplete = true;
  if (!consume("]")) {
    //[の直後に"]"が来ていない場合、配列のサイズがあるはずなので、完全な方としてis_incompleteをfalseに
    is_incomplete = false;
    array_size = const_expr();
    expect("]");
  }

  Token *tk = token;
  base = type_suffix(base);
  // 不完全型許されるのは最初の配列の最初の次元のみなので、再帰で呼ばれた結果(=2次元以降)に関しては必ず完全になっていること
  if (base->is_incomplete) {
    error_at(tk->str, "incomplete element type(type_suffix)");
  }
  base = array_of(base, array_size);
  base->is_incomplete = is_incomplete;

  return base;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5910(%rip), %rdi      # 0xc8c3
callq 0x5244
testb %al, %al
je 0x7045
leaq 0x94b9(%rip), %r15      # 0x10480
movq (%r15), %rax
movq 0x8(%rax), %rcx
movq %rcx, (%r15)
testq %rax, %rax
je 0x7045
leaq 0x47e1(%rip), %rdi      # 0xb7be
callq 0x5244
xorl %r14d, %r14d
movl $0x0, %ebp
testb %al, %al
je 0x6fff
movq (%r15), %rax
movq 0x8(%rax), %rcx
movq %rcx, (%r15)
testq %rax, %rax
setne %bpl
testb %bpl, %bpl
jne 0x7022
callq 0x60d0
movq %rax, %rdi
xorl %esi, %esi
callq 0x5d39
movq %rax, %r14
leaq 0x47a1(%rip), %rdi      # 0xb7be
callq 0x5c3c
movq (%r15), %r15
movq %rbx, %rdi
callq 0x6fa2
cmpb $0x1, 0xc(%rax)
je 0x7053
movq %rax, %rdi
movl %r14d, %esi
callq 0xa229
movq %rax, %rbx
movb %bpl, 0xc(%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%r15), %rdi
leaq 0x5867(%rip), %rsi      # 0xc8c5
xorl %eax, %eax
callq 0x487c
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: struct_ref
static Node *struct_ref(Node *lhs) {
  add_type(lhs);

  if (lhs->ty->kind != TY_STRUCT) {
    fprintf(stderr, "type_info: %s\n", type_info(lhs->ty));
    error_at(token->str, "not a struct(lhs->ty->kind: %d", lhs->ty->kind);
  }

  Token *tok = token;
  Member *m = find_member(lhs->ty, expect_ident());
  if (!m) {
    error_at(tok->str, "no such member");
  }

  Node *n = new_unary_node(ND_MEMBER, lhs, tok);
  n->member = m;

  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xa308
leaq 0x10(%rbx), %rsi
movq 0x10(%rbx), %rdi
cmpl $0x9, (%rdi)
jne 0x7800
leaq 0x8cfa(%rip), %rax      # 0x10480
movq (%rax), %r15
movq (%rsi), %r12
callq 0x5cc0
cmpl $0x9, (%r12)
jne 0x7805
movq %rax, %r14
addq $0x20, %r12
movq (%r12), %r12
testq %r12, %r12
je 0x77ee
movq 0x10(%r12), %rdi
movq %r14, %rsi
callq 0x2110
testl %eax, %eax
jne 0x779f
testq %r12, %r12
je 0x77ee
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movl $0x23, (%rax)
movq %r15, 0x8(%rax)
movq %rbx, 0x18(%rax)
movq %r12, 0x98(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x18(%r15), %rdi
leaq 0x5297(%rip), %rsi      # 0xca90
xorl %eax, %eax
callq 0x487c
callq 0x225f
leaq 0x5293(%rip), %rdi      # 0xca9f
leaq 0x4e56(%rip), %rsi      # 0xc669
leaq 0x529d(%rip), %rcx      # 0xcab7
movl $0x950, %edx            # imm = 0x950
callq 0x20d0
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: local_var_initializer
static Node *local_var_initializer(Var *var, Token *tk) {
  Node head = {};
  local_var_initializer_sub(&head, var, var->type, NULL);

  Node *node = new_node(ND_BLOCK, tk);
  node->body = head.next;

  return node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movl $0xc8, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x20e0
movq (%r14), %rdx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x81b1
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movl $0x1a, (%rax)
movq %rbx, 0x8(%rax)
movq 0x30(%r15), %rcx
movq %rcx, 0x28(%rax)
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: new_var
static Var *new_var(char *name, Type *type, bool is_local) {
  Var *var = calloc(1, sizeof(Var));
  var->type = type;
  var->name = name;
  var->is_local = is_local;

  // 今のscopeにこの変数を追加
  push_var_scope(name, var);

  return var;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x28, %esi
callq 0x2100
movq %rax, %r12
movq %r14, (%rax)
movq %r15, 0x8(%rax)
movb %bl, 0x14(%rax)
movl $0x1, %edi
movl $0x30, %esi
callq 0x2100
movq %r15, 0x8(%rax)
movq 0x8b72(%rip), %rcx      # 0x10440
movq %rcx, (%rax)
movl 0x8b59(%rip), %ecx      # 0x10430
movl %ecx, 0x2c(%rax)
movq %rax, 0x8b5f(%rip)      # 0x10440
movq %r12, 0x10(%rax)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: new_label
static char *new_label() {
  static int label_index = 0;
  char buf[100];
  int n = sprintf(buf, ".L.data.%03d", label_index++);
  return my_strndup(buf, n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movl 0x8b45(%rip), %edx      # 0x10448
leal 0x1(%rdx), %eax
movl %eax, 0x8b3c(%rip)      # 0x10448
leaq 0x5023(%rip), %rsi      # 0xc936
xorl %ebx, %ebx
movq %rsp, %rdi
xorl %eax, %eax
callq 0x21c0
movl %eax, %r15d
leal 0x1(%r15), %eax
movslq %eax, %rdi
movl $0x1, %esi
callq 0x2100
movq %rax, %r14
testl %r15d, %r15d
jle 0x794c
movl %r15d, %ebx
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2150
movb $0x0, (%r14,%rbx)
movq %r14, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: skip_excess_elements2
static void skip_excess_elements2() {
  for (;;) {
    if (consume("{")) {
      skip_excess_elements2();
    } else {
      // brace以外の場合は何か式があるはずなので読み飛ばす
      assign();
    }
    if (consume_end()) {
      return;
    }
    expect(",");
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x44ff(%rip), %rbx      # 0xc316
leaq 0x8662(%rip), %r15      # 0x10480
leaq 0x4842(%rip), %r14      # 0xc667
movq %rbx, %rdi
callq 0x5244
testb %al, %al
je 0x7e47
movq (%r15), %rax
movq 0x8(%rax), %rcx
movq %rcx, (%r15)
testq %rax, %rax
je 0x7e47
callq 0x7e0b
jmp 0x7e4c
callq 0x7e65
callq 0x4b2b
testb %al, %al
jne 0x7e5f
movq %r14, %rdi
callq 0x5c3c
jmp 0x7e25
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: lvar_init_zero
static Node *lvar_init_zero(Node *cur, Var *var, Type *ty, Designator *dseg) {
  if (ty->kind == TY_ARRAY) {
    // 配列の場合は各要素も再帰的に0にする
    for (int i = 0; i < ty->array_size; i++) {
      Designator desg2 = {dseg, i};
      cur = lvar_init_zero(cur, var, ty->ptr_to, &desg2);
    }
    return cur;
  }
  // 配列でない場合は、単純にその変数(入れ子の配列の場合はどこかの末端の要素)に0を代入するコードをnextにつなげていく
  cur->next = new_desg_node(var, dseg, new_num_node(0, token));
  return cur->next;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x8, (%rdx)
jne 0x86e3
movq %rdx, %r12
cmpq $0x0, 0x18(%rdx)
jle 0x8726
xorl %ebp, %ebp
movq %rsp, %r13
movq %r14, (%rsp)
movl %ebp, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x10(%r12), %rdx
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rcx
callq 0x8685
movq %rax, %rbx
incq %rbp
cmpq %rbp, 0x18(%r12)
jg 0x86b0
jmp 0x8726
leaq 0x7d96(%rip), %rax      # 0x10480
movq (%rax), %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movl $0x22, (%rax)
movq %r12, 0x8(%rax)
movq $0x0, 0x80(%rax)
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x8611
movq %rax, 0x30(%rbx)
movq %rax, %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: new_desg_node_sub
static Node *new_desg_node_sub(Var *var, Designator *desg, Token *tk) {
  if (!desg) {
    return new_var_node(var, tk);
  }
  Node *node = new_desg_node_sub(var, desg->next, tk);
  if (desg->mem) {
    // dsegが構造体のメンバー参照なら、返ってきたnodeを構造体の変数とみなしてそのメンバー参照のastを作成
    node = new_unary_node(ND_MEMBER, node, tk);
    node->member = desg->mem;

    return node;
  }

  node = new_add_node(node, new_num_node(desg->idx, tk), tk);

  node = new_unary_node(ND_DEREF, node, tk);
  add_type(node);

  return node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r15
testq %rsi, %rsi
je 0x8791
movq %rsi, %r14
movq (%rsi), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x8738
movq %rax, %r15
movq 0x10(%r14), %r12
testq %r12, %r12
je 0x87b3
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r14
movl $0x23, (%rax)
movq %rbx, 0x8(%rax)
movq %r15, 0x18(%rax)
movq %r12, 0x98(%rax)
jmp 0x8810
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r14
movl $0x17, (%rax)
movq %rbx, 0x8(%rax)
movq %r15, 0x78(%rax)
jmp 0x8808
movslq 0x8(%r14), %r14
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movl $0x22, (%rax)
movq %rbx, 0x8(%rax)
movq %r14, 0x80(%rax)
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x6787
movq %rax, %r15
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r14
movl $0x1f, (%rax)
movq %rbx, 0x8(%rax)
movq %r15, 0x18(%rax)
movq %rax, %rdi
callq 0xa308
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: find_var
static VarScope *find_var(Token *token) {
  for (VarScope *sc = var_scope; sc; sc = sc->next) {
    if (sc->type_def) {
      // typedef は変数じゃないので無視
      continue;
    }

    if (strlen(sc->name) == token->len &&
        strncmp(sc->name, token->str, token->len) == 0) {
      return sc;
    }
  }
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x7c15(%rip), %rbx      # 0x10440
testq %rbx, %rbx
je 0x8867
movq %rdi, %r14
cmpq $0x0, 0x18(%rbx)
jne 0x885f
movq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x20b0
movslq 0x20(%r14), %rdx
cmpq %rdx, %rax
jne 0x885f
movq 0x18(%r14), %rsi
movq %r15, %rdi
callq 0x2060
testl %eax, %eax
je 0x8867
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x8833
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: expr
static Node *expr() {
  Token *tk;
  Node *node = assign();

  while (tk = consume(",")) {
    // カンマがある場合、最後の式の値だけスタックに積みたいので、
    // カンマより左にある式の結果は全部式文(ND_EXPR_STMT)にして計算だけして結果は捨てる
    node = new_unary_node(ND_EXPR_STMT, node, node->tok);
    node = new_bin_node(ND_COMMA, node, assign(), tk);
  }

  return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x7e65
movq %rax, %r14
leaq 0x3ddd(%rip), %rbx      # 0xc667
leaq 0x7bef(%rip), %r13      # 0x10480
movq %rbx, %rdi
callq 0x5244
testb %al, %al
je 0x88ab
movq (%r13), %rbp
movq 0x8(%rbp), %rax
movq %rax, (%r13)
jmp 0x88ad
xorl %ebp, %ebp
testq %rbp, %rbp
je 0x890c
movq 0x8(%r14), %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r15
movl $0x21, (%rax)
movq %r12, 0x8(%rax)
movq %r14, 0x18(%rax)
callq 0x7e65
movq %rax, %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r14
movl $0x25, (%rax)
movq %rbp, 0x8(%rax)
movq %r15, 0x18(%rax)
movq %r12, 0x20(%rax)
movq %rax, %rdi
callq 0xa308
jmp 0x8891
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: enter_scope
static Scope *enter_scope(void) {
  Scope *new_scope = calloc(1, sizeof(Scope));

  new_scope->var_scope = var_scope;
  new_scope->tag_scope = tag_scope;
  scope_depth++;

  return new_scope;
}

// Assembly:
pushq %rax
movl $0x1, %edi
movl $0x10, %esi
callq 0x2100
movq 0x7b0b(%rip), %rcx      # 0x10440
movq %rcx, (%rax)
movq 0x7af9(%rip), %rcx      # 0x10438
movq %rcx, 0x8(%rax)
incl 0x7ae7(%rip)            # 0x10430
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/parser.c
// Function: read_expr_stmt
static Node *read_expr_stmt() {
  Node *node = new_node(ND_EXPR_STMT, token);
  node->kind = ND_EXPR_STMT;
  node->lhs = expr();
  return node;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x6dcd(%rip), %rax      # 0x10480
movq (%rax), %r14
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %rbx
movl $0x21, (%rax)
movq %r14, 0x8(%rax)
callq 0x8870
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/string_buffer.c
// Function: sb_init
string_buffer *sb_init() {
  string_buffer *sb = calloc(1, sizeof(string_buffer));

  sb->str_len = 0;
  sb->buf_len = 16;
  sb->buf = calloc(sb->buf_len, sizeof(char));

  return sb;
}

// Assembly:
pushq %rbx
movl $0x1, %edi
movl $0x10, %esi
callq 0x2100
movq %rax, %rbx
movabsq $0x1000000000, %rax     # imm = 0x1000000000
movq %rax, 0x8(%rbx)
movl $0x10, %edi
movl $0x1, %esi
callq 0x2100
movq %rax, (%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/test_func.c
// Function: add_all1
int add_all1(int x, ...) {
  va_list ap;
  va_start(ap, x);

  for (;;) {
    int y = va_arg(ap, int);
    if (y == 0)
      return x;
    x += y;
  }
}

// Assembly:
subq $0x58, %rsp
leaq -0x60(%rsp), %r10
movq %rsi, 0x8(%r10)
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x9846
movaps %xmm0, -0x30(%rsp)
movaps %xmm1, -0x20(%rsp)
movaps %xmm2, -0x10(%rsp)
movaps %xmm3, (%rsp)
movaps %xmm4, 0x10(%rsp)
movaps %xmm5, 0x20(%rsp)
movaps %xmm6, 0x30(%rsp)
movaps %xmm7, 0x40(%rsp)
movq %r10, -0x70(%rsp)
leaq 0x60(%rsp), %rdx
movq %rdx, -0x78(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, -0x80(%rsp)
movl $0x8, %ecx
cmpl $0x28, %ecx
ja 0x987f
movq %rdx, %rsi
movl %ecx, %edx
addq %r10, %rdx
addl $0x8, %ecx
movl %ecx, -0x80(%rsp)
jmp 0x9888
leaq 0x8(%rdx), %rsi
movq %rsi, -0x78(%rsp)
movl (%rdx), %r8d
movq %rsi, %rdx
testl %r8d, %r8d
cmovel %edi, %eax
leal (%r8,%rdi), %esi
movl %esi, %edi
jne 0x9869
addq $0x58, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/test_func.c
// Function: add_all2
int add_all2(int x, int y, ...) {
  va_list ap;
  va_start(ap, y);
  x = x + y;

  for (;;) {
    int y = va_arg(ap, int);
    if (y == 0)
      return x;
    x += y;
  }
}

// Assembly:
subq $0x58, %rsp
leaq -0x60(%rsp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x98e5
movaps %xmm0, -0x30(%rsp)
movaps %xmm1, -0x20(%rsp)
movaps %xmm2, -0x10(%rsp)
movaps %xmm3, (%rsp)
movaps %xmm4, 0x10(%rsp)
movaps %xmm5, 0x20(%rsp)
movaps %xmm6, 0x30(%rsp)
movaps %xmm7, 0x40(%rsp)
movq %r10, -0x70(%rsp)
leaq 0x60(%rsp), %rdx
movq %rdx, -0x78(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, -0x80(%rsp)
addl %esi, %edi
movl $0x10, %ecx
cmpl $0x28, %ecx
ja 0x9920
movq %rdx, %rsi
movl %ecx, %edx
addq %r10, %rdx
addl $0x8, %ecx
movl %ecx, -0x80(%rsp)
jmp 0x9929
leaq 0x8(%rdx), %rsi
movq %rsi, -0x78(%rsp)
movl (%rdx), %r8d
movq %rsi, %rdx
testl %r8d, %r8d
cmovel %edi, %eax
leal (%r8,%rdi), %esi
movl %esi, %edi
jne 0x990a
addq $0x58, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/tokenize.c
// Function: new_token
Token *new_token(TokenKind kind, Token *cur, char *str, int len) {
  Token *tok = calloc(1, sizeof(Token));
  tok->kind = kind;
  tok->str = str;
  tok->len = len;
  cur->next = tok;
  return tok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
movl $0x1, %edi
movl $0x38, %esi
callq 0x2100
movl %ebp, (%rax)
movq %r14, 0x18(%rax)
movl %ebx, 0x20(%rax)
movq %rax, 0x8(%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/tokenize.c
// Function: dump_token
void dump_token(Token *t) {
  if (!t) {
    printf("## (NULL token)");
    return;
  }

  printf("## (Token kind: %*s ", 12 ,token_kind_to_s(t->kind));

  switch (t->kind) {
    case TK_NUM:
      printf("[%ld]", t->val);
      break;
    case TK_STR:
      printf("[contents: [%s], length(includes \\0): %d", t->contents, t->content_length);
      break;
    default:
      printf("[%s]", my_strndup(t->str, t->len));
      break;
  }
  printf(")\n");
}

// Assembly:
testq %rdi, %rdi
je 0x99e8
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
callq 0x997c
leaq 0x33e0(%rip), %rdi      # 0xcda0
movl $0xc, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x20c0
movl (%rbx), %eax
cmpl $0x14, %eax
je 0x99f6
cmpl $0x3, %eax
jne 0x9a0d
movq 0x10(%rbx), %rsi
leaq 0x2919(%rip), %rdi      # 0xc2ff
jmp 0x9a23
leaq 0x33a1(%rip), %rdi      # 0xcd90
xorl %eax, %eax
jmp 0x20c0
movq 0x28(%rbx), %rsi
movl 0x30(%rbx), %edx
leaq 0x33b1(%rip), %rdi      # 0xcdb5
xorl %eax, %eax
callq 0x20c0
jmp 0x9a2a
movq 0x18(%rbx), %rdi
movl 0x20(%rbx), %esi
callq 0x4ae3
leaq 0x33be(%rip), %rdi      # 0xcdde
movq %rax, %rsi
xorl %eax, %eax
callq 0x20c0
leaq 0x2b58(%rip), %rdi      # 0xc589
popq %rbx
jmp 0x2070
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/tokenize.c
// Function: free_tokens
void free_tokens(Token *cur) {
  while (cur) {
    Token *tmp = cur->next;
    free(cur);
    cur  = tmp;
  }
}

// Assembly:
testq %rdi, %rdi
je 0x9a4f
pushq %rbx
movq 0x8(%rdi), %rbx
callq 0x2030
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x9a3d
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/tokenize.c
// Function: tokenize_keyword
Keyword *tokenize_keyword(char *p) {
  for (int i = 0; i < sizeof(keywords) / sizeof(Keyword); i++) {
    Keyword *k = &keywords[i];
    int len = strlen(k->keyword);
    if (strncmp(p, k->keyword, len) == 0 && !is_alnum(p[len])) {
      return k;
    }
  }
  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r13d, %r13d
leaq 0x6667(%rip), %rbp      # 0x10130
movq (%r13,%rbp), %r12
movq %r12, %rdi
callq 0x20b0
movslq %eax, %r15
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2060
testl %eax, %eax
je 0x9b00
movb $0x1, %al
testb %al, %al
je 0x9b25
addq $0x10, %r13
cmpq $0x190, %r13            # imm = 0x190
jne 0x9ac9
jmp 0x9b22
movb (%rbx,%r15), %al
cmpb $0x5f, %al
je 0x9aeb
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
jb 0x9aeb
andb $-0x21, %al
addb $-0x41, %al
cmpb $0x19, %al
jbe 0x9aeb
movq %rbp, %r14
addq %r13, %r14
xorl %eax, %eax
jmp 0x9aed
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/tokenize.c
// Function: is_multi_char_operator
int is_multi_char_operator(char *p) {
  for (char **op = multi_char_ope; *op; op++) {
    if (starts_with(p, *op)) {
      return strlen(*op);
    }
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2e36(%rip), %r14      # 0xc97c
leaq 0x61fb(%rip), %r15      # 0xfd48
movq %r14, %rdi
callq 0x20b0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2170
testl %eax, %eax
je 0x9b77
movq (%r15), %r14
addq $0x8, %r15
testq %r14, %r14
jne 0x9b4d
xorl %eax, %eax
jmp 0x9b7f
movq %r14, %rdi
callq 0x20b0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/tokenize.c
// Function: read_file
char *read_file(char *path) {
  FILE *fp = fopen(path, "r");
  if (!fp) {
    error("cannot open %s: %s", path, strerror(errno));
  }

  // ファイルの最後の位置を調べてサイズ計算
  if (fseek(fp, 0, SEEK_END) == -1) {
    error("%s: fseek: %s", path, strerror(errno));
  }
  long file_size = ftell(fp);

  // 読むために先頭に戻す
  if (fseek(fp, 0, SEEK_SET) == -1) {
    error("%s: fseek: %s", path, strerror(errno));
  }

  // \n\0で終わらせるための2バイト追加で確保
  char *buf = calloc(1, file_size + 2);
  fread(buf, file_size, 1, fp);


  if (file_size == 0 || buf[file_size - 1] != '\n') {
    buf[file_size++] = '\n';
  }
  buf[file_size] = '\0';
  fclose(fp);

  return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x2217(%rip), %rsi      # 0xc2f2
callq 0x21a0
movq %rax, %rbx
testq %rax, %rax
jne 0xa108
callq 0x2050
movl (%rax), %edi
callq 0x21f0
leaq 0x2d4a(%rip), %rdi      # 0xce45
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4a3b
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2180
cmpl $-0x1, %eax
jne 0xa13c
callq 0x2050
movl (%rax), %edi
callq 0x21f0
leaq 0x2d29(%rip), %rdi      # 0xce58
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4a3b
movq %rbx, %rdi
callq 0x2130
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2180
cmpl $-0x1, %eax
jne 0xa178
callq 0x2050
movl (%rax), %edi
callq 0x21f0
leaq 0x2ced(%rip), %rdi      # 0xce58
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4a3b
leaq 0x2(%r15), %rsi
movl $0x1, %edi
callq 0x2100
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x2080
testq %r15, %r15
je 0xa1a9
cmpb $0xa, -0x1(%r14,%r15)
je 0xa1b1
movb $0xa, (%r14,%r15)
incq %r15
movb $0x0, (%r14,%r15)
movq %rbx, %rdi
callq 0x2090
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/type.c
// Function: array_of
Type *array_of(Type *ptr_to, int array_size) {
  Type *ty = new_type(TY_ARRAY, ptr_to->size * array_size, ptr_to->align);
  ty->ptr_to = ptr_to;
  ty->array_size = array_size;
  return ty;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x4(%rdi), %ebp
imull %esi, %ebp
movl 0x8(%rdi), %r15d
movl $0x1, %edi
movl $0x30, %esi
callq 0x2100
movl $0x8, (%rax)
movl %ebp, 0x4(%rax)
movl %r15d, 0x8(%rax)
movq %r14, 0x10(%rax)
movslq %ebx, %rcx
movq %rcx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pocari[P]compilerbook-9cc/type.c
// Function: struct_type
Type *struct_type(void) {
  // 一旦サイズゼロ、アラインメント1バイトで作成
  // 実際には構造体のメンバーのパース時に、メンバー中で一番大きいアラインメントで上書きされる。
  Type *type = new_type(TY_STRUCT, 0, 1);
  type->is_incomplete = true;
  return type;
}

// Assembly:
pushq %rax
movl $0x1, %edi
movl $0x30, %esi
callq 0x2100
movq $0x9, (%rax)
movl $0x1, 0x8(%rax)
movb $0x1, 0xc(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/giometti[P]mastering_UNIX_programming/chapter_06/binio.c
// Function: main
int main(void)
{
	FILE *fp;
	int outdata[4] = { 10, -3, 200, 0 };
	int indata[4];
	int n;

	/* Open a file for writing */
	fp = fopen("file.txt", "w");
	if (!fp) {
		perror("fopen");
		return -1;
	}

	/* Try to write data to file */
	n = fwrite(outdata, sizeof(int), 4, fp);
	if (n < 4) {
		fprintf(stderr, "cannot fwrite\n");
		return -1;
	}
	printf("written %d, %d, %d, %d\n",
		outdata[0], outdata[1],
		outdata[2], outdata[3]);

	/* Writing done */
	fclose(fp);

	/* Open a file for reading */
	fp = fopen("file.txt", "r");
	if (!fp) {
		perror("fopen");
		return -1;
	}

	/* Try to read data from file */
	n = fread(indata, sizeof(int), 4, fp);
	if (n < 4) {
		if (ferror(fp))
			fprintf(stderr, "cannot fread\n");
		if (feof(fp))
			fprintf(stderr, "too few data to read\n");
		return -1;
	}
	printf("read %d, %d, %d, %d\n",
		indata[0], indata[1],
		indata[2], indata[3]);

	/* Reading done */
	fclose(fp);

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movaps 0xdf7(%rip), %xmm0      # 0x2010
movaps %xmm0, (%rsp)
leaq 0xdfc(%rip), %rdi       # 0x2020
leaq 0xdfe(%rip), %rsi       # 0x2029
callq 0x1080
testq %rax, %rax
je 0x1306
movq %rax, %rbx
movq %rsp, %rdi
movl $0x4, %esi
movl $0x4, %edx
movq %rax, %rcx
callq 0x10a0
cmpl $0x3, %eax
jle 0x1314
movl (%rsp), %esi
movl 0x4(%rsp), %edx
movl 0x8(%rsp), %ecx
movl 0xc(%rsp), %r8d
leaq 0xdcf(%rip), %rdi       # 0x2040
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1050
leaq 0xd99(%rip), %rdi       # 0x2020
leaq 0xdca(%rip), %rsi       # 0x2058
callq 0x1080
testq %rax, %rax
je 0x1306
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
movl $0x4, %esi
movl $0x4, %edx
movq %rax, %rcx
callq 0x1040
cmpl $0x3, %eax
jg 0x12db
movq %rbx, %rdi
callq 0x1030
testl %eax, %eax
jne 0x1327
movq %rbx, %rdi
callq 0x1070
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x131e
callq 0x10dc
jmp 0x131e
movl 0x10(%rsp), %esi
movl 0x14(%rsp), %edx
movl 0x18(%rsp), %ecx
movl 0x1c(%rsp), %r8d
leaq 0xd8b(%rip), %rdi       # 0x207e
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1050
jmp 0x131e
leaq 0xd1e(%rip), %rdi       # 0x202b
callq 0x1090
jmp 0x1319
callq 0x10f8
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
callq 0x10c0
jmp 0x12c3
// File: /workspace/github_c_makefile_star2_O1/cirocosta[P]stress/src/context-switches.c
// Function: stick_self_to_core
int
stick_self_to_core(int cpu)
{
	cpu_set_t cpuset;

	CPU_ZERO(&cpuset);
	CPU_SET(cpu, &cpuset);
	return sched_setaffinity(0, sizeof(cpuset), &cpuset);
}

// Assembly:
subq $0x88, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
cmpl $0x3ff, %edi            # imm = 0x3FF
ja 0x1945
movl $0x1, %eax
movl %edi, %ecx
shlq %cl, %rax
shrl $0x6, %edi
orq %rax, (%rsp,%rdi,8)
movq %rsp, %rdx
movl $0x80, %esi
xorl %edi, %edi
callq 0x10b0
addq $0x88, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/cirocosta[P]stress/src/context-switches.c
// Function: thread_handler
void*
thread_handler(void* arg)
{
	(void)arg;
	int num_cores = sysconf(_SC_NPROCESSORS_ONLN);

	while (1) {
		int r = rand() % num_cores;
		int ndx = 0;

		while (++ndx < num_cores) {
			int n = 1000;
			_STRESS_MUST((stick_self_to_core(r) != -1),
			             "couldn't stick thread to cpu %d",
			             ndx);
			while (n-- > 0) {
				printf("Thread %lu is running on CPU %3d\n",
				       (unsigned long)pthread_self(),
				       sched_getcpu());
			}
		}
	}

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x54, %edi
callq 0x1130
movq %rax, %r14
leaq 0x7c4(%rip), %r15       # 0x213f
callq 0x11b0
cltd
idivl %r14d
cmpl $0x2, %r14d
jl 0x197b
movl %edx, %ebp
movl $0x1, %ebx
movl %ebp, %edi
callq 0x18fb
cmpl $-0x1, %eax
je 0x19d1
movl $0x3e9, %r13d           # imm = 0x3E9
callq 0x1120
movq %rax, %r12
callq 0x1150
movq %r15, %rdi
movq %r12, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x1090
decl %r13d
cmpl $0x1, %r13d
ja 0x19ab
incl %ebx
cmpl %r14d, %ebx
jne 0x1991
jmp 0x197b
movq 0x2620(%rip), %r14      # 0x3ff8
movq (%r14), %rcx
leaq 0x63e(%rip), %rdi       # 0x2020
movl $0x9, %esi
movl $0x1, %edx
callq 0x1180
movq (%r14), %rcx
leaq 0x62b(%rip), %rdi       # 0x2026
movl $0x3, %esi
movl $0x1, %edx
callq 0x1180
movq (%r14), %rdi
leaq 0x6f4(%rip), %rsi       # 0x2108
movl %ebx, %edx
xorl %eax, %eax
callq 0x10f0
movq (%r14), %rcx
leaq 0x626(%rip), %rdi       # 0x204d
movl $0x2, %esi
movl $0x1, %edx
callq 0x1180
movq (%r14), %rdi
leaq 0x610(%rip), %rsi       # 0x2050
leaq 0x6e1(%rip), %rdx       # 0x2128
xorl %eax, %eax
callq 0x10f0
movq (%r14), %rdi
leaq 0x614(%rip), %rsi       # 0x206c
movl $0x27, %edx
xorl %eax, %eax
callq 0x10f0
movq (%r14), %rsi
movl $0xa, %edi
callq 0x10c0
movq (%r14), %rcx
leaq 0x5fe(%rip), %rdi       # 0x2079
movl $0xa, %esi
movl $0x1, %edx
callq 0x1180
movl $0x1, %edi
callq 0x1170
// File: /workspace/github_c_makefile_star2_O1/cirocosta[P]stress/src/context-switches.c
// Function: main
int
main()
{
	pthread_t threads[NTHREADS];

	srand(time(NULL));
	for (int i = 0; i < NTHREADS; i++) {
		_STRESS_MUST(
		  (!pthread_create(&threads[i], NULL, &thread_handler, NULL)),
		  "Unexpected error creating thread %d",
		  i);
	}

	for (int i = 0; i < NTHREADS; i++) {
		_STRESS_MUST((!pthread_join(threads[i], NULL)),
		             "Unexpected error waiting for thread %d",
		             i);
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x1100
movl %eax, %edi
callq 0x10e0
movq %rsp, %r14
leaq -0x15e(%rip), %r15      # 0x195c
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x1110
testl %eax, %eax
jne 0x1b03
incq %rbx
addq $0x8, %r14
cmpq $0x32, %rbx
jne 0x1aba
xorl %ebx, %ebx
movq (%rsp,%rbx,8), %rdi
xorl %esi, %esi
callq 0x1190
testl %eax, %eax
jne 0x1b0b
incq %rbx
cmpq $0x32, %rbx
jne 0x1adc
xorl %eax, %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x140c
movq %rbx, %rdi
callq 0x14c5
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/lua53.c
// Function: luaC_upvdeccount
void luaC_upvdeccount (lua_State *L, UpVal *uv) {
  lua_assert(uv->refcount > 0);
  uv->refcount--;
  if (uv->refcount == 0 && !upisopen(uv))
    luaM_free(L, uv);
}

// Assembly:
decq 0x8(%rsi)
je 0xb3ed
retq
leaq 0x10(%rsi), %rax
cmpq %rax, (%rsi)
jne 0xb3ec
pushq %rbx
movq 0x18(%rdi), %rbx
movq 0x8(%rbx), %rdi
movl $0x20, %edx
xorl %ecx, %ecx
callq *(%rbx)
addq $-0x20, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/lua53.c
// Function: luaL_requiref
LUALIB_API void luaL_requiref (lua_State *L, const char *modname,
                               lua_CFunction openf, int glb) {
  luaL_getsubtable(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE);
  lua_getfield(L, -1, modname);  /* LOADED[modname] */
  if (!lua_toboolean(L, -1)) {  /* package not already loaded? */
    lua_pop(L, 1);  /* remove field */
    lua_pushcfunction(L, openf);
    lua_pushstring(L, modname);  /* argument to open function */
    lua_call(L, 1, 1);  /* call 'openf' to open module */
    lua_pushvalue(L, -1);  /* make copy of module (call result) */
    lua_setfield(L, -3, modname);  /* LOADED[modname] = module */
  }
  lua_remove(L, -2);  /* remove LOADED table */
  if (glb) {
    lua_pushvalue(L, -1);  /* copy of module */
    lua_setglobal(L, modname);  /* _G[modname] = module */
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x22b68(%rip), %rdx     # 0x2ff26
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0xd30b
movq 0x10(%r14), %rsi
addq $-0x10, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8ff7
movq 0x10(%r14), %rax
movl -0x8(%rax), %ecx
testl %ecx, %ecx
je 0xd3f9
cmpl $0x1, %ecx
jne 0xd47a
cmpl $0x0, -0x10(%rax)
jne 0xd47a
leaq -0x10(%rax), %rcx
movq %rcx, 0x10(%r14)
movq %r15, -0x10(%rax)
movl $0x16, -0x8(%rax)
addq $0x10, 0x10(%r14)
movq 0x18(%r14), %rax
cmpq $0x0, 0x18(%rax)
jle 0xd424
movq %r14, %rdi
callq 0x83bf
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8927
movq 0x10(%r14), %rsi
addq $-0x20, %rsi
incw 0xc4(%r14)
movq %r14, %rdi
movl $0x1, %edx
callq 0xa0fc
decw 0xc4(%r14)
movq 0x10(%r14), %rax
movups -0x10(%rax), %xmm0
movups %xmm0, (%rax)
movq 0x10(%r14), %rsi
leaq 0x10(%rsi), %rax
movq %rax, 0x10(%r14)
addq $-0x20, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x9843
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x72c6
movq 0x10(%r14), %rax
leaq -0x10(%rax), %rcx
movq %rcx, 0x10(%r14)
testl %ebp, %ebp
je 0xd4d2
movups -0x20(%rax), %xmm0
movups %xmm0, (%rcx)
addq $0x10, 0x10(%r14)
movq 0x18(%r14), %rax
movq 0x40(%rax), %rdi
movl $0x2, %esi
callq 0x9079
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9843
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/lua53.c
// Function: luaL_checkversion_
LUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver, size_t sz) {
  const lua_Number *v = lua_version(L);
  if (sz != LUAL_NUMSIZES)  /* check numeric types */
    luaL_error(L, "core and library have incompatible numeric types");
  if (v != lua_version(NULL))
    luaL_error(L, "multiple Lua VMs detected");
  else if (*v != ver)
    luaL_error(L, "version mismatch: app. needs %f, Lua core provides %f",
                  (LUAI_UACNUMBER)ver, (LUAI_UACNUMBER)*v);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0xd81e
movq 0x18(%rdi), %rax
movq 0xd0(%rax), %rax
jmp 0xd825
leaq 0x22133(%rip), %rax     # 0x2f958
cmpq $0x88, %rsi
jne 0xd848
leaq 0x22123(%rip), %rcx     # 0x2f958
cmpq %rcx, %rax
jne 0xd851
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
jne 0xd85f
jp 0xd85f
popq %rax
retq
leaq 0x226df(%rip), %rsi     # 0x2ff2e
jmp 0xd858
leaq 0x22707(%rip), %rsi     # 0x2ff5f
xorl %eax, %eax
callq 0xbda0
leaq 0x22713(%rip), %rsi     # 0x2ff79
movb $0x2, %al
callq 0xbda0
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/lua53.c
// Function: luaK_prefix
void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e, int line) {
  static const expdesc ef = {VKINT, {0}, NO_JUMP, NO_JUMP};
  switch (op) {
    case OPR_MINUS: case OPR_BNOT:  /* use 'ef' as fake 2nd operand */
      if (constfolding(fs, op + LUA_OPUNM, e, &ef))
        break;
      /* FALLTHROUGH */
    case OPR_LEN:
      codeunexpval(fs, cast(OpCode, op + OP_UNM), e, line);
      break;
    case OPR_NOT: codenot(fs, e); break;
    default: lua_assert(0);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
cmpl $0x2, %esi
jb 0xe6dc
je 0xe755
cmpl $0x3, %r15d
je 0xe6f6
jmp 0xe74a
leal 0xc(%r15), %esi
leaq 0x21289(%rip), %rcx     # 0x2f970
movq %rbx, %rdi
movq %r14, %rdx
callq 0xe852
testl %eax, %eax
jne 0xe74a
addl $0x19, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe1bb
cmpl $0x7, (%r14)
jne 0xe720
movl 0x8(%r14), %ecx
btl $0x8, %ecx
jb 0xe720
movzbl 0x3a(%rbx), %edx
cmpl %edx, %ecx
jl 0xe720
decb 0x3c(%rbx)
shll $0x17, %eax
orl %r15d, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0xdbdd
movl %eax, 0x8(%r14)
movl $0xc, (%r14)
movq (%rbx), %rax
movq 0x48(%rax), %rax
movslq 0x20(%rbx), %rcx
movl %ebp, -0x4(%rax,%rcx,4)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
callq 0xdfb6
movl (%r14), %eax
decl %eax
cmpl $0xb, %eax
ja 0xe824
leaq 0x20a3b(%rip), %rcx     # 0x2f1b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x3, (%r14)
jmp 0xe824
movl $0x2, (%r14)
jmp 0xe824
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17b51
cmpl $0x7, (%r14)
jne 0xe7bc
movl 0x8(%r14), %eax
btl $0x8, %eax
jb 0xe7bc
movzbl 0x3a(%rbx), %ecx
cmpl %ecx, %eax
jl 0xe7bc
decb 0x3c(%rbx)
movl 0x8(%r14), %esi
shll $0x17, %esi
orl $0x1b, %esi
movq %rbx, %rdi
callq 0xdbdd
movl %eax, 0x8(%r14)
movl $0xc, (%r14)
jmp 0xe824
movslq 0x8(%r14), %rcx
movq (%rbx), %rdx
leaq (,%rcx,4), %rax
addq 0x38(%rdx), %rax
testq %rcx, %rcx
jle 0xe807
movl -0x4(%rax), %ecx
andl $0x3f, %ecx
addq $-0x24, %rcx
cmpq $-0x6, %rcx
jbe 0xe807
addq $-0x4, %rax
movl (%rax), %ecx
movl %ecx, %edx
andl $0xffffc03f, %edx       # imm = 0xFFFFC03F
xorl %esi, %esi
testl $0x3fc0, %ecx           # imm = 0x3FC0
sete %sil
shll $0x6, %esi
orl %edx, %esi
movl %esi, (%rax)
movl 0x10(%r14), %esi
movl 0x14(%r14), %eax
movl %esi, 0x14(%r14)
movl %eax, 0x10(%r14)
movq %rbx, %rdi
callq 0x17b8c
movl 0x10(%r14), %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x17b8c
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/lua53.c
// Function: luaD_shrinkstack
void luaD_shrinkstack (lua_State *L) {
  int inuse = stackinuse(L);
  int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK;
  if (goodsize > LUAI_MAXSTACK)
    goodsize = LUAI_MAXSTACK;  /* respect stack limit */
  if (L->stacksize > LUAI_MAXSTACK)  /* had been handling stack overflow? */
    luaE_freeCI(L);  /* free all CIs (list grew because of an error) */
  else
    luaE_shrinkCI(L);  /* shrink list */
  /* if thread is currently not handling a stack overflow and its
     good size is smaller than current size, shrink its stack */
  if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) &&
      goodsize < L->stacksize)
    luaD_reallocstack(L, goodsize);
  else  /* don't change stack */
    condmovestack(L,{},{});  /* (change only for debugging) */
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0xfb48
movq 0x8(%rax), %rcx
movq 0x10(%rax), %rax
cmpq %rcx, %r14
cmovbq %rcx, %r14
jmp 0xfb32
subq 0x38(%rbx), %r14
shrq $0x4, %r14
leal 0x1(%r14), %eax
leal 0x8(%r14), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x3, %ecx
leal (%rcx,%r14), %eax
incl %eax
movl $0xf4236, %ebp          # imm = 0xF4236
cmpl %ebp, %eax
cmovll %eax, %ebp
cmpl $0xf4241, 0xb8(%rbx)    # imm = 0xF4241
jl 0xfb86
movq %rbx, %rdi
callq 0xfbb5
jmp 0xfb8e
movq %rbx, %rdi
callq 0xfbff
cmpl $0xf423a, %r14d         # imm = 0xF423A
jg 0xfbb0
addl $0xa, %ebp
cmpl 0xb8(%rbx), %ebp
jge 0xfbb0
movq %rbx, %rdi
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0xf93c
popq %rbx
popq %r14
popq %rbp
retq