// File: /workspace/github_c_makefile_star2_O0/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
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x60379
jmp 0x60398
leaq 0x161dc(%rip), %rdi     # 0x7655c
leaq 0x224f9(%rip), %rsi     # 0x82880
movl $0x189d, %edx           # imm = 0x189D
leaq 0x2555b(%rip), %rcx     # 0x858ee
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x603a1
jmp 0x603c0
leaq 0x126bb(%rip), %rdi     # 0x72a63
leaq 0x224d1(%rip), %rsi     # 0x82880
movl $0x189e, %edx           # imm = 0x189E
leaq 0x25533(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x54(%rbp)
subl $0x400, %eax            # imm = 0x400
je 0x604c9
jmp 0x603d6
movl -0x54(%rbp), %eax
subl $0x401, %eax            # imm = 0x401
je 0x60509
jmp 0x603e6
movl -0x54(%rbp), %eax
subl $0x402, %eax            # imm = 0x402
je 0x60589
jmp 0x603f6
movl -0x54(%rbp), %eax
subl $0x403, %eax            # imm = 0x403
je 0x60609
jmp 0x60406
movl -0x54(%rbp), %eax
subl $0x404, %eax            # imm = 0x404
je 0x60689
jmp 0x60416
movl -0x54(%rbp), %eax
subl $0x405, %eax            # imm = 0x405
je 0x60549
jmp 0x60426
movl -0x54(%rbp), %eax
subl $0x406, %eax            # imm = 0x406
je 0x605c9
jmp 0x60436
movl -0x54(%rbp), %eax
subl $0x407, %eax            # imm = 0x407
je 0x60649
jmp 0x60446
movl -0x54(%rbp), %eax
subl $0x408, %eax            # imm = 0x408
je 0x606c9
jmp 0x60456
movl -0x54(%rbp), %eax
subl $0x409, %eax            # imm = 0x409
je 0x60709
jmp 0x60466
movl -0x54(%rbp), %eax
subl $0x40a, %eax            # imm = 0x40A
je 0x60749
jmp 0x60476
movl -0x54(%rbp), %eax
subl $0x410, %eax            # imm = 0x410
je 0x60789
jmp 0x60486
movl -0x54(%rbp), %eax
subl $0x420, %eax            # imm = 0x420
je 0x60816
jmp 0x60496
movl -0x54(%rbp), %eax
subl $0x430, %eax            # imm = 0x430
je 0x6092e
jmp 0x604a6
movl -0x54(%rbp), %eax
subl $0x440, %eax            # imm = 0x440
je 0x609d0
jmp 0x604b6
movl -0x54(%rbp), %eax
subl $0x4ff, %eax            # imm = 0x4FF
je 0x60a27
jmp 0x60a64
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x604d5
jmp 0x604f4
leaq 0x22795(%rip), %rdi     # 0x82c71
leaq 0x2239d(%rip), %rsi     # 0x82880
movl $0x18a2, %edx           # imm = 0x18A2
leaq 0x253ff(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
leaq 0x1e2a8(%rip), %rdi     # 0x7e7a7
callq 0x30b0
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x60515
jmp 0x60534
leaq 0x22755(%rip), %rdi     # 0x82c71
leaq 0x2235d(%rip), %rsi     # 0x82880
movl $0x18a7, %edx           # imm = 0x18A7
leaq 0x253bf(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
leaq 0x1e26e(%rip), %rdi     # 0x7e7ad
callq 0x30b0
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x60555
jmp 0x60574
leaq 0x22715(%rip), %rdi     # 0x82c71
leaq 0x2231d(%rip), %rsi     # 0x82880
movl $0x18ac, %edx           # imm = 0x18AC
leaq 0x2537f(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
leaq 0x1e22d(%rip), %rdi     # 0x7e7ac
callq 0x30b0
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x60595
jmp 0x605b4
leaq 0x226d5(%rip), %rdi     # 0x82c71
leaq 0x222dd(%rip), %rsi     # 0x82880
movl $0x18b1, %edx           # imm = 0x18B1
leaq 0x2533f(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
leaq 0x1e1f4(%rip), %rdi     # 0x7e7b3
callq 0x30b0
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x605d5
jmp 0x605f4
leaq 0x22695(%rip), %rdi     # 0x82c71
leaq 0x2229d(%rip), %rsi     # 0x82880
movl $0x18b6, %edx           # imm = 0x18B6
leaq 0x252ff(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
leaq 0x1e1b3(%rip), %rdi     # 0x7e7b2
callq 0x30b0
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x60615
jmp 0x60634
leaq 0x22655(%rip), %rdi     # 0x82c71
leaq 0x2225d(%rip), %rsi     # 0x82880
movl $0x18bb, %edx           # imm = 0x18BB
leaq 0x252bf(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
leaq 0x1e17b(%rip), %rdi     # 0x7e7ba
callq 0x30b0
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x60655
jmp 0x60674
leaq 0x22615(%rip), %rdi     # 0x82c71
leaq 0x2221d(%rip), %rsi     # 0x82880
movl $0x18c0, %edx           # imm = 0x18C0
leaq 0x2527f(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
leaq 0x1e13a(%rip), %rdi     # 0x7e7b9
callq 0x30b0
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x60695
jmp 0x606b4
leaq 0x225d5(%rip), %rdi     # 0x82c71
leaq 0x221dd(%rip), %rsi     # 0x82880
movl $0x18c5, %edx           # imm = 0x18C5
leaq 0x2523f(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
leaq 0x1e102(%rip), %rdi     # 0x7e7c1
callq 0x30b0
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x606d5
jmp 0x606f4
leaq 0x22595(%rip), %rdi     # 0x82c71
leaq 0x2219d(%rip), %rsi     # 0x82880
movl $0x18ca, %edx           # imm = 0x18CA
leaq 0x251ff(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
leaq 0x1e0c1(%rip), %rdi     # 0x7e7c0
callq 0x30b0
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x60715
jmp 0x60734
leaq 0x22555(%rip), %rdi     # 0x82c71
leaq 0x2215d(%rip), %rsi     # 0x82880
movl $0x18cf, %edx           # imm = 0x18CF
leaq 0x251bf(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
leaq 0x1e088(%rip), %rdi     # 0x7e7c7
callq 0x30b0
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x60755
jmp 0x60774
leaq 0x22515(%rip), %rdi     # 0x82c71
leaq 0x2211d(%rip), %rsi     # 0x82880
movl $0x18d4, %edx           # imm = 0x18D4
leaq 0x2517f(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
leaq 0x1e04e(%rip), %rdi     # 0x7e7cd
callq 0x30b0
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x1, 0x44(%rax)
jne 0x60795
jmp 0x607b4
leaq 0x16c72(%rip), %rdi     # 0x7740e
leaq 0x220dd(%rip), %rsi     # 0x82880
movl $0x18d9, %edx           # imm = 0x18D9
leaq 0x2513f(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
leaq 0x2515e(%rip), %rdi     # 0x8591d
callq 0x30b0
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x200, (%rax)          # imm = 0x200
jne 0x607e1
jmp 0x60800
leaq 0x167ba(%rip), %rdi     # 0x76fa2
leaq 0x22091(%rip), %rsi     # 0x82880
movl $0x18de, %edx           # imm = 0x18DE
leaq 0x250f3(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x3e80
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x60822
jmp 0x60841
leaq 0x2251b(%rip), %rdi     # 0x82d44
leaq 0x22050(%rip), %rsi     # 0x82880
movl $0x18e4, %edx           # imm = 0x18E4
leaq 0x250b2(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x421, (%rax)          # imm = 0x421
jne 0x6085e
jmp 0x6087d
leaq 0x22449(%rip), %rdi     # 0x82cae
leaq 0x22014(%rip), %rsi     # 0x82880
movl $0x18e6, %edx           # imm = 0x18E6
leaq 0x25076(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jge 0x6091c
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x300, (%rax)          # imm = 0x300
jne 0x608c2
jmp 0x608e1
leaq 0x22416(%rip), %rdi     # 0x82cdf
leaq 0x21fb0(%rip), %rsi     # 0x82880
movl $0x18eb, %edx           # imm = 0x18EB
leaq 0x25012(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
movl $0x5b, %edi
callq 0x30d0
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x3e80
movq -0x10(%rbp), %rsi
movl $0x5d, %edi
callq 0x30d0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x60894
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x60360
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x1, 0x44(%rax)
je 0x60942
movq -0x8(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x60944
jmp 0x60963
leaq 0x223e3(%rip), %rdi     # 0x82d2e
leaq 0x21f2e(%rip), %rsi     # 0x82880
movl $0x18f6, %edx           # imm = 0x18F6
leaq 0x24f90(%rip), %rcx     # 0x858ee
callq 0x30a0
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x6099c
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x60a90
cmpq $0x0, -0x48(%rbp)
je 0x609cb
movq -0x10(%rbp), %rsi
movl $0x3a, %edi
callq 0x30d0
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x60360
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x1, 0x44(%rax)
jne 0x609dc
jmp 0x609fb
leaq 0x16a2b(%rip), %rdi     # 0x7740e
leaq 0x21e96(%rip), %rsi     # 0x82880
movl $0x1908, %edx           # imm = 0x1908
leaq 0x24ef8(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rsi
movl $0x2a, %edi
callq 0x30d0
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x60360
jmp 0x60a83
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x60a33
jmp 0x60a52
leaq 0x22237(%rip), %rdi     # 0x82c71
leaq 0x21e3f(%rip), %rsi     # 0x82880
movl $0x1911, %edx           # imm = 0x1911
leaq 0x24ea1(%rip), %rcx     # 0x858ee
callq 0x30a0
movq -0x10(%rbp), %rsi
leaq 0x24ec8(%rip), %rdi     # 0x85925
callq 0x30b0
jmp 0x60a83
leaq 0x129ef(%rip), %rdi     # 0x7345a
leaq 0x21e0e(%rip), %rsi     # 0x82880
movl $0x1916, %edx           # imm = 0x1916
leaq 0x24e70(%rip), %rcx     # 0x858ee
callq 0x30a0
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)