// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/cpp.c
// Function: traverse
static void traverse(void) {
  if (input->tag == TDIRECTIVE && streq(input->ident, "define")) {
    consume();
    read_define(expect("macro name", TIDENT)->ident);
    traverse();
  } else if (input->tag == TDIRECTIVE && streq(input->ident, "include")) {
    Token* included = lex(include_path(input->str));
    append(&included, input->next);
    input = included;
  } else if (input->tag == TDIRECTIVE && streq(input->ident, "ifdef")) {
    consume();
    Token* tag = expect("macro name", TIDENT);
    if (!is_macro(tag)) {
      skip_to_endif();
    }
  } else if (input->tag == TDIRECTIVE && streq(input->ident, "ifndef")) {
    consume();
    Token* tag = expect("macro name", TIDENT);
    if (is_macro(tag)) {
      skip_to_endif();
    }
  } else if (input->tag == TDIRECTIVE && streq(input->ident, "endif")) {
    consume();
  } else if (is_macro(input)) {
    // TODO: 関数マクロの仮引数名と実引数が同じだと無限ループする
    char* name = expect("macro name", TIDENT)->ident;
    apply(name);
  } else {
    Token* new = copy_token(input);
    append(&output, new);
    consume();
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0xff63(%rip), %rdi      # 0x130f0
cmpl $0x4, 0x8(%rdi)
jne 0x346c
leaq 0xc12e(%rip), %r12      # 0xf2cc
leaq 0xae94(%rip), %r13      # 0xe039
leaq 0xaea2(%rip), %rbp      # 0xe04e
movq 0x10(%rdi), %rdi
leaq 0xae55(%rip), %rsi      # 0xe00c
callq 0xd9ca
movq 0xff2d(%rip), %rdi      # 0x130f0
testl %eax, %eax
je 0x331c
testq %rdi, %rdi
je 0x31da
movq (%rdi), %rax
movq %rax, 0xff16(%rip)      # 0x130f0
leaq 0xae32(%rip), %rdi      # 0xe013
callq 0x3854
movq 0x10(%rax), %rbx
movq 0xfeff(%rip), %rdi      # 0x130f0
leaq 0xc636(%rip), %rsi      # 0xf82e
callq 0xdab0
testb %al, %al
je 0x329b
movq 0xfee4(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x321b
movq (%rax), %rax
movq %rax, 0xfed5(%rip)      # 0x130f0
xorl %eax, %eax
callq 0x307c
movq %rax, %r14
movq 0xfec4(%rip), %rdi      # 0x130f0
movq %r12, %rsi
callq 0xdab0
testb %al, %al
jne 0x32bc
movq %r13, %rdi
callq 0x3854
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x30ae
movq 0xfe99(%rip), %rdi      # 0x130f0
movq %rbp, %rsi
callq 0xdab0
movq 0xfe8a(%rip), %rdi      # 0x130f0
testb %al, %al
je 0x327b
testq %rdi, %rdi
je 0x3293
movq (%rdi), %r15
movq %r15, 0xfe77(%rip)      # 0x130f0
jmp 0x3296
movq %r12, %rsi
callq 0xdab0
movq 0xfe66(%rip), %r15      # 0x130f0
testb %al, %al
jne 0x3296
jmp 0x3809
xorl %r15d, %r15d
movq %r15, %rdi
jmp 0x322c
callq 0x3921
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rbx, 0x8(%rax)
movq %r14, 0x10(%rax)
jmp 0x32f5
movq 0xfe2d(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x32d2
movq (%rax), %rax
movq %rax, 0xfe1e(%rip)      # 0x130f0
callq 0x3921
movq %rax, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rbx, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movq 0xfdec(%rip), %rcx      # 0x130e8
movq %rcx, (%rax)
movq %rax, 0xfde2(%rip)      # 0x130e8
movq 0xfde3(%rip), %rdi      # 0x130f0
cmpl $0x4, 0x8(%rdi)
je 0x31ac
jmp 0x346c
cmpl $0x4, 0x8(%rdi)
jne 0x346c
movq 0x10(%rdi), %rdi
leaq 0xaced(%rip), %rsi      # 0xe01e
callq 0xd9ca
movq 0xfdb3(%rip), %rdi      # 0x130f0
testl %eax, %eax
je 0x338a
movq 0x18(%rdi), %rdx
movq 0xfdac(%rip), %rsi      # 0x130f8
leaq 0xad09(%rip), %rdi      # 0xe05c
xorl %eax, %eax
callq 0xd86a
movq %rax, %rdi
callq 0xcd11
movq %rax, 0x8(%rsp)
movq 0xfd82(%rip), %rcx      # 0x130f0
movq (%rcx), %rcx
testq %rax, %rax
je 0x373b
movq %rax, %rdx
movq (%rax), %rax
testq %rax, %rax
jne 0x337a
jmp 0x3740
cmpl $0x4, 0x8(%rdi)
jne 0x346c
movq 0x10(%rdi), %rdi
leaq 0xac87(%rip), %rsi      # 0xe026
callq 0xd9ca
movq 0xfd45(%rip), %rdi      # 0x130f0
testl %eax, %eax
je 0x33ed
testq %rdi, %rdi
je 0x33be
movq (%rdi), %rax
movq %rax, 0xfd32(%rip)      # 0x130f0
leaq 0xac4e(%rip), %rdi      # 0xe013
callq 0x3854
movq %rax, %rdi
callq 0x388d
testb %al, %al
jne 0x37fa
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x38c9
cmpl $0x4, 0x8(%rdi)
jne 0x346c
movq 0x10(%rdi), %rdi
leaq 0xac2e(%rip), %rsi      # 0xe02c
callq 0xd9ca
movq 0xfce6(%rip), %rdi      # 0x130f0
testl %eax, %eax
je 0x343a
testq %rdi, %rdi
je 0x341d
movq (%rdi), %rax
movq %rax, 0xfcd3(%rip)      # 0x130f0
leaq 0xabef(%rip), %rdi      # 0xe013
callq 0x3854
movq %rax, %rdi
callq 0x388d
testb %al, %al
jne 0x33da
jmp 0x37fa
cmpl $0x4, 0x8(%rdi)
jne 0x346c
movq 0x10(%rdi), %rdi
leaq 0xabe8(%rip), %rsi      # 0xe033
callq 0xd9ca
movq 0xfc99(%rip), %rdi      # 0x130f0
testl %eax, %eax
je 0x346c
testq %rdi, %rdi
je 0x37fa
movq (%rdi), %rax
jmp 0x37f3
callq 0x388d
testb %al, %al
je 0x36b4
leaq 0xab93(%rip), %rdi      # 0xe013
callq 0x3854
movq 0x10(%rax), %rbx
movq 0xfc60(%rip), %rdi      # 0x130f0
testq %rdi, %rdi
je 0x3715
leaq 0xc38e(%rip), %rsi      # 0xf82e
callq 0xdab0
testb %al, %al
je 0x3715
movq %rbx, 0x10(%rsp)
movq 0xfc37(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x34c8
movq (%rax), %rax
movq %rax, 0xfc28(%rip)      # 0x130f0
xorl %eax, %eax
callq 0x307c
movq %rax, %r14
movq 0xfc17(%rip), %rdi      # 0x130f0
leaq 0xbdec(%rip), %rsi      # 0xf2cc
callq 0xdab0
testb %al, %al
jne 0x3612
leaq 0xbdd8(%rip), %r15      # 0xf2cc
leaq 0xab53(%rip), %r12      # 0xe04e
leaq 0x8(%rsp), %rbp
movq $0x0, 0x8(%rsp)
movq 0xfbe0(%rip), %rdi      # 0x130f0
movq %r15, %rsi
callq 0xdab0
testb %al, %al
je 0x3523
xorl %esi, %esi
jmp 0x35b1
movq 0xfbc6(%rip), %rdi      # 0x130f0
movq %r12, %rsi
callq 0xdab0
testb %al, %al
jne 0x35ac
movq 0xfbb3(%rip), %rbx      # 0x130f0
movl $0x1, %edi
movl $0x38, %esi
callq 0x20f0
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups %xmm0, (%rax)
movups %xmm1, 0x10(%rax)
movups %xmm2, 0x20(%rax)
movq 0x30(%rbx), %rcx
movq %rcx, 0x30(%rax)
movq $0x0, (%rax)
movq %rbp, %rdx
movq %rdx, %rcx
movq (%rdx), %rdx
testq %rdx, %rdx
jne 0x3574
movq %rax, (%rcx)
movq 0xfb67(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x359a
movq (%rax), %rdi
movq %rdi, 0xfb58(%rip)      # 0x130f0
jmp 0x359c
xorl %edi, %edi
movq %r15, %rsi
callq 0xdab0
testb %al, %al
je 0x3523
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x30ae
movq 0xfb30(%rip), %rdi      # 0x130f0
movq %r12, %rsi
callq 0xdab0
movq 0xfb21(%rip), %rdi      # 0x130f0
testb %al, %al
je 0x35e4
testq %rdi, %rdi
je 0x35fc
movq (%rdi), %r13
movq %r13, 0xfb0e(%rip)      # 0x130f0
jmp 0x35ff
movq %r15, %rsi
callq 0xdab0
movq 0xfafd(%rip), %r13      # 0x130f0
testb %al, %al
jne 0x35ff
jmp 0x3829
xorl %r13d, %r13d
movq %r13, %rdi
movq %r15, %rsi
callq 0xdab0
testb %al, %al
je 0x3500
movq 0xfad7(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x3628
movq (%rax), %rax
movq %rax, 0xfac8(%rip)      # 0x130f0
movq 0xfab9(%rip), %r15      # 0x130e8
testq %r15, %r15
movq 0x10(%rsp), %rbx
je 0x3843
xorl %r12d, %r12d
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0xd9ca
testl %eax, %eax
je 0x3654
movq 0x18(%r15), %r12
movq (%r15), %r15
testq %r15, %r15
jne 0x3640
testq %r12, %r12
je 0x3843
movq 0x10(%r12), %r15
testq %r15, %r15
je 0x3748
movq (%r12), %r12
movq (%r14), %r13
xorl %ebp, %ebp
xorl %ebx, %ebx
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %r14
movq (%r12,%rbp,8), %rax
movq %rax, 0x8(%r14)
movq (%r13,%rbp,8), %rax
movq %rax, 0x10(%r14)
movq %rbx, (%r14)
incq %rbp
movq %r14, %rbx
cmpq %rbp, %r15
jne 0x367e
jmp 0x374b
movq 0xfa35(%rip), %rbx      # 0x130f0
movl $0x1, %edi
movl $0x38, %esi
callq 0x20f0
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups %xmm0, (%rax)
movups %xmm1, 0x10(%rax)
movups %xmm2, 0x20(%rax)
movq 0x30(%rbx), %rcx
movq %rcx, 0x30(%rax)
movq $0x0, (%rax)
leaq 0xfa0a(%rip), %rcx      # 0x13100
movq %rcx, %rdx
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0x36f6
movq %rax, (%rdx)
testq %rbx, %rbx
je 0x37fa
movq (%rbx), %rax
jmp 0x37f3
movq %rbx, %rdi
callq 0x3987
movq %rax, 0x8(%rsp)
movq 0xf9c7(%rip), %rcx      # 0x130f0
testq %rax, %rax
je 0x373b
movq %rax, %rdx
movq (%rax), %rax
testq %rax, %rax
jne 0x372e
jmp 0x3740
leaq 0x8(%rsp), %rdx
movq %rcx, (%rdx)
jmp 0x37ee
xorl %r14d, %r14d
movq 0x10(%rsp), %rdi
callq 0x3987
movq 0xf98c(%rip), %r12      # 0x130e8
movq 0xf98d(%rip), %rbx      # 0x130f0
movq 0xf996(%rip), %r15      # 0x13100
movq %r14, 0xf977(%rip)      # 0x130e8
movq %rax, 0xf978(%rip)      # 0x130f0
movq $0x0, 0xf97d(%rip) # 0x13100
testq %rax, %rax
je 0x37ca
callq 0x3178
cmpq $0x0, 0xf95b(%rip)      # 0x130f0
jne 0x3788
movq 0xf962(%rip), %rcx      # 0x13100
movq %rcx, 0x8(%rsp)
movq %r12, 0xf93e(%rip)      # 0x130e8
movq %rbx, 0xf93f(%rip)      # 0x130f0
movq %r15, 0xf948(%rip)      # 0x13100
testq %rcx, %rcx
je 0x37e6
movq %rcx, %rax
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0x37bd
jmp 0x37eb
leaq 0x8(%rsp), %rax
movq $0x0, (%rax)
movq %r12, 0xf90b(%rip)      # 0x130e8
movq %r15, 0xf91c(%rip)      # 0x13100
jmp 0x37eb
leaq 0x8(%rsp), %rax
movq %rbx, (%rax)
movq 0x8(%rsp), %rax
movq %rax, 0xf8f6(%rip)      # 0x130f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa840(%rip), %rdi      # 0xe050
leaq 0xa832(%rip), %rsi      # 0xe049
xorl %eax, %eax
callq 0xd86a
movq %r15, %rdi
movq %rax, %rsi
callq 0xcd01
leaq 0xa820(%rip), %rdi      # 0xe050
leaq 0xa812(%rip), %rsi      # 0xe049
xorl %eax, %eax
callq 0xd86a
movq %r13, %rdi
jmp 0x3821
leaq 0xa818(%rip), %rdi      # 0xe062
movq %rbx, %rsi
xorl %eax, %eax
callq 0xd930