// File: /workspace/github_c_makefile_star2_O2/hikalium[P]compilium/ast.c
// Function: PrintASTNodeSub
static void PrintASTNodeSub(struct Node *n, int depth) {
  if (!n) {
    fprintf(stderr, "(null)");
    return;
  }
  if (IsToken(n)) {
    PrintTokenBrief(n);
    return;
  }
  if (n->type == kASTList) {
    fprintf(stderr, "[");
    if (GetSizeOfList(n) == 0) {
      fprintf(stderr, "]");
      return;
    }
    for (int i = 0; i < GetSizeOfList(n); i++) {
      fprintf(stderr, "%s\n", i ? "," : "");
      PrintPadding(depth + 1);
      PrintASTNodeSub(GetNodeAt(n, i), depth + 1);
    }
    fprintf(stderr, "\n");
    PrintPadding(depth);
    fprintf(stderr, "]");
    return;
  } else if (n->type == kASTStructSpec) {
    fprintf(stderr, "StructSpec: ");
    PrintASTNodeSub(n->struct_member_dict, depth);
    return;
  } else if (n->type == kASTKeyValue) {
    fprintf(stderr, "%s: ", n->key);
    PrintASTNodeSub(n->value, depth);
    return;
  } else if (n->type == kNodeStructMember) {
    fprintf(stderr, "Member +%d: ", n->struct_member_ent_ofs);
    PrintASTNodeSub(n->struct_member_ent_type, depth);
    return;
  } else if (n->type == kNodeMacroReplacement) {
    fprintf(stderr, "MacroReplacement<args: ");
    PrintASTNodeSub(n->arg_expr_list, depth);
    fprintf(stderr, ", rep: ");
    PrintTokenSequence(n->value);
    fprintf(stderr, ">");
    return;
  } else if (n->type == kTypeBase) {
    PrintTokenStrToFile(n->op, stderr);
    return;
  } else if (n->type == kTypeLValue) {
    fprintf(stderr, "lvalue<");
    PrintASTNodeSub(n->right, depth);
    fprintf(stderr, ">");
    return;
  } else if (n->type == kTypePointer) {
    fprintf(stderr, "pointer_of<");
    PrintASTNodeSub(n->right, depth);
    fprintf(stderr, ">");
    return;
  } else if (n->type == kTypeFunction) {
    fprintf(stderr, "function<returns: ");
    PrintASTNodeSub(n->left, depth);
    fprintf(stderr, ", args: ");
    PrintASTNodeSub(n->right, depth);
    fprintf(stderr, ">");
    return;
  } else if (n->type == kTypeStruct) {
    fprintf(stderr, "struct<tag: ");
    PrintASTNodeSub(n->tag, depth);
    if (!n->type_struct_spec) {
      fprintf(stderr, ", incomplete");
    }
    fprintf(stderr, ">");
    return;
  } else if (n->type == kTypeArray) {
    fprintf(stderr, "array_of<");
    PrintASTNodeSub(n->type_array_type_of, depth);
    fprintf(stderr, ">[");
    PrintASTNodeSub(n->type_array_index_decl, depth);
    fprintf(stderr, "]");
    return;
  } else if (n->type == kTypeAttrIdent) {
    fputc('`', stderr);
    PrintTokenStrToFile(n->left, stderr);
    fputc('`', stderr);
    fprintf(stderr, " has a type: ");
    PrintASTNodeSub(n->right, depth);
    return;
  } else if (n->type == kASTFuncDef) {
    fprintf(stderr, "FuncDef ");
    PrintASTNodeSub(n->func_name_token, depth);
    fprintf(stderr, " : ");
    PrintASTNodeSub(n->func_type, depth);
    fprintf(stderr, "{\n");
    PrintPadding(depth + 1);
    PrintASTNodeSub(n->func_body, depth + 1);
    fprintf(stderr, "\n");
    PrintPadding(depth);
    fprintf(stderr, "}");
    return;
  } else if (n->type == kASTExprStmt) {
    PrintASTNodeSub(n->left, depth);
    fprintf(stderr, ";");
    return;
  } else if (n->type == kASTExprFuncCall) {
    fprintf(stderr, "FuncCall<");
    PrintASTNodeSub(n->func_expr, depth);
    fprintf(stderr, ">(");
    PrintASTNodeSub(n->arg_expr_list, depth);
    fprintf(stderr, ")");
    return;
  }
  fprintf(stderr, "(op=");
  if (n->op) PrintTokenBrief(n->op);
  if (n->expr_type) {
    fprintf(stderr, ":");
    PrintASTNodeSub(n->expr_type, depth + 1);
  }
  if (n->reg) fprintf(stderr, " reg: %d", n->reg);
  if (n->cond) {
    fprintf(stderr, " cond=");
    PrintASTNodeSub(n->cond, depth + 1);
  }
  if (n->left) {
    fprintf(stderr, " L=");
    PrintASTNodeSub(n->left, depth + 1);
  }
  if (n->right) {
    fprintf(stderr, " R=");
    PrintASTNodeSub(n->right, depth + 1);
  }
  fprintf(stderr, ")");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r12d
movq %rdi, %r14
leaq 0x7d29(%rip), %rbp      # 0xb2f4
leaq 0x7f45(%rip), %rbx      # 0xb517
pushq $0x70
popq %r13
leaq 0x90a7(%rip), %r15      # 0xc684
testq %r14, %r14
je 0x3afb
movq %r14, %rdi
callq 0x86a8
testb %al, %al
jne 0x37c5
movl (%r14), %eax
addl $-0x2, %eax
cmpl $0x18, %eax
ja 0x3a68
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
jmpq *%rax
movq 0xd9e2(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
movl 0x80(%r14), %edx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2110
movq %r13, %rax
jmp 0x36d2
movq %r13, %r15
movq %rbx, %r13
movq %r12, %rbx
movq 0xd9b6(%rip), %r12      # 0x10ff8
movq (%r12), %rsi
pushq $0x60
popq %rdi
callq 0x20d0
movq 0x18(%r14), %rdi
movq (%r12), %rsi
callq 0x8990
movq (%r12), %rsi
pushq $0x60
popq %rdi
callq 0x20d0
movq (%r12), %rcx
movq %rbx, %r12
movq %r13, %rbx
movq %r15, %r13
leaq 0x9009(%rip), %r15      # 0xc684
leaq 0x7f19(%rip), %rdi      # 0xb59b
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
callq 0x21b0
pushq $0x20
jmp 0x36d1
movq 0xd960(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
movq 0x98(%r14), %rdx
movq %r15, %rsi
xorl %eax, %eax
callq 0x2110
movl $0xa0, %eax
jmp 0x36d2
movq 0xd93e(%rip), %rax      # 0x10ff8
movq (%rax), %rcx
leaq 0x7e46(%rip), %rdi      # 0xb50a
pushq $0xc
popq %rsi
pushq $0x1
popq %rdx
callq 0x21b0
pushq $0x68
popq %rax
movq (%r14,%rax), %r14
jmp 0x35dd
movq 0x18(%r14), %rdi
movl %r12d, %esi
callq 0x35b3
movq 0xd90a(%rip), %rax      # 0x10ff8
movq (%rax), %rsi
pushq $0x3b
jmp 0x3ae7
movq 0xd8f9(%rip), %rbx      # 0x10ff8
movq (%rbx), %rsi
pushq $0x5b
popq %rdi
callq 0x20d0
movq %r14, %rdi
callq 0x3fb7
testl %eax, %eax
je 0x37bb
movq %r12, (%rsp)
leal 0x1(%r12), %ebx
leaq 0x7b8a(%rip), %r15      # 0xb2b4
leaq 0x8902(%rip), %r12      # 0xc033
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x3fb7
movq 0xd8b6(%rip), %r13      # 0x10ff8
movq (%r13), %rsi
cmpl %eax, %ebp
jge 0x37a4
testl %ebp, %ebp
leaq 0x7ac7(%rip), %rdx      # 0xb21a
cmoveq %r15, %rdx
movq %rsi, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x2110
movl %ebx, %edi
callq 0x3bcb
movq %r14, %rdi
movl %ebp, %esi
callq 0x3fdf
movq %rax, %rdi
movl %ebx, %esi
callq 0x35b3
incl %ebp
jmp 0x3733
movq 0x10(%r14), %rdi
movq 0xd86a(%rip), %rax      # 0x10ff8
movq (%rax), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8990
pushq $0xa
popq %rdi
callq 0x20d0
movq (%rsp), %rdi
callq 0x3bcb
movq (%r13), %rsi
jmp 0x37be
movq (%rbx), %rsi
pushq $0x5d
jmp 0x3ae7
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8935
movq 0xd816(%rip), %r13      # 0x10ff8
movq (%r13), %rcx
leaq 0x7d6b(%rip), %rdi      # 0xb558
pushq $0x12
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x21b0
movq 0x18(%r14), %rdi
movl %r12d, %esi
callq 0x35b3
movq (%r13), %rcx
leaq 0x7d59(%rip), %rdi      # 0xb56b
pushq $0x8
popq %rsi
movq %rbx, %rdx
callq 0x21b0
movq 0x20(%r14), %rdi
movl %r12d, %esi
callq 0x35b3
jmp 0x3a60
movq 0xd7c3(%rip), %r13      # 0x10ff8
movq (%r13), %rcx
leaq 0x7d69(%rip), %rdi      # 0xb5a9
pushq $0x8
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x21b0
movq 0xe0(%r14), %rdi
movl %r12d, %esi
callq 0x35b3
movq (%r13), %rcx
leaq 0x7d4a(%rip), %rdi      # 0xb5b2
pushq $0x3
popq %rsi
movq %rbx, %rdx
callq 0x21b0
movq 0xd8(%r14), %rdi
movl %r12d, %esi
callq 0x35b3
movq (%r13), %rcx
leaq 0x7d29(%rip), %rdi      # 0xb5b6
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x21b0
leal 0x1(%r12), %ebx
movl %ebx, %edi
callq 0x3bcb
movq 0xd0(%r14), %rdi
movl %ebx, %esi
callq 0x35b3
movq (%r13), %rsi
pushq $0xa
popq %rdi
callq 0x20d0
movl %r12d, %edi
callq 0x3bcb
movq (%r13), %rsi
pushq $0x7d
jmp 0x3ae7
movq 0xd720(%rip), %r13      # 0x10ff8
movq (%r13), %rcx
leaq 0x7cd6(%rip), %rdi      # 0xb5b9
pushq $0x9
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x21b0
movq 0xb0(%r14), %rdi
movl %r12d, %esi
callq 0x35b3
movq (%r13), %rcx
leaq 0x7cb8(%rip), %rdi      # 0xb5c3
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x21b0
movq 0xb8(%r14), %rdi
movl %r12d, %esi
callq 0x35b3
jmp 0x3ae1
movq %r12, %rbx
movq 0xd6c4(%rip), %r12      # 0x10ff8
movq (%r12), %rcx
leaq 0x7c05(%rip), %rdi      # 0xb544
pushq $0x7
jmp 0x3a0c
movq 0xd6ab(%rip), %r13      # 0x10ff8
movq (%r13), %rcx
leaq 0x7bcc(%rip), %rdi      # 0xb524
pushq $0x17
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x21b0
movq 0xb8(%r14), %rdi
movl %r12d, %esi
callq 0x35b3
movq (%r13), %rcx
leaq 0x7bbc(%rip), %rdi      # 0xb53c
pushq $0x7
popq %rsi
movq %rbx, %rdx
callq 0x21b0
movq 0xa0(%r14), %rdi
callq 0x882a
jmp 0x3a60
movq 0xd655(%rip), %r13      # 0x10ff8
movq (%r13), %rcx
leaq 0x7be0(%rip), %rdi      # 0xb58e
pushq $0x9
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x21b0
movq 0xf8(%r14), %rdi
movl %r12d, %esi
callq 0x35b3
movq (%r13), %rcx
leaq 0x7bc2(%rip), %rdi      # 0xb598
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x21b0
movq 0x100(%r14), %rdi
movl %r12d, %esi
callq 0x35b3
jmp 0x37b5
movq %r12, %rbx
movq 0xd5f9(%rip), %r12      # 0x10ff8
movq (%r12), %rcx
leaq 0x7b42(%rip), %rdi      # 0xb54c
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
callq 0x21b0
movq 0x20(%r14), %rdi
movl %ebx, %esi
callq 0x35b3
movq (%r12), %rsi
jmp 0x3a64
movq 0xd5cb(%rip), %r13      # 0x10ff8
movq (%r13), %rcx
leaq 0x7b3c(%rip), %rdi      # 0xb574
pushq $0xc
popq %rsi
pushq $0x1
popq %rdx
callq 0x21b0
movq 0xe8(%r14), %rdi
movl %r12d, %esi
callq 0x35b3
cmpq $0x0, 0xf0(%r14)
je 0x3b25
movq (%r13), %rsi
pushq $0x3e
jmp 0x3ae7
movq 0xd589(%rip), %r13      # 0x10ff8
movq (%r13), %rcx
leaq 0x7b4c(%rip), %rdi      # 0xb5c6
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
callq 0x21b0
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x3a93
callq 0x8935
cmpq $0x0, 0x8(%r14)
je 0x3ab4
movq (%r13), %rsi
pushq $0x3a
popq %rdi
callq 0x20d0
movq 0x8(%r14), %rdi
leal 0x1(%r12), %esi
callq 0x35b3
movl 0x4(%r14), %edx
testl %edx, %edx
jne 0x3b40
cmpq $0x0, 0x30(%r14)
jne 0x3b57
cmpq $0x0, 0x18(%r14)
jne 0x3b80
cmpq $0x0, 0x20(%r14)
jne 0x3ba9
movq (%r13), %rsi
pushq $0x29
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20d0
movq 0xd4f6(%rip), %rax      # 0x10ff8
movq (%rax), %rcx
leaq 0x79f7(%rip), %rdi      # 0xb503
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21b0
movq (%r13), %rcx
leaq 0x7a51(%rip), %rdi      # 0xb581
pushq $0xc
popq %rsi
pushq $0x1
popq %rdx
callq 0x21b0
jmp 0x3a60
movq (%r13), %rdi
leaq 0x7a80(%rip), %rsi      # 0xb5cb
xorl %eax, %eax
callq 0x2110
jmp 0x3ac0
movq (%r13), %rcx
leaq 0x7a72(%rip), %rdi      # 0xb5d4
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
callq 0x21b0
movq 0x30(%r14), %rdi
leal 0x1(%r12), %esi
callq 0x35b3
jmp 0x3acb
movq (%r13), %rcx
leaq 0x7a50(%rip), %rdi      # 0xb5db
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
callq 0x21b0
movq 0x18(%r14), %rdi
leal 0x1(%r12), %esi
callq 0x35b3
jmp 0x3ad6
movq (%r13), %rcx
leaq 0x7a2b(%rip), %rdi      # 0xb5df
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
callq 0x21b0
movq 0x20(%r14), %rdi
incl %r12d
jmp 0x391d