// File: /workspace/github_c_makefile_star2_O1/Ihsoh[P]ilang/compiler/backend/semantics.c
// Function: print_type_node
static void _print_type_node(ParserASTNode *node, FILE *file) {
	assert(node);
	assert(file);

	switch (node->type) {
		case BE_NODE_TYPE_CHAR: {
			assert(node->nchilds == 0);
			fputs("char", file);
			break;
		}
		case BE_NODE_TYPE_INT8: {
			assert(node->nchilds == 0);
			fputs("int8", file);
			break;
		}
		case BE_NODE_TYPE_UINT8: {
			assert(node->nchilds == 0);
			fputs("uint8", file);
			break;
		}
		case BE_NODE_TYPE_INT16: {
			assert(node->nchilds == 0);
			fputs("int16", file);
			break;
		}
		case BE_NODE_TYPE_UINT16: {
			assert(node->nchilds == 0);
			fputs("uint16", file);
			break;
		}
		case BE_NODE_TYPE_INT32: {
			assert(node->nchilds == 0);
			fputs("int32", file);
			break;
		}
		case BE_NODE_TYPE_UINT32: {
			assert(node->nchilds == 0);
			fputs("uint32", file);
			break;
		}
		case BE_NODE_TYPE_INT64: {
			assert(node->nchilds == 0);
			fputs("int64", file);
			break;
		}
		case BE_NODE_TYPE_UINT64: {
			assert(node->nchilds == 0);
			fputs("uint64", file);
			break;
		}
		case BE_NODE_TYPE_FLOAT: {
			assert(node->nchilds == 0);
			fputs("float", file);
			break;
		}
		case BE_NODE_TYPE_DOUBLE: {
			assert(node->nchilds == 0);
			fputs("double", file);
			break;
		}
		case BE_NODE_TYPE_STRUCT: {
			assert(node->nchilds == 1);

			fputs("struct ", file);

			ParserASTNode *node_id = node->childs[0];
			assert(node_id->type == BE_NODE_IDENTIFIER);

			cmn_print_token(node_id->token, file);
			break;
		}
		case BE_NODE_TYPE_ARRAY: {
			assert(node->nchilds == 2);
			ParserASTNode *node_array_dims = node->childs[0];
			assert(node_array_dims->type == BE_NODE_TYPE_ARRAY_DIMS);
			ParserASTNode *node_t = node->childs[1];

			for (int i = 0; i < node_array_dims->nchilds; i++) {
				ParserASTNode *node_array_dim = node_array_dims->childs[i];
				assert(node_array_dim->type == BE_NODE_LITERAL_UINT);
				fputc('[', file);
				cmn_print_token(node_array_dim->token, file);
				fputc(']', file);
			}

			_print_type_node(node_t, file);

			break;
		}
		case BE_NODE_TYPE_FUNC: {
			assert(node->nchilds == 1 || node->nchilds == 2);
			ParserASTNode *node_params = NULL;
			ParserASTNode *node_t = NULL;

			node_params = node->childs[0];
			if (node->nchilds == 2) {
				node_t = node->childs[1];
			}

			_print_func_params(node_params, file);

			if (node_t != NULL) {
				fputc(':', file);
				_print_type_node(node_t, file);
			}
			break;
		}
		case BE_NODE_TYPE_POINTER: {
			assert(node->nchilds == 1);
			ParserASTNode *node_t = node->childs[0];

			fputc('*', file);

			_print_type_node(node_t, file);
			break;
		}
		case BE_NODE_TYPE_VOID: {
			assert(node->nchilds == 0);
			fputs("void", file);
			break;
		}
		default: {
			assert(0);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %r14, %r14
je 0x352d2
movl (%r14), %eax
cmpl $0x42f, %eax            # imm = 0x42F
jle 0x34ed9
cmpl $0x430, %eax            # imm = 0x430
je 0x34f5e
cmpl $0x440, %eax            # imm = 0x440
jne 0x350fa
cmpl $0x1, 0x44(%r14)
jne 0x3534e
movq 0x48(%r14), %rax
movq (%rax), %r14
movl $0x2a, %edi
jmp 0x350b8
cmpl $0x420, %eax            # imm = 0x420
jne 0x350c5
cmpl $0x2, 0x44(%r14)
jne 0x3532f
movq 0x48(%r14), %rax
movq (%rax), %r15
cmpl $0x421, (%r15)          # imm = 0x421
jne 0x35310
movq 0x8(%rax), %r14
cmpl $0x0, 0x44(%r15)
jle 0x34e94
xorl %r12d, %r12d
movq 0x48(%r15), %rax
movq (%rax,%r12,8), %r13
cmpl $0x300, (%r13)          # imm = 0x300
jne 0x35263
movl $0x5b, %edi
movq %rbx, %rsi
callq 0x30c0
movq 0x10(%r13), %rdi
movq %rbx, %rsi
callq 0x3c78
movl $0x5d, %edi
movq %rbx, %rsi
callq 0x30c0
incq %r12
movslq 0x44(%r15), %rax
cmpq %rax, %r12
jl 0x34f11
jmp 0x34e94
movl 0x44(%r14), %ecx
leal -0x1(%rcx), %eax
cmpl $0x2, %eax
jae 0x3536d
movq 0x48(%r14), %rax
cmpl $0x2, %ecx
jne 0x34f7d
movq 0x8(%rax), %r14
jmp 0x34f80
xorl %r14d, %r14d
movq (%rax), %r15
testq %r15, %r15
je 0x352f1
cmpl $0x0, 0x44(%r15)
jle 0x350aa
movq 0x48(%r15), %rax
movq (%rax), %rax
cmpl $0xa02, (%rax)          # imm = 0xA02
jne 0x353ab
cmpl $0x2, 0x44(%rax)
jne 0x353ca
movq 0x48(%rax), %rax
movq (%rax), %rcx
cmpl $0x200, (%rcx)          # imm = 0x200
jne 0x353d3
movq 0x8(%rax), %r13
movq 0x10(%rcx), %rdi
movq %rbx, %rsi
callq 0x3c78
leaq 0x1bf0f(%rip), %rdi     # 0x50eed
movq %rbx, %rsi
callq 0x30b0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x34e80
cmpl $0x2, 0x44(%r15)
jl 0x350aa
movl $0x1, %r12d
movq 0x48(%r15), %rax
movq (%rax,%r12,8), %r13
movl (%r13), %eax
andl $-0x2, %eax
cmpl $0xa02, %eax            # imm = 0xA02
jne 0x35282
leaq 0x1bf32(%rip), %rdi     # 0x50f55
movq %rbx, %rsi
callq 0x30b0
movl (%r13), %eax
cmpl $0xa02, %eax            # imm = 0xA02
je 0x35052
cmpl $0xa03, %eax            # imm = 0xA03
jne 0x352b3
leaq 0x1526e(%rip), %rdi     # 0x4a2b6
movq %rbx, %rsi
callq 0x30b0
jmp 0x3509a
cmpl $0x2, 0x44(%r13)
jne 0x352a1
movq 0x48(%r13), %rax
movq (%rax), %rcx
cmpl $0x200, (%rcx)          # imm = 0x200
jne 0x352aa
movq 0x8(%rax), %r13
movq 0x10(%rcx), %rdi
movq %rbx, %rsi
callq 0x3c78
leaq 0x1be66(%rip), %rdi     # 0x50eed
movq %rbx, %rsi
callq 0x30b0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x34e80
incq %r12
movslq 0x44(%r15), %rax
cmpq %rax, %r12
jl 0x35002
testq %r14, %r14
je 0x35254
movl $0x3a, %edi
movq %rbx, %rsi
callq 0x30c0
jmp 0x34e94
addl $0xfffffc00, %eax       # imm = 0xFFFFFC00
cmpl $0x10, %eax
ja 0x3538c
leaq 0x18f86(%rip), %rcx     # 0x4e060
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, 0x44(%r14)
jne 0x353f2
leaq 0x14e76(%rip), %rdi     # 0x49f6b
jmp 0x3523e
cmpl $0x4ff, %eax            # imm = 0x4FF
jne 0x3538c
cmpl $0x0, 0x44(%r14)
jne 0x35566
leaq 0x1bd73(%rip), %rdi     # 0x50e8a
jmp 0x3523e
cmpl $0x0, 0x44(%r14)
jne 0x35411
leaq 0x14e42(%rip), %rdi     # 0x49f70
jmp 0x3523e
cmpl $0x0, 0x44(%r14)
jne 0x35430
leaq 0x14e31(%rip), %rdi     # 0x49f76
jmp 0x3523e
cmpl $0x0, 0x44(%r14)
jne 0x3544f
leaq 0x14e2f(%rip), %rdi     # 0x49f8b
jmp 0x3523e
cmpl $0x0, 0x44(%r14)
jne 0x3546e
leaq 0x14e04(%rip), %rdi     # 0x49f77
jmp 0x3523e
cmpl $0x0, 0x44(%r14)
jne 0x3548d
leaq 0x14de7(%rip), %rdi     # 0x49f71
jmp 0x3523e
cmpl $0x0, 0x44(%r14)
jne 0x354ac
leaq 0x14ddc(%rip), %rdi     # 0x49f7d
jmp 0x3523e
cmpl $0x0, 0x44(%r14)
jne 0x354cb
leaq 0x14dcd(%rip), %rdi     # 0x49f85
jmp 0x3523e
cmpl $0x0, 0x44(%r14)
jne 0x354ea
leaq 0x14daf(%rip), %rdi     # 0x49f7e
jmp 0x3523e
cmpl $0x0, 0x44(%r14)
jne 0x35509
leaq 0x14da1(%rip), %rdi     # 0x49f84
jmp 0x3523e
cmpl $0x1, 0x44(%r14)
jne 0x35528
leaq 0x1bc8b(%rip), %rdi     # 0x50e82
movq %rbx, %rsi
callq 0x30b0
movq 0x48(%r14), %rax
movq (%rax), %rax
cmpl $0x200, (%rax)          # imm = 0x200
jne 0x35585
movq 0x10(%rax), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3c78
cmpl $0x0, 0x44(%r14)
jne 0x35547
leaq 0x14d53(%rip), %rdi     # 0x49f91
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x30b0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19336(%rip), %rdi     # 0x4e5a0
leaq 0x18eff(%rip), %rsi     # 0x4e170
leaq 0x1bbdb(%rip), %rcx     # 0x50e53
movl $0x18eb, %edx           # imm = 0x18EB
callq 0x30a0
leaq 0x1bc66(%rip), %rdi     # 0x50eef
leaq 0x18ee0(%rip), %rsi     # 0x4e170
leaq 0x1bbf8(%rip), %rcx     # 0x50e8f
movl $0x1891, %edx           # imm = 0x1891
callq 0x30a0
leaq 0x19370(%rip), %rdi     # 0x4e618
jmp 0x352ba
leaq 0xe523(%rip), %rdi      # 0x437d4
jmp 0x352ba
leaq 0xb0d3(%rip), %rdi      # 0x4038d
leaq 0x18eaf(%rip), %rsi     # 0x4e170
leaq 0x1bbc7(%rip), %rcx     # 0x50e8f
movl $0x1895, %edx           # imm = 0x1895
callq 0x30a0
leaq 0xdc72(%rip), %rdi      # 0x42f4b
leaq 0x18e90(%rip), %rsi     # 0x4e170
leaq 0x1bb6c(%rip), %rcx     # 0x50e53
movl $0x189d, %edx           # imm = 0x189D
callq 0x30a0
leaq 0xdc53(%rip), %rdi      # 0x42f4b
leaq 0x18e71(%rip), %rsi     # 0x4e170
leaq 0x1bb89(%rip), %rcx     # 0x50e8f
movl $0x186c, %edx           # imm = 0x186C
callq 0x30a0
leaq 0x19258(%rip), %rdi     # 0x4e56f
leaq 0x18e52(%rip), %rsi     # 0x4e170
leaq 0x1bb2e(%rip), %rcx     # 0x50e53
movl $0x18e6, %edx           # imm = 0x18E6
callq 0x30a0
leaq 0x192cf(%rip), %rdi     # 0x4e605
leaq 0x18e33(%rip), %rsi     # 0x4e170
leaq 0x1bb0f(%rip), %rcx     # 0x50e53
movl $0x18e4, %edx           # imm = 0x18E4
callq 0x30a0
leaq 0xe88c(%rip), %rdi      # 0x43be1
leaq 0x18e14(%rip), %rsi     # 0x4e170
leaq 0x1baf0(%rip), %rcx     # 0x50e53
movl $0x1908, %edx           # imm = 0x1908
callq 0x30a0
leaq 0x1927b(%rip), %rdi     # 0x4e5ef
leaq 0x18df5(%rip), %rsi     # 0x4e170
leaq 0x1bad1(%rip), %rcx     # 0x50e53
movl $0x18f6, %edx           # imm = 0x18F6
callq 0x30a0
leaq 0xaffa(%rip), %rdi      # 0x4038d
leaq 0x18dd6(%rip), %rsi     # 0x4e170
leaq 0x1bab2(%rip), %rcx     # 0x50e53
movl $0x1916, %edx           # imm = 0x1916
callq 0x30a0
leaq 0x1bb0e(%rip), %rdi     # 0x50ec0
leaq 0x18db7(%rip), %rsi     # 0x4e170
leaq 0x1bacf(%rip), %rcx     # 0x50e8f
movl $0x1871, %edx           # imm = 0x1871
callq 0x30a0
leaq 0x19247(%rip), %rdi     # 0x4e618
jmp 0x353da
leaq 0xe3fa(%rip), %rdi      # 0x437d4
leaq 0x18d8f(%rip), %rsi     # 0x4e170
leaq 0x1baa7(%rip), %rcx     # 0x50e8f
movl $0x188c, %edx           # imm = 0x188C
callq 0x30a0
leaq 0x19139(%rip), %rdi     # 0x4e532
leaq 0x18d70(%rip), %rsi     # 0x4e170
leaq 0x1ba4c(%rip), %rcx     # 0x50e53
movl $0x18a2, %edx           # imm = 0x18A2
callq 0x30a0
leaq 0x1911a(%rip), %rdi     # 0x4e532
leaq 0x18d51(%rip), %rsi     # 0x4e170
leaq 0x1ba2d(%rip), %rcx     # 0x50e53
movl $0x18ac, %edx           # imm = 0x18AC
callq 0x30a0
leaq 0x190fb(%rip), %rdi     # 0x4e532
leaq 0x18d32(%rip), %rsi     # 0x4e170
leaq 0x1ba0e(%rip), %rcx     # 0x50e53
movl $0x18b6, %edx           # imm = 0x18B6
callq 0x30a0
leaq 0x190dc(%rip), %rdi     # 0x4e532
leaq 0x18d13(%rip), %rsi     # 0x4e170
leaq 0x1b9ef(%rip), %rcx     # 0x50e53
movl $0x18cf, %edx           # imm = 0x18CF
callq 0x30a0
leaq 0x190bd(%rip), %rdi     # 0x4e532
leaq 0x18cf4(%rip), %rsi     # 0x4e170
leaq 0x1b9d0(%rip), %rcx     # 0x50e53
movl $0x18b1, %edx           # imm = 0x18B1
callq 0x30a0
leaq 0x1909e(%rip), %rdi     # 0x4e532
leaq 0x18cd5(%rip), %rsi     # 0x4e170
leaq 0x1b9b1(%rip), %rcx     # 0x50e53
movl $0x18a7, %edx           # imm = 0x18A7
callq 0x30a0
leaq 0x1907f(%rip), %rdi     # 0x4e532
leaq 0x18cb6(%rip), %rsi     # 0x4e170
leaq 0x1b992(%rip), %rcx     # 0x50e53
movl $0x18c0, %edx           # imm = 0x18C0
callq 0x30a0
leaq 0x19060(%rip), %rdi     # 0x4e532
leaq 0x18c97(%rip), %rsi     # 0x4e170
leaq 0x1b973(%rip), %rcx     # 0x50e53
movl $0x18c5, %edx           # imm = 0x18C5
callq 0x30a0
leaq 0x19041(%rip), %rdi     # 0x4e532
leaq 0x18c78(%rip), %rsi     # 0x4e170
leaq 0x1b954(%rip), %rcx     # 0x50e53
movl $0x18bb, %edx           # imm = 0x18BB
callq 0x30a0
leaq 0x19022(%rip), %rdi     # 0x4e532
leaq 0x18c59(%rip), %rsi     # 0x4e170
leaq 0x1b935(%rip), %rcx     # 0x50e53
movl $0x18ca, %edx           # imm = 0x18CA
callq 0x30a0
leaq 0xe6b2(%rip), %rdi      # 0x43be1
leaq 0x18c3a(%rip), %rsi     # 0x4e170
leaq 0x1b916(%rip), %rcx     # 0x50e53
movl $0x18d9, %edx           # imm = 0x18D9
callq 0x30a0
leaq 0x18fe4(%rip), %rdi     # 0x4e532
leaq 0x18c1b(%rip), %rsi     # 0x4e170
leaq 0x1b8f7(%rip), %rcx     # 0x50e53
movl $0x18d4, %edx           # imm = 0x18D4
callq 0x30a0
leaq 0x18fc5(%rip), %rdi     # 0x4e532
leaq 0x18bfc(%rip), %rsi     # 0x4e170
leaq 0x1b8d8(%rip), %rcx     # 0x50e53
movl $0x1911, %edx           # imm = 0x1911
callq 0x30a0
leaq 0xe248(%rip), %rdi      # 0x437d4
leaq 0x18bdd(%rip), %rsi     # 0x4e170
leaq 0x1b8b9(%rip), %rcx     # 0x50e53
movl $0x18de, %edx           # imm = 0x18DE
callq 0x30a0