// File: /workspace/github_c_makefile_star2_O1/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
leaq 0xae7b(%rip), %rsi      # 0xe00c
leaq 0xae7b(%rip), %r15      # 0xe013
leaq 0xc153(%rip), %r12      # 0xf2f2
leaq 0xae93(%rip), %r13      # 0xe039
leaq 0xaea1(%rip), %rbp      # 0xe04e
movq 0xff3c(%rip), %rax      # 0x130f0
cmpl $0x4, 0x8(%rax)
jne 0x3321
movq 0x10(%rax), %rdi
callq 0xd952
testl %eax, %eax
je 0x3321
movq 0xff1a(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x31e5
movq (%rax), %rax
movq %rax, 0xff0b(%rip)      # 0x130f0
movq %r15, %rdi
callq 0x37ff
movq 0x10(%rax), %r14
movq 0xfef8(%rip), %rdi      # 0x130f0
leaq 0xc653(%rip), %rsi      # 0xf852
callq 0xda40
testb %al, %al
je 0x3294
movq %r14, 0x10(%rsp)
movq 0xfed8(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x3227
movq (%rax), %rax
movq %rax, 0xfec9(%rip)      # 0x130f0
xorl %eax, %eax
callq 0x307c
movq %rax, %r14
movq 0xfeb8(%rip), %rdi      # 0x130f0
movq %r12, %rsi
callq 0xda40
testb %al, %al
jne 0x32bc
movq %r13, %rdi
callq 0x37ff
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x30b6
movq 0xfe91(%rip), %rdi      # 0x130f0
movq %rbp, %rsi
callq 0xda40
movq 0xfe82(%rip), %rdi      # 0x130f0
testb %al, %al
je 0x3283
testq %rdi, %rdi
je 0x3231
movq (%rdi), %rax
movq %rax, 0xfe6f(%rip)      # 0x130f0
jmp 0x3231
movq %r12, %rsi
callq 0xda40
testb %al, %al
jne 0x3231
jmp 0x37c7
callq 0x38df
movq %rax, %rbx
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
leaq 0xad52(%rip), %rsi      # 0xe00c
jmp 0x330b
leaq 0xad49(%rip), %rbx      # 0xe00c
movq 0xfe26(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x32d9
movq (%rax), %rax
movq %rax, 0xfe17(%rip)      # 0x130f0
callq 0x38df
movq %rax, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %rbx, %rsi
leaq 0xad08(%rip), %r15      # 0xe013
movq 0xfdd6(%rip), %rcx      # 0x130e8
movq %rcx, (%rax)
movq %rax, 0xfdcc(%rip)      # 0x130e8
jmp 0x31ad
movq 0xfdc8(%rip), %rax      # 0x130f0
cmpl $0x4, 0x8(%rax)
jne 0x33a5
movq 0x10(%rax), %rdi
leaq 0xace5(%rip), %rsi      # 0xe01e
callq 0xd952
testl %eax, %eax
je 0x33a5
movq 0xfda7(%rip), %rax      # 0x130f0
movq 0x18(%rax), %rdx
movq 0xfda4(%rip), %rsi      # 0x130f8
leaq 0xad01(%rip), %rdi      # 0xe05c
xorl %eax, %eax
callq 0xd7f2
movq %rax, %rdi
callq 0xce5d
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq 0xfd77(%rip), %rax      # 0x130f0
movq (%rax), %rax
movq %rcx, %rdx
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0x337c
movq %rax, (%rdx)
movq 0x8(%rsp), %rax
movq %rax, 0xfd5a(%rip)      # 0x130f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xfd44(%rip), %rax      # 0x130f0
cmpl $0x4, 0x8(%rax)
jne 0x33f6
movq 0x10(%rax), %rdi
leaq 0xac69(%rip), %rsi      # 0xe026
callq 0xd952
testl %eax, %eax
je 0x33f6
movq 0xfd23(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x33dc
movq (%rax), %rax
movq %rax, 0xfd14(%rip)      # 0x130f0
leaq 0xac30(%rip), %rdi      # 0xe013
callq 0x37ff
movq %rax, %rdi
callq 0x383d
testb %al, %al
jne 0x3396
jmp 0x3449
movq 0xfcf3(%rip), %rax      # 0x130f0
cmpl $0x4, 0x8(%rax)
jne 0x345c
movq 0x10(%rax), %rdi
leaq 0xac1e(%rip), %rsi      # 0xe02c
callq 0xd952
testl %eax, %eax
je 0x345c
movq 0xfcd2(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x342d
movq (%rax), %rax
movq %rax, 0xfcc3(%rip)      # 0x130f0
leaq 0xabdf(%rip), %rdi      # 0xe013
callq 0x37ff
movq %rax, %rdi
callq 0x383d
testb %al, %al
je 0x3396
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x387b
movq 0xfc8d(%rip), %rax      # 0x130f0
cmpl $0x4, 0x8(%rax)
jne 0x3495
movq 0x10(%rax), %rdi
leaq 0xabbf(%rip), %rsi      # 0xe033
callq 0xd952
testl %eax, %eax
je 0x3495
movq 0xfc6c(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x3396
movq (%rax), %rax
jmp 0x338f
movq 0xfc54(%rip), %rdi      # 0x130f0
callq 0x383d
testb %al, %al
je 0x3665
leaq 0xab63(%rip), %rdi      # 0xe013
callq 0x37ff
movq 0x10(%rax), %rbp
movq 0xfc30(%rip), %rdi      # 0x130f0
testq %rdi, %rdi
je 0x36c6
leaq 0xc382(%rip), %rsi      # 0xf852
callq 0xda40
testb %al, %al
je 0x36c6
movq 0xfc0c(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x34f3
movq (%rax), %rax
movq %rax, 0xfbfd(%rip)      # 0x130f0
xorl %eax, %eax
callq 0x307c
movq %rax, %r14
movq 0xfbec(%rip), %rdi      # 0x130f0
leaq 0xbde7(%rip), %rsi      # 0xf2f2
callq 0xda40
testb %al, %al
jne 0x3620
leaq 0xbdd3(%rip), %r15      # 0xf2f2
leaq 0xab28(%rip), %r12      # 0xe04e
leaq 0x8(%rsp), %r13
movq $0x0, 0x8(%rsp)
movq 0xfbb5(%rip), %rdi      # 0x130f0
movq %r15, %rsi
callq 0xda40
testb %al, %al
jne 0x35c1
movq 0xfba2(%rip), %rdi      # 0x130f0
movq %r12, %rsi
callq 0xda40
testb %al, %al
jne 0x35c1
movq 0xfb8f(%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 %r13, %rdx
movq %rdx, %rcx
movq (%rdx), %rdx
testq %rdx, %rdx
jne 0x3598
movq %rax, (%rcx)
movq 0xfb43(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x3534
movq (%rax), %rax
movq %rax, 0xfb34(%rip)      # 0x130f0
jmp 0x3534
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x30b6
movq 0xfb1b(%rip), %rdi      # 0x130f0
movq %r12, %rsi
callq 0xda40
movq 0xfb0c(%rip), %rdi      # 0x130f0
testb %al, %al
je 0x35f9
testq %rdi, %rdi
je 0x3609
movq (%rdi), %rax
movq %rax, 0xfaf9(%rip)      # 0x130f0
jmp 0x3609
movq %r15, %rsi
callq 0xda40
testb %al, %al
je 0x37c7
movq 0xfae0(%rip), %rdi      # 0x130f0
movq %r15, %rsi
callq 0xda40
testb %al, %al
je 0x352b
movq 0xfac9(%rip), %rax      # 0x130f0
testq %rax, %rax
je 0x3636
movq (%rax), %rax
movq %rax, 0xfaba(%rip)      # 0x130f0
movq 0xfaab(%rip), %r12      # 0x130e8
xorl %r15d, %r15d
testq %r12, %r12
je 0x36ed
movq 0x8(%r12), %rsi
movq %rbp, %rdi
callq 0xd952
testl %eax, %eax
je 0x365f
movq 0x18(%r12), %r15
movq (%r12), %r12
jmp 0x3640
movq 0xfa84(%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 0xfa59(%rip), %rcx      # 0x13100
movq %rcx, %rdx
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0x36a7
movq %rax, (%rdx)
testq %rbx, %rbx
je 0x3396
movq (%rbx), %rax
jmp 0x338f
movq %rbp, %rdi
callq 0x3951
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq 0xfa13(%rip), %rax      # 0x130f0
movq %rcx, %rdx
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0x36dd
jmp 0x3387
testq %r15, %r15
je 0x37ee
movq %rbp, 0x10(%rsp)
movq 0x10(%r15), %r12
testq %r12, %r12
je 0x3741
movq (%r15), %r15
movq (%r14), %r13
xorl %ebp, %ebp
xorl %ebx, %ebx
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %r14
movq (%r15,%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, %r12
jne 0x370e
jmp 0x3744
xorl %r14d, %r14d
movq 0x10(%rsp), %rdi
callq 0x3951
movq 0xf993(%rip), %r15      # 0x130e8
movq 0xf994(%rip), %rbx      # 0x130f0
movq 0xf99d(%rip), %r12      # 0x13100
movq %r14, 0xf97e(%rip)      # 0x130e8
movq %rax, 0xf97f(%rip)      # 0x130f0
movq $0x0, 0xf984(%rip) # 0x13100
testq %rax, %rax
je 0x3790
callq 0x317c
cmpq $0x0, 0xf962(%rip)      # 0x130f0
jne 0x3781
movq 0xf969(%rip), %rcx      # 0x13100
leaq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq %r15, 0xf942(%rip)      # 0x130e8
movq %rbx, 0xf943(%rip)      # 0x130f0
movq %r12, 0xf94c(%rip)      # 0x13100
movq %rax, %rcx
movq (%rax), %rax
testq %rax, %rax
jne 0x37b4
movq %rbx, (%rcx)
jmp 0x338a
movq 0xf922(%rip), %rbx      # 0x130f0
leaq 0xa87b(%rip), %rdi      # 0xe050
leaq 0xa86d(%rip), %rsi      # 0xe049
xorl %eax, %eax
callq 0xd7f2
movq %rbx, %rdi
movq %rax, %rsi
callq 0xce4d
leaq 0xa86d(%rip), %rdi      # 0xe062
movq %rbp, %rsi
xorl %eax, %eax
callq 0xd8b8