// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/backend/semantics.c
// Function: get_type_by_type_node
static uint8_t _get_type_by_type_node(
	ParserContext *ctx,
	ParserASTNode *node
) {
	assert(ctx);
	assert(node);

	switch (node->type) {
		case BE_NODE_TYPE_CHAR: {
			return BE_TYPE_CHAR;
		}
		case BE_NODE_TYPE_INT8: {
			return BE_TYPE_INT8;
		}
		case BE_NODE_TYPE_UINT8: {
			return BE_TYPE_UINT8;
		}
		case BE_NODE_TYPE_INT16: {
			return BE_TYPE_INT16;
		}
		case BE_NODE_TYPE_UINT16: {
			return BE_TYPE_UINT16;
		}
		case BE_NODE_TYPE_INT32: {
			return BE_TYPE_INT32;
		}
		case BE_NODE_TYPE_UINT32: {
			return BE_TYPE_UINT32;
		}
		case BE_NODE_TYPE_INT64: {
			return BE_TYPE_INT64;
		}
		case BE_NODE_TYPE_UINT64: {
			return BE_TYPE_UINT64;
		}
		case BE_NODE_TYPE_FLOAT: {
			return BE_TYPE_FLOAT;
		}
		case BE_NODE_TYPE_DOUBLE: {
			return BE_TYPE_DOUBLE;
		}
		case BE_NODE_TYPE_VA_LIST: {
			return BE_TYPE_VA_LIST;
		}
		case BE_NODE_TYPE_STRUCT: {
			return BE_TYPE_STRUCT;
		}
		case BE_NODE_TYPE_ARRAY: {
			return BE_TYPE_ARRAY;
		}
		case BE_NODE_TYPE_FUNC: {
			return BE_TYPE_FUNC;
		}
		case BE_NODE_TYPE_POINTER: {
			return BE_TYPE_POINTER;
		}
		case BE_NODE_TYPE_VOID: {
			return BE_TYPE_VOID;
		}
		default: {
			assert(0);
		}
	}

	return BE_TYPE_UNKNOWN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x56579
jmp 0x56598
leaq 0x29be1(%rip), %rdi     # 0x80161
leaq 0x2c2f9(%rip), %rsi     # 0x82880
movl $0xb4, %edx
leaq 0x2d097(%rip), %rcx     # 0x8362a
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x565a1
jmp 0x565c0
leaq 0x1ffb4(%rip), %rdi     # 0x7655c
leaq 0x2c2d1(%rip), %rsi     # 0x82880
movl $0xb5, %edx
leaq 0x2d06f(%rip), %rcx     # 0x8362a
callq 0x30a0
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
subl $0x400, %eax            # imm = 0x400
je 0x566c2
jmp 0x565d6
movl -0x1c(%rbp), %eax
subl $0x401, %eax            # imm = 0x401
je 0x566c8
jmp 0x565e6
movl -0x1c(%rbp), %eax
subl $0x402, %eax            # imm = 0x402
je 0x566d4
jmp 0x565f6
movl -0x1c(%rbp), %eax
subl $0x403, %eax            # imm = 0x403
je 0x566e0
jmp 0x56606
movl -0x1c(%rbp), %eax
subl $0x404, %eax            # imm = 0x404
je 0x566ec
jmp 0x56616
movl -0x1c(%rbp), %eax
subl $0x405, %eax            # imm = 0x405
je 0x566ce
jmp 0x56626
movl -0x1c(%rbp), %eax
subl $0x406, %eax            # imm = 0x406
je 0x566da
jmp 0x56636
movl -0x1c(%rbp), %eax
subl $0x407, %eax            # imm = 0x407
je 0x566e6
jmp 0x56646
movl -0x1c(%rbp), %eax
subl $0x408, %eax            # imm = 0x408
je 0x566f2
jmp 0x56656
movl -0x1c(%rbp), %eax
subl $0x409, %eax            # imm = 0x409
je 0x566f8
jmp 0x56666
movl -0x1c(%rbp), %eax
subl $0x40a, %eax            # imm = 0x40A
je 0x566fe
jmp 0x56676
movl -0x1c(%rbp), %eax
subl $0x40b, %eax            # imm = 0x40B
je 0x56704
jmp 0x56686
movl -0x1c(%rbp), %eax
subl $0x410, %eax            # imm = 0x410
je 0x5670a
jmp 0x56692
movl -0x1c(%rbp), %eax
subl $0x420, %eax            # imm = 0x420
je 0x56710
jmp 0x5669e
movl -0x1c(%rbp), %eax
subl $0x430, %eax            # imm = 0x430
je 0x56716
jmp 0x566aa
movl -0x1c(%rbp), %eax
subl $0x440, %eax            # imm = 0x440
je 0x5671c
jmp 0x566b6
movl -0x1c(%rbp), %eax
subl $0x4ff, %eax            # imm = 0x4FF
je 0x56722
jmp 0x56728
movb $0x1, -0x1(%rbp)
jmp 0x56747
movb $0x2, -0x1(%rbp)
jmp 0x56747
movb $0x6, -0x1(%rbp)
jmp 0x56747
movb $0x3, -0x1(%rbp)
jmp 0x56747
movb $0x7, -0x1(%rbp)
jmp 0x56747
movb $0x4, -0x1(%rbp)
jmp 0x56747
movb $0x8, -0x1(%rbp)
jmp 0x56747
movb $0x5, -0x1(%rbp)
jmp 0x56747
movb $0x9, -0x1(%rbp)
jmp 0x56747
movb $0xa, -0x1(%rbp)
jmp 0x56747
movb $0xb, -0x1(%rbp)
jmp 0x56747
movb $0xc, -0x1(%rbp)
jmp 0x56747
movb $0xd, -0x1(%rbp)
jmp 0x56747
movb $0xe, -0x1(%rbp)
jmp 0x56747
movb $0xf, -0x1(%rbp)
jmp 0x56747
movb $0x10, -0x1(%rbp)
jmp 0x56747
movb $-0x1, -0x1(%rbp)
jmp 0x56747
leaq 0x1cd2b(%rip), %rdi     # 0x7345a
leaq 0x2c14a(%rip), %rsi     # 0x82880
movl $0xec, %edx
leaq 0x2cee8(%rip), %rcx     # 0x8362a
callq 0x30a0
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq