LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: error_at
void error_at(char *loc, char *fmt, ...) {
  va_list ap;
  va_start(ap, fmt);

  int column = get_pos_by_line(loc);
  fprintf(stderr, "file: %s\n", filename);
  fprintf(stderr, "%s\n", get_error_lines(loc));
  fprintf(stderr, "%*s", column, "");
  fprintf(stderr, "^ ");
  vfprintf(stderr, fmt, ap);
  fprintf(stderr, "\n");

  exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x48e3
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rsi, 0x10(%r14)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r14)
callq 0x49a9
movl %eax, %ebp
movq 0xb6e7(%rip), %r13      # 0xfff8
movq (%r13), %rdi
leaq 0xbb54(%rip), %rax      # 0x10470
movq (%rax), %rdx
leaq 0x7d76(%rip), %rsi      # 0xc69c
xorl %eax, %eax
callq 0x2120
movq (%r13), %r12
movq %r15, %rdi
callq 0x49d0
leaq 0x7c25(%rip), %rsi      # 0xc565
movq %r12, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2120
movq (%r13), %rdi
leaq 0x7d4e(%rip), %rsi      # 0xc6a6
leaq 0x752c(%rip), %rcx      # 0xbe8b
movl %ebp, %edx
xorl %eax, %eax
callq 0x2120
movq (%r13), %rcx
leaq 0x7d37(%rip), %rdi      # 0xc6aa
movl $0x2, %esi
movl $0x1, %edx
callq 0x21e0
movq (%r13), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x21b0
movq (%r13), %rsi
movl $0xa, %edi
callq 0x20f0
movl $0x1, %edi
callq 0x21d0
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: consume_end
static Token *consume(char *op) {
  Token *tk = token;
  if (!peek_token(op)) {
    return NULL;
  }
  token = token->next;
  return tk;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x7b76(%rip), %rdi      # 0xc6ad
callq 0x51eb
leaq 0xb93d(%rip), %rbx      # 0x10480
movq (%rbx), %r14
testb %al, %al
je 0x4b55
movq %r14, %r15
movq 0x8(%r15), %r14
movb $0x1, %al
jmp 0x4b7e
leaq 0x7b53(%rip), %rdi      # 0xc6af
callq 0x51eb
testb %al, %al
je 0x4b7c
movq 0x8(%r14), %r15
movq %r15, (%rbx)
leaq 0x7b3a(%rip), %rdi      # 0xc6ad
callq 0x51eb
testb %al, %al
jne 0x4b4d
xorl %eax, %eax
movq %r14, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: peek_end
bool peek_end() {
  Token *tmp = token;
  bool result = false;

  if (consume("}")) {
    result = true;
  } else if (consume(",") && consume("}")) {
    result =  true;;
  }

  token = tmp;
  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0xb8ed(%rip), %rbx      # 0x10480
movq (%rbx), %r14
leaq 0x7b10(%rip), %rdi      # 0xc6ad
callq 0x51eb
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x4bdb
leaq 0x7afe(%rip), %rdi      # 0xc6af
callq 0x51eb
testb %al, %al
je 0x4bd9
movq 0x8(%r14), %r15
movq %r15, (%rbx)
leaq 0x7ae5(%rip), %rdi      # 0xc6ad
callq 0x51eb
movl %eax, %ecx
testq %r15, %r15
setne %al
andb %cl, %al
jmp 0x4bdb
xorl %eax, %eax
movq %r14, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: peek_token
static bool peek_token(char *op) {
  if (token->kind != TK_RESERVED ||
      token->len != strlen(op) ||
      memcmp(token->str, op, token->len)) {
    return false;
  }
  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0xb289(%rip), %rax      # 0x10480
movq (%rax), %r15
cmpl $0x1, (%r15)
jne 0x5227
movq %rdi, %rbx
movslq 0x20(%r15), %r14
callq 0x20b0
cmpq %r14, %rax
jne 0x5227
movq 0x18(%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2170
testl %eax, %eax
sete %al
jmp 0x5229
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: declarator
static Type *declarator(Type *ty, char **name) {
  while (consume("*")) {
    ty = pointer_to(ty);
  }
  if (consume("(")) {
    Type *placeholder = calloc(1, sizeof(Type));
    Type *new_ty = declarator(placeholder, name);
    expect(")");
    // 入れ子部分を全部パースした後に、その後に続く配列の [] などを含めた(type_suffix)型としてplaceholderを完成させる
    memcpy(placeholder, type_suffix(ty), sizeof(Type));
    return new_ty;
  }

  *name = expect_ident();
  return type_suffix(ty);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x750d(%rip), %rdi      # 0xce17
callq 0x51eb
testb %al, %al
je 0x5944
leaq 0xab66(%rip), %r12      # 0x10480
leaq 0x74f6(%rip), %r15      # 0xce17
movq (%r12), %rax
movq 0x8(%rax), %rax
movq %rax, (%r12)
movq %rbx, %rdi
callq 0x9de4
movq %rax, %rbx
movq %r15, %rdi
callq 0x51eb
testb %al, %al
jne 0x5921
leaq 0x6c2b(%rip), %rdi      # 0xc576
callq 0x51eb
testb %al, %al
je 0x59c1
leaq 0xab25(%rip), %rax      # 0x10480
movq (%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%rax)
movl $0x1, %edi
movl $0x30, %esi
callq 0x2100
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x58f5
movq %rax, %r14
leaq 0x6bfd(%rip), %rdi      # 0xc589
callq 0x5b5c
movq %rbx, %rdi
callq 0x6dbb
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm0, (%r15)
movups %xmm1, 0x10(%r15)
movups %xmm2, 0x20(%r15)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x5bde
movq %rax, (%r14)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6dbb
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: find_typedef
static Type *find_typedef(Token *tk) {
  for (VarScope *sc = var_scope; sc; sc = sc->next) {
    if (sc->var) {
      // var はtypedefじゃないので無視
      continue;
    }

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0xaa55(%rip), %r12      # 0x10440
testq %r12, %r12
je 0x5a31
movq %rdi, %r14
xorl %ebx, %ebx
cmpq $0x0, 0x10(%r12)
jne 0x5a26
movq 0x8(%r12), %r15
movq %r15, %rdi
callq 0x20b0
movslq 0x20(%r14), %rcx
cmpq %rcx, %rax
jne 0x5a26
movq 0x18(%r14), %rsi
movq %r15, %rdi
movq %rax, %rdx
callq 0x2060
testl %eax, %eax
je 0x5a35
movq (%r12), %r12
testq %r12, %r12
jne 0x59f5
jmp 0x5a3a
xorl %ebx, %ebx
jmp 0x5a3a
movq 0x18(%r12), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: find_tag
static TagScope *find_tag(Token *tk) {
  for (TagScope *sc = tag_scope; sc; sc = sc->next) {
    if (strlen(sc->name) == tk->len && strncmp(sc->name, tk->str, tk->len) == 0) {
      // fprintf(stderr, "tag: %s, sc_name: %s\n", my_strndup(tk->str, tk->len), sc->name);
      return sc;
    }
  }
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0xa9ac(%rip), %rbx      # 0x10438
testq %rbx, %rbx
je 0x5ac4
movq %rdi, %r14
movslq 0x20(%rdi), %r15
movq 0x8(%rbx), %r12
movq %r12, %rdi
callq 0x20b0
cmpq %r15, %rax
jne 0x5abc
movq 0x18(%r14), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x2060
testl %eax, %eax
je 0x5ac6
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x5a98
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: push_tag_scope
static void push_tag_scope(Token *tag_tok, Type *type) {
  TagScope *sc = calloc(1, sizeof(TagScope));

  sc->name = my_strndup(tag_tok->str, tag_tok->len);
  sc->ty = type;
  sc->next = tag_scope;
  sc->depth = scope_depth;

  tag_scope = sc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %r12d
movq %rdi, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x2100
movq %rax, %r14
leal 0x1(%r12), %eax
movslq %eax, %rdi
movl $0x1, %esi
callq 0x2100
movq %rax, %r13
testl %r12d, %r12d
jle 0x5b26
movl %r12d, %r12d
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2150
jmp 0x5b29
xorl %r12d, %r12d
movb $0x0, (%r13,%r12)
movq %r13, 0x8(%r14)
movq %rbx, 0x10(%r14)
movq 0xa8fa(%rip), %rax      # 0x10438
movq %rax, (%r14)
movl 0xa8e9(%rip), %eax      # 0x10430
movl %eax, 0x18(%r14)
movq %r14, 0xa8e6(%rip)      # 0x10438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: expect
static void expect(char *op) {
  if (token->kind != TK_RESERVED ||
      token->len != strlen(op) ||
      memcmp(token->str, op, token->len)) {
    error_at(token->str, "'%c'(token->kind: %s, token->len: %d, op: %s)ではありません", op, token_kind_to_s(token->kind), token->len, op);
  }
  token = token->next;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0xa912(%rip), %r15      # 0x10480
movq (%r15), %r12
movl (%r12), %ebp
cmpl $0x1, %ebp
jne 0x5bb1
movslq 0x20(%r12), %r14
movq %rbx, %rdi
callq 0x20b0
cmpq %r14, %rax
jne 0x5bb1
movq 0x18(%r12), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2170
testl %eax, %eax
jne 0x5bb1
movq 0x8(%r12), %rax
movq %rax, (%r15)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%r12), %r14
movl %ebp, %edi
callq 0x9568
movq (%r15), %rcx
movl 0x20(%rcx), %r8d
leaq 0x6c2b(%rip), %rsi      # 0xc7f6
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
movq %rbx, %r9
xorl %eax, %eax
callq 0x487c
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: expect_ident
static char *expect_ident() {
  if (token->kind != TK_IDENT) {
    error_at(token->str, "識別子ではありません。");
  }
  char *s = my_strndup(token->str, token->len);
  token = token->next;
  return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0xa892(%rip), %r12      # 0x10480
movq (%r12), %r13
cmpl $0x2, (%r13)
movq 0x18(%r13), %r14
jne 0x5c43
movslq 0x20(%r13), %rbx
leaq 0x1(%rbx), %rdi
movl $0x1, %esi
callq 0x2100
movq %rax, %r15
testq %rbx, %rbx
jle 0x5c27
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2150
jmp 0x5c29
xorl %ebx, %ebx
movb $0x0, (%r15,%rbx)
movq 0x8(%r13), %rax
movq %rax, (%r12)
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x6c31(%rip), %rsi      # 0xc87b
movq %r14, %rdi
xorl %eax, %eax
callq 0x487c
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: logical_and
static Node *logical_and() {
  Token *tk;
  Node *node = bit_or();

  while (tk = consume("&&")) {
    node = new_bin_node(ND_AND, node, bit_or(), tk);
  }

  return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x61ca
movq %rax, %rbx
leaq 0x67ab(%rip), %rdi      # 0xc8f8
callq 0x51eb
testb %al, %al
je 0x61b5
leaq 0xa323(%rip), %r13      # 0x10480
leaq 0x6794(%rip), %r14      # 0xc8f8
movq (%r13), %rbp
movq 0x8(%rbp), %rax
movq %rax, (%r13)
callq 0x61ca
movq %rax, %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r15
movl $0xc, (%rax)
movq %rbp, 0x8(%rax)
movq %rbx, 0x18(%rax)
movq %r12, 0x20(%rax)
movq %rax, %rdi
callq 0x9eef
movq %r14, %rdi
callq 0x51eb
movq %r15, %rbx
testb %al, %al
jne 0x6164
jmp 0x61b8
movq %rbx, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: bit_or
static Node *bit_or() {
  Token *tk;
  Node *node = bit_xor();

  while (tk = consume("|")) {
    node = new_bin_node(ND_BIT_OR, node, bit_xor(), tk);
  }

  return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x6261
movq %rax, %rbx
leaq 0x6712(%rip), %rdi      # 0xc8f6
callq 0x51eb
testb %al, %al
je 0x624c
leaq 0xa28c(%rip), %r13      # 0x10480
leaq 0x66fb(%rip), %r14      # 0xc8f6
movq (%r13), %rbp
movq 0x8(%rbp), %rax
movq %rax, (%r13)
callq 0x6261
movq %rax, %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r15
movl $0xd, (%rax)
movq %rbp, 0x8(%rax)
movq %rbx, 0x18(%rax)
movq %r12, 0x20(%rax)
movq %rax, %rdi
callq 0x9eef
movq %r14, %rdi
callq 0x51eb
movq %r15, %rbx
testb %al, %al
jne 0x61fb
jmp 0x624f
movq %rbx, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: bit_xor
static Node *bit_xor() {
  Token *tk;
  Node *node = bit_and();

  while (tk = consume("^")) {
    node = new_bin_node(ND_BIT_XOR, node, bit_and(), tk);
  }

  return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x62f8
movq %rax, %rbx
leaq 0x6680(%rip), %rdi      # 0xc8fb
callq 0x51eb
testb %al, %al
je 0x62e3
leaq 0xa1f5(%rip), %r13      # 0x10480
leaq 0x6669(%rip), %r14      # 0xc8fb
movq (%r13), %rbp
movq 0x8(%rbp), %rax
movq %rax, (%r13)
callq 0x62f8
movq %rax, %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r15
movl $0x11, (%rax)
movq %rbp, 0x8(%rax)
movq %rbx, 0x18(%rax)
movq %r12, 0x20(%rax)
movq %rax, %rdi
callq 0x9eef
movq %r14, %rdi
callq 0x51eb
movq %r15, %rbx
testb %al, %al
jne 0x6292
jmp 0x62e6
movq %rbx, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: bit_and
static Node *bit_and() {
  Token *tk;
  Node *node = equality();

  while (tk = consume("&")) {
    node = new_bin_node(ND_BIT_AND, node, equality(), tk);
  }

  return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x638f
movq %rax, %rbx
leaq 0x65e7(%rip), %rdi      # 0xc8f9
callq 0x51eb
testb %al, %al
je 0x637a
leaq 0xa15e(%rip), %r13      # 0x10480
leaq 0x65d0(%rip), %r14      # 0xc8f9
movq (%r13), %rbp
movq 0x8(%rbp), %rax
movq %rax, (%r13)
callq 0x638f
movq %rax, %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r15
movl $0xe, (%rax)
movq %rbp, 0x8(%rax)
movq %rbx, 0x18(%rax)
movq %r12, 0x20(%rax)
movq %rax, %rdi
callq 0x9eef
movq %r14, %rdi
callq 0x51eb
movq %r15, %rbx
testb %al, %al
jne 0x6329
jmp 0x637d
movq %rbx, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pocari[P]compilerbook-9cc/parser.c
// Function: equality
static Node *equality() {
  Token *tk;
  Node *node = relational();

  for (;;) {
    if (tk = consume("==")) {
      node = new_bin_node(ND_EQL, node, relational(), tk);
    } else if (tk = consume("!=")) {
      node = new_bin_node(ND_NOT_EQL, node, relational(), tk);
    } else {
      return node;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x6429
movq %rax, %r14
leaq 0xa0d7(%rip), %rbp      # 0x10480
leaq 0x654d(%rip), %rdi      # 0xc8fd
callq 0x51eb
movl $0x12, %r15d
testb %al, %al
jne 0x63d5
leaq 0x653a(%rip), %rdi      # 0xc900
callq 0x51eb
movl $0x13, %r15d
testb %al, %al
je 0x6417
movq (%rbp), %rbx
movq 0x8(%rbx), %rax
movq %rax, (%rbp)
callq 0x6429
movq %rax, %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r13
movl %r15d, (%rax)
movq %rbx, 0x8(%rax)
movq %r14, 0x18(%rax)
movq %r12, 0x20(%rax)
movq %rax, %rdi
callq 0x9eef
movq %r13, %r14
jmp 0x63a9
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_O3/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 0x6522
movq %rax, %r13
leaq 0xa03d(%rip), %r12      # 0x10480
leaq 0x657a(%rip), %rdi      # 0xc9c4
callq 0x51eb
testb %al, %al
je 0x6471
movq (%r12), %r15
movq 0x8(%r15), %rax
movq %rax, (%r12)
movl $0xa, %ebx
callq 0x6522
movq %r13, %rbp
movq %rax, %r13
jmp 0x64e0
leaq 0x6550(%rip), %rdi      # 0xc9c8
callq 0x51eb
testb %al, %al
je 0x6494
movq (%r12), %r15
movq 0x8(%r15), %rax
movq %rax, (%r12)
movl $0xa, %ebx
jmp 0x64d8
leaq 0x6469(%rip), %rdi      # 0xc904
callq 0x51eb
testb %al, %al
je 0x64b7
movq (%r12), %r15
movq 0x8(%r15), %rax
movq %rax, (%r12)
movl $0x9, %ebx
jmp 0x6464
leaq 0x64be(%rip), %rdi      # 0xc97c
callq 0x51eb
testb %al, %al
je 0x6510
movq (%r12), %r15
movq 0x8(%r15), %rax
movq %rax, (%r12)
movl $0x9, %ebx
callq 0x6522
movq %rax, %rbp
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r14
movl %ebx, (%rax)
movq %r15, 0x8(%rax)
movq %rbp, 0x18(%rax)
movq %r13, 0x20(%rax)
movq %rax, %rdi
callq 0x9eef
movq %r14, %r13
jmp 0x6443
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_O3/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 0x65bc
movq %rax, %r14
leaq 0x9f44(%rip), %rbp      # 0x10480
leaq 0x63c0(%rip), %rdi      # 0xc903
callq 0x51eb
movl $0xf, %r15d
testb %al, %al
jne 0x6568
leaq 0x63ad(%rip), %rdi      # 0xc906
callq 0x51eb
movl $0x10, %r15d
testb %al, %al
je 0x65aa
movq (%rbp), %rbx
movq 0x8(%rbx), %rax
movq %rax, (%rbp)
callq 0x65bc
movq %rax, %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r13
movl %r15d, (%rax)
movq %rbx, 0x8(%rax)
movq %r14, 0x18(%rax)
movq %r12, 0x20(%rax)
movq %rax, %rdi
callq 0x9eef
movq %r13, %r14
jmp 0x653c
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_O3/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 0x67e4
movq %rax, %r15
leaq 0x635f(%rip), %rbx      # 0xc933
leaq 0x9ea5(%rip), %r13      # 0x10480
leaq 0x6be7(%rip), %r14      # 0xd1c9
movq %rbx, %rdi
callq 0x51eb
testb %al, %al
je 0x6613
movq (%r13), %r12
movq 0x8(%r12), %rax
movq %rax, (%r13)
callq 0x67e4
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x6651
movq %rax, %r15
jmp 0x65e2
movq %r14, %rdi
callq 0x51eb
testb %al, %al
je 0x6644
movq (%r13), %r12
movq 0x8(%r12), %rax
movq %rax, (%r13)
callq 0x67e4
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x6727
movq %rax, %r15
jmp 0x65e2
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x9eef
movq %r15, %rdi
callq 0x9eef
movq 0x10(%r14), %rdi
callq 0x9edb
testb %al, %al
je 0x668e
movq 0x10(%r15), %rdi
callq 0x9edb
movl $0x1, %ebp
testb %al, %al
jne 0x66ad
movq 0x10(%r14), %rdi
callq 0x9ecf
testb %al, %al
je 0x66b5
movq 0x10(%r15), %rdi
callq 0x9edb
movl $0x2, %ebp
testb %al, %al
je 0x66b5
movq %r14, %r12
movq %r15, %r14
jmp 0x66d7
movq 0x10(%r14), %rdi
callq 0x9edb
testb %al, %al
je 0x670b
movq 0x10(%r15), %rdi
callq 0x9ecf
movl $0x2, %ebp
movq %r15, %r12
testb %al, %al
je 0x670b
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 0x9eef
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9d6e(%rip), %rax      # 0x10480
movq (%rax), %rax
movq 0x18(%rax), %rdi
leaq 0x6403(%rip), %rsi      # 0xcb23
xorl %eax, %eax
callq 0x487c
// File: /workspace/github_c_makefile_star2_O3/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 0x9eef
movq %rbx, %rdi
callq 0x9eef
movq 0x10(%r15), %rdi
callq 0x9edb
testb %al, %al
je 0x6764
movq 0x10(%rbx), %rdi
callq 0x9edb
movl $0x3, %ebp
testb %al, %al
jne 0x67a2
movq 0x10(%r15), %rdi
callq 0x9ecf
testb %al, %al
je 0x6783
movq 0x10(%rbx), %rdi
callq 0x9ecf
movl $0x5, %ebp
testb %al, %al
jne 0x67a2
movq 0x10(%r15), %rdi
callq 0x9ecf
testb %al, %al
je 0x67d6
movq 0x10(%rbx), %rdi
callq 0x9edb
movl $0x4, %ebp
testb %al, %al
je 0x67d6
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 0x9eef
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6368(%rip), %rdi      # 0xcb45
xorl %eax, %eax
callq 0x4a3b
// File: /workspace/github_c_makefile_star2_O3/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 0x6897
movq %rax, %r14
leaq 0x9c82(%rip), %r12      # 0x10480
leaq 0x6612(%rip), %rdi      # 0xce17
callq 0x51eb
movl $0x6, %r15d
testb %al, %al
jne 0x6840
leaq 0x65ff(%rip), %rdi      # 0xce1a
callq 0x51eb
movl $0x7, %r15d
testb %al, %al
jne 0x6840
leaq 0x60d8(%rip), %rdi      # 0xc909
callq 0x51eb
movl $0x8, %r15d
testb %al, %al
je 0x6885
movq (%r12), %rbx
movq 0x8(%rbx), %rax
movq %rax, (%r12)
callq 0x6897
movq %rax, %r13
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %rbp
movl %r15d, (%rax)
movq %rbx, 0x8(%rax)
movq %r14, 0x18(%rax)
movq %r13, 0x20(%rax)
movq %rax, %rdi
callq 0x9eef
movq %rbp, %r14
jmp 0x67fe
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_O3/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 0x6112(%rip), %rdi      # 0xce17
callq 0x51eb
testb %al, %al
je 0x6d3d
leaq 0x976b(%rip), %r15      # 0x10480
leaq 0x60fb(%rip), %r14      # 0xce17
movq (%r15), %rax
movq 0x8(%rax), %rax
movq %rax, (%r15)
movq %rbx, %rdi
callq 0x9de4
movq %rax, %rbx
movq %r14, %rdi
callq 0x51eb
testb %al, %al
jne 0x6d1c
leaq 0x5832(%rip), %rdi      # 0xc576
callq 0x51eb
testb %al, %al
je 0x6db1
leaq 0x972c(%rip), %rax      # 0x10480
movq (%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%rax)
movl $0x1, %edi
movl $0x30, %esi
callq 0x2100
movq %rax, %r14
movq %rax, %rdi
callq 0x6cf6
movq %rax, %r15
leaq 0x5807(%rip), %rdi      # 0xc589
callq 0x5b5c
movq %rbx, %rdi
callq 0x6dbb
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 0x6dbb
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x5b3d(%rip), %rdi      # 0xc90b
callq 0x51eb
testb %al, %al
je 0x6e53
leaq 0x96a2(%rip), %r12      # 0x10480
movq (%r12), %rax
movq 0x8(%rax), %r14
movq %r14, (%r12)
leaq 0x49cd(%rip), %rdi      # 0xb7be
callq 0x51eb
testb %al, %al
je 0x6e0e
movq 0x8(%r14), %r13
movq %r13, (%r12)
testq %r14, %r14
setne %r15b
xorl %r14d, %r14d
jmp 0x6e33
callq 0x5fef
xorl %r15d, %r15d
movq %rax, %rdi
xorl %esi, %esi
callq 0x5c54
movq %rax, %r14
leaq 0x4994(%rip), %rdi      # 0xb7be
callq 0x5b5c
movq (%r12), %r13
movq %rbx, %rdi
callq 0x6dbb
cmpb $0x1, 0xc(%rax)
je 0x6e60
movq %rax, %rdi
movl %r14d, %esi
callq 0x9e11
movq %rax, %rbx
movb %r15b, 0xc(%rax)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x18(%r13), %rdi
leaq 0x5aa2(%rip), %rsi      # 0xc90d
xorl %eax, %eax
callq 0x487c
// File: /workspace/github_c_makefile_star2_O3/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 0x9eef
movq 0x10(%rbx), %r14
cmpl $0x9, (%r14)
jne 0x758a
leaq 0x8f66(%rip), %rax      # 0x10480
movq (%rax), %r12
callq 0x5bde
cmpl $0x9, (%r14)
jne 0x7599
movq %rax, %r15
addq $0x20, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x7577
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x2110
testl %eax, %eax
jne 0x752f
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movl $0x23, (%rax)
movq %r12, 0x8(%rax)
movq %rbx, 0x18(%rax)
movq %r14, 0x98(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x18(%r12), %rdi
leaq 0x5555(%rip), %rsi      # 0xcad8
xorl %eax, %eax
callq 0x487c
addq $0x10, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x225f
leaq 0x5547(%rip), %rdi      # 0xcae7
leaq 0x510a(%rip), %rsi      # 0xc6b1
leaq 0x5551(%rip), %rcx      # 0xcaff
movl $0x950, %edx            # imm = 0x950
callq 0x20d0
// File: /workspace/github_c_makefile_star2_O3/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 0x8dde(%rip), %rcx      # 0x10440
movq %rcx, (%rax)
movl 0x8dc5(%rip), %ecx      # 0x10430
movl %ecx, 0x2c(%rax)
movq %rax, 0x8dcb(%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_O3/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 0x8db1(%rip), %edx      # 0x10448
leal 0x1(%rdx), %eax
movl %eax, 0x8da8(%rip)      # 0x10448
leaq 0x52d7(%rip), %rsi      # 0xc97e
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 0x76e0
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_O3/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 0x477f(%rip), %rbx      # 0xc316
leaq 0x88e2(%rip), %r15      # 0x10480
leaq 0x4b0a(%rip), %r14      # 0xc6af
movq %rbx, %rdi
callq 0x51eb
testb %al, %al
je 0x7bc2
movq (%r15), %rax
movq 0x8(%rax), %rax
movq %rax, (%r15)
callq 0x7b8b
jmp 0x7bc7
callq 0x7be0
callq 0x4b2b
testb %al, %al
jne 0x7bda
movq %r14, %rdi
callq 0x5b5c
jmp 0x7ba5
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8414
movq %rdx, %r12
cmpq $0x0, 0x18(%rdx)
jle 0x844c
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 0x83b6
movq %rax, %rbx
incq %rbp
cmpq %rbp, 0x18(%r12)
jg 0x83e1
jmp 0x844c
leaq 0x8065(%rip), %rax      # 0x10480
movq (%rax), %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movl $0x22, (%rax)
movq %r12, 0x8(%rax)
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x8342
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_O3/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 0x84b7
movq %rsi, %r14
movq (%rsi), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x845e
movq %rax, %r15
movq 0x10(%r14), %r12
testq %r12, %r12
je 0x84d9
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 0x8536
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r14
movl $0x17, (%rax)
movq %rbx, 0x8(%rax)
movq %r15, 0x78(%rax)
jmp 0x852e
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 0x6651
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 0x9eef
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7eef(%rip), %rbx      # 0x10440
testq %rbx, %rbx
je 0x8590
movq %rdi, %r14
cmpq $0x0, 0x18(%rbx)
jne 0x8588
movq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x20b0
movslq 0x20(%r14), %rcx
cmpq %rcx, %rax
jne 0x8588
movq 0x18(%r14), %rsi
movq %r15, %rdi
movq %rax, %rdx
callq 0x2060
testl %eax, %eax
je 0x8592
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x8559
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7be0
movq %rax, %rbx
leaq 0x40fa(%rip), %rdi      # 0xc6af
callq 0x51eb
testb %al, %al
je 0x863c
leaq 0x7ebb(%rip), %r13      # 0x10480
leaq 0x40e3(%rip), %r14      # 0xc6af
movq (%r13), %rbp
movq 0x8(%rbp), %rax
movq %rax, (%r13)
movq 0x8(%rbx), %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %r15
movl $0x21, (%rax)
movq %r12, 0x8(%rax)
movq %rbx, 0x18(%rax)
callq 0x7be0
movq %rax, %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %rbx
movl $0x25, (%rax)
movq %rbp, 0x8(%rax)
movq %r15, 0x18(%rax)
movq %r12, 0x20(%rax)
movq %rax, %rdi
callq 0x9eef
movq %r14, %rdi
callq 0x51eb
testb %al, %al
jne 0x85cc
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7ddb(%rip), %rcx      # 0x10440
movq %rcx, (%rax)
movq 0x7dc9(%rip), %rcx      # 0x10438
movq %rcx, 0x8(%rax)
incl 0x7db7(%rip)            # 0x10430
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x71af(%rip), %rax      # 0x10480
movq (%rax), %r14
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2100
movq %rax, %rbx
movq %r14, 0x8(%rax)
movl $0x21, (%rax)
callq 0x859b
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x10, 0xc(%rax)
movl $0x10, %edi
movl $0x1, %esi
callq 0x2100
movq %rax, (%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x943a
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
movl %edi, %eax
cmpl $0x28, %ecx
ja 0x9475
movq %rdx, %rsi
movl %ecx, %edx
addq %r10, %rdx
addl $0x8, %ecx
movl %ecx, -0x80(%rsp)
jmp 0x947e
leaq 0x8(%rdx), %rsi
movq %rsi, -0x78(%rsp)
movl (%rdx), %r8d
leal (%r8,%rax), %edi
movq %rsi, %rdx
testl %r8d, %r8d
jne 0x945d
addq $0x58, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x94d6
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
movl %edi, %eax
cmpl $0x28, %ecx
ja 0x9513
movq %rdx, %rsi
movl %ecx, %edx
addq %r10, %rdx
addl $0x8, %ecx
movl %ecx, -0x80(%rsp)
jmp 0x951c
leaq 0x8(%rdx), %rsi
movq %rsi, -0x78(%rsp)
movl (%rdx), %r8d
leal (%r8,%rax), %edi
movq %rsi, %rdx
testl %r8d, %r8d
jne 0x94fb
addq $0x58, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x95d4
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
callq 0x9568
leaq 0x3824(%rip), %rdi      # 0xcdd0
movl $0xc, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x20c0
movl (%rbx), %eax
cmpl $0x14, %eax
je 0x95e2
cmpl $0x3, %eax
jne 0x95f9
movq 0x10(%rbx), %rsi
leaq 0x2d2d(%rip), %rdi      # 0xc2ff
jmp 0x960f
leaq 0x37e5(%rip), %rdi      # 0xcdc0
xorl %eax, %eax
jmp 0x20c0
movq 0x28(%rbx), %rsi
movl 0x30(%rbx), %edx
leaq 0x37f5(%rip), %rdi      # 0xcde5
xorl %eax, %eax
callq 0x20c0
jmp 0x9616
movq 0x18(%rbx), %rdi
movl 0x20(%rbx), %esi
callq 0x4ae3
leaq 0x3802(%rip), %rdi      # 0xce0e
movq %rax, %rsi
xorl %eax, %eax
callq 0x20c0
leaq 0x2f6c(%rip), %rdi      # 0xc589
popq %rbx
jmp 0x2070
// File: /workspace/github_c_makefile_star2_O3/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 0x963b
pushq %rbx
movq 0x8(%rdi), %rbx
callq 0x2030
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x9629
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14
xorl %ebx, %ebx
leaq 0x6a7c(%rip), %r13      # 0x10130
xorl %ebp, %ebp
movq (%rbp,%r13), %r12
movq %r12, %rdi
callq 0x20b0
movslq %eax, %r15
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2060
testl %eax, %eax
jne 0x96f0
movb (%r14,%r15), %al
cmpb $0x5f, %al
je 0x96f0
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
jb 0x96f0
andb $-0x21, %al
addb $-0x41, %al
cmpb $0x19, %al
ja 0x96ff
addq $0x10, %rbp
cmpq $0x190, %rbp            # imm = 0x190
jne 0x96b6
jmp 0x9705
addq %rbp, %r13
movq %r13, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x329e(%rip), %r14      # 0xc9c4
leaq 0x661b(%rip), %r15      # 0xfd48
movq %r14, %rdi
callq 0x20b0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2170
testl %eax, %eax
je 0x9757
movq (%r15), %r14
addq $0x8, %r15
testq %r14, %r14
jne 0x972d
xorl %eax, %eax
jmp 0x975f
movq %r14, %rdi
callq 0x20b0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2632(%rip), %rsi      # 0xc2f2
callq 0x21a0
movq %rax, %rbx
testq %rax, %rax
jne 0x9ced
callq 0x2050
movl (%rax), %edi
callq 0x21f0
leaq 0x3195(%rip), %rdi      # 0xce75
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 0x9d21
callq 0x2050
movl (%rax), %edi
callq 0x21f0
leaq 0x3174(%rip), %rdi      # 0xce88
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 0x9d5d
callq 0x2050
movl (%rax), %edi
callq 0x21f0
leaq 0x3138(%rip), %rdi      # 0xce88
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 0x9d8e
cmpb $0xa, -0x1(%r14,%r15)
je 0x9d96
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_O3/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
movl $0x9, (%rax)
movl $0x1, 0x8(%rax)
movb $0x1, 0xc(%rax)
popq %rcx
retq