// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/frontend/parser.c
// Function: print_ast
static void _print_ast(ParserASTNode *node, FILE *file, int level, char padchr) {
	assert(node);
	assert(file);
	assert(level >= 0);

	for (int i = 0; i < level; i++) {
		fputc(padchr, file);
	}

	fprintf(
		file,
		"@%s#%x#%p#%p",
		node->type_name != NULL ? node->type_name : "N/A",
		node->type,
		node->parent,
		node
	);
	if (node->token != NULL) {
		fputc('(', file);
		for (int i = 0; i < node->token->len; i++) {
			fputc(*(node->token->content + i), file);
		}
		fprintf(file, "#%x)", node->token->type);
	}
	fputc('\n', file);

	for (int i = 0; i < node->nchilds; i++) {
		_print_ast(node->childs[i], file, level + 1, padchr);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movb %al, -0x15(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x426d1
jmp 0x426f0
leaq 0x338fb(%rip), %rdi     # 0x75fd3
leaq 0x3974d(%rip), %rsi     # 0x7be2c
movl $0x8cc, %edx            # imm = 0x8CC
leaq 0x3b092(%rip), %rcx     # 0x7d77d
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x426f9
jmp 0x42718
leaq 0x2f364(%rip), %rdi     # 0x71a64
leaq 0x39725(%rip), %rsi     # 0x7be2c
movl $0x8cd, %edx            # imm = 0x8CD
leaq 0x3b06a(%rip), %rcx     # 0x7d77d
callq 0x30a0
cmpl $0x0, -0x14(%rbp)
jl 0x42720
jmp 0x4273f
leaq 0x3b08a(%rip), %rdi     # 0x7d7b1
leaq 0x396fe(%rip), %rsi     # 0x7be2c
movl $0x8ce, %edx            # imm = 0x8CE
leaq 0x3b043(%rip), %rcx     # 0x7d77d
callq 0x30a0
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x42766
movsbl -0x15(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x30d0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x42746
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x42787
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x42794
leaq 0x3b03b(%rip), %rax     # 0x7d7c9
movq %rax, -0x38(%rbp)
jmp 0x42794
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %r9
leaq 0x3b007(%rip), %rsi     # 0x7d7bc
movb $0x0, %al
callq 0x30f0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x42830
movq -0x10(%rbp), %rsi
movl $0x28, %edi
callq 0x30d0
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpl 0x4(%rcx), %eax
jge 0x42814
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %edi
movq -0x10(%rbp), %rsi
callq 0x30d0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x427dc
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %edx
leaq 0x3afa4(%rip), %rsi     # 0x7d7cd
movb $0x0, %al
callq 0x30f0
movq -0x10(%rbp), %rsi
movl $0xa, %edi
callq 0x30d0
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jge 0x4287f
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0x1, %edx
movsbl -0x15(%rbp), %ecx
callq 0x426b0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x42845
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)