// File: /workspace/github_c_makefile_star2_O2/Ihsoh[P]ilang/compiler/backend/semantics.c
// Function: get_binary_constexpr_type
static uint8_t _get_binary_constexpr_type(
	ParserContext *ctx,
	ParserASTNode *source1,
	ParserASTNode *source2
) {
	assert(ctx);
	assert(source1);
	assert(BE_IS_EXPR_NODE(source1->type));
	assert(BE_EXPR_AST_NODE_GET_CONSTANT(source1));
	assert(source2);
	assert(BE_IS_EXPR_NODE(source2->type));
	assert(BE_EXPR_AST_NODE_GET_CONSTANT(source2));

	uint8_t source1_type = BE_EXPR_AST_NODE_GET_CONSTANT_TYPE(source1);
	int32_t source1_type_weight = _get_primitive_type_weight(source1_type);

	uint8_t source2_type = BE_EXPR_AST_NODE_GET_CONSTANT_TYPE(source2);
	int32_t source2_type_weight = _get_primitive_type_weight(source2_type);

	if (_is_signed_type(source1_type) && _is_signed_type(source2_type)) {
		return BE_TYPE_INT64;
	} else if (_is_unsigned_type(source1_type) && _is_unsigned_type(source2_type)) {
		return BE_TYPE_UINT64;
	} else if (_is_signed_type(source1_type) && _is_unsigned_type(source2_type)) {
		if (source1_type_weight > source2_type_weight) {
			return BE_TYPE_INT64;
		} else {
			return BE_TYPE_UINT64;
		}
	} else if (_is_unsigned_type(source1_type) && _is_signed_type(source2_type)) {
		if (source1_type_weight > source2_type_weight) {
			return BE_TYPE_UINT64;
		} else {
			return BE_TYPE_INT64;
		}
	} else if (source1_type == BE_TYPE_DOUBLE
			|| source2_type == BE_TYPE_DOUBLE) {
		return BE_TYPE_DOUBLE;
	} else if (source1_type == BE_TYPE_FLOAT
			|| source2_type == BE_TYPE_FLOAT) {
		return BE_TYPE_FLOAT;
	} else {
		assert(0);
		return BE_TYPE_UNKNOWN;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movzbl 0x1(%rdi), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x2fb4e
cmpb $0x0, 0x70(%rdi)
je 0x2fb6d
movq %rsi, %r14
movzbl 0x1(%rsi), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x2fb8c
cmpb $0x0, 0x70(%r14)
je 0x2fbab
movb 0x71(%rdi), %r12b
movzbl %r12b, %r15d
movl %r15d, %edi
callq 0x301db
movl %eax, %ebx
movb 0x71(%r14), %r14b
movzbl %r14b, %edi
callq 0x301db
decb %r15b
cmpb $0x4, %r15b
ja 0x2faec
leal -0x1(%r14), %edx
movb $0x5, %cl
cmpb $0x5, %dl
jb 0x2fb43
leal -0x6(%r14), %ecx
cmpb $0x3, %cl
ja 0x2fb17
cmpl %eax, %ebx
setbe %cl
jmp 0x2fb0f
leal -0x6(%r12), %ecx
cmpb $0x3, %cl
ja 0x2fb17
leal -0x6(%r14), %edx
movb $0x9, %cl
cmpb $0x4, %dl
jb 0x2fb43
leal -0x1(%r14), %ecx
cmpb $0x4, %cl
ja 0x2fb17
cmpl %eax, %ebx
seta %cl
shlb $0x2, %cl
addb $0x5, %cl
jmp 0x2fb43
cmpb $0xb, %r12b
sete %al
cmpb $0xb, %r14b
sete %cl
orb %al, %cl
movb $0xb, %cl
jne 0x2fb43
cmpb $0xa, %r12b
sete %al
cmpb $0xa, %r14b
sete %cl
orb %al, %cl
movb $0xa, %cl
je 0x2fbca
movl %ecx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1a7c3(%rip), %rdi     # 0x4a318
leaq 0x19614(%rip), %rsi     # 0x49170
leaq 0x1aa75(%rip), %rcx     # 0x4a5d8
movl $0x77d, %edx            # imm = 0x77D
callq 0x30a0
leaq 0x1a7c3(%rip), %rdi     # 0x4a337
leaq 0x195f5(%rip), %rsi     # 0x49170
leaq 0x1aa56(%rip), %rcx     # 0x4a5d8
movl $0x77e, %edx            # imm = 0x77E
callq 0x30a0
leaq 0x1a7cb(%rip), %rdi     # 0x4a35e
leaq 0x195d6(%rip), %rsi     # 0x49170
leaq 0x1aa37(%rip), %rcx     # 0x4a5d8
movl $0x780, %edx            # imm = 0x780
callq 0x30a0
leaq 0x1a7cb(%rip), %rdi     # 0x4a37d
leaq 0x195b7(%rip), %rsi     # 0x49170
leaq 0x1aa18(%rip), %rcx     # 0x4a5d8
movl $0x781, %edx            # imm = 0x781
callq 0x30a0
leaq 0xb798(%rip), %rdi      # 0x3b369
leaq 0x19598(%rip), %rsi     # 0x49170
leaq 0x1a9f9(%rip), %rcx     # 0x4a5d8
movl $0x7a0, %edx            # imm = 0x7A0
callq 0x30a0