// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x590ed
jmp 0x5910c
leaq 0x2706d(%rip), %rdi     # 0x80161
leaq 0x29785(%rip), %rsi     # 0x82880
movl $0x77b, %edx            # imm = 0x77B
leaq 0x2ac48(%rip), %rcx     # 0x83d4f
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x59115
jmp 0x59134
leaq 0x1f98d(%rip), %rdi     # 0x78aa9
leaq 0x2975d(%rip), %rsi     # 0x82880
movl $0x77c, %edx            # imm = 0x77C
leaq 0x2ac20(%rip), %rcx     # 0x83d4f
callq 0x30a0
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x59148
jmp 0x59167
leaq 0x2a940(%rip), %rdi     # 0x83a8f
leaq 0x2972a(%rip), %rsi     # 0x82880
movl $0x77d, %edx            # imm = 0x77D
leaq 0x2abed(%rip), %rcx     # 0x83d4f
callq 0x30a0
movq -0x18(%rbp), %rax
testb $0x1, 0x70(%rax)
je 0x59173
jmp 0x59192
leaq 0x2a934(%rip), %rdi     # 0x83aae
leaq 0x296ff(%rip), %rsi     # 0x82880
movl $0x77e, %edx            # imm = 0x77E
leaq 0x2abc2(%rip), %rcx     # 0x83d4f
callq 0x30a0
cmpq $0x0, -0x20(%rbp)
je 0x5919b
jmp 0x591ba
leaq 0x1f90f(%rip), %rdi     # 0x78ab1
leaq 0x296d7(%rip), %rsi     # 0x82880
movl $0x77f, %edx            # imm = 0x77F
leaq 0x2ab9a(%rip), %rcx     # 0x83d4f
callq 0x30a0
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x591ce
jmp 0x591ed
leaq 0x2a900(%rip), %rdi     # 0x83ad5
leaq 0x296a4(%rip), %rsi     # 0x82880
movl $0x780, %edx            # imm = 0x780
leaq 0x2ab67(%rip), %rcx     # 0x83d4f
callq 0x30a0
movq -0x20(%rbp), %rax
testb $0x1, 0x70(%rax)
je 0x591f9
jmp 0x59218
leaq 0x2a8f4(%rip), %rdi     # 0x83af4
leaq 0x29679(%rip), %rsi     # 0x82880
movl $0x781, %edx            # imm = 0x781
leaq 0x2ab3c(%rip), %rcx     # 0x83d4f
callq 0x30a0
movq -0x18(%rbp), %rax
movb 0x71(%rax), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %edi
callq 0x5a290
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movb 0x71(%rax), %al
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %edi
callq 0x5a290
movl %eax, -0x30(%rbp)
movzbl -0x21(%rbp), %edi
callq 0x4da00
testb $0x1, %al
jne 0x59253
jmp 0x5926b
movzbl -0x29(%rbp), %edi
callq 0x4da00
testb $0x1, %al
jne 0x59262
jmp 0x5926b
movb $0x5, -0x1(%rbp)
jmp 0x5934b
movzbl -0x21(%rbp), %edi
callq 0x4da50
testb $0x1, %al
jne 0x5927a
jmp 0x59292
movzbl -0x29(%rbp), %edi
callq 0x4da50
testb $0x1, %al
jne 0x59289
jmp 0x59292
movb $0x9, -0x1(%rbp)
jmp 0x5934b
movzbl -0x21(%rbp), %edi
callq 0x4da00
testb $0x1, %al
jne 0x592a1
jmp 0x592ca
movzbl -0x29(%rbp), %edi
callq 0x4da50
testb $0x1, %al
jne 0x592b0
jmp 0x592ca
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jle 0x592c1
movb $0x5, -0x1(%rbp)
jmp 0x5934b
movb $0x9, -0x1(%rbp)
jmp 0x5934b
movzbl -0x21(%rbp), %edi
callq 0x4da50
testb $0x1, %al
jne 0x592d9
jmp 0x592fc
movzbl -0x29(%rbp), %edi
callq 0x4da00
testb $0x1, %al
jne 0x592e8
jmp 0x592fc
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jle 0x592f6
movb $0x9, -0x1(%rbp)
jmp 0x5934b
movb $0x5, -0x1(%rbp)
jmp 0x5934b
movzbl -0x21(%rbp), %eax
cmpl $0xb, %eax
je 0x5930e
movzbl -0x29(%rbp), %eax
cmpl $0xb, %eax
jne 0x59314
movb $0xb, -0x1(%rbp)
jmp 0x5934b
movzbl -0x21(%rbp), %eax
cmpl $0xa, %eax
je 0x59326
movzbl -0x29(%rbp), %eax
cmpl $0xa, %eax
jne 0x5932c
movb $0xa, -0x1(%rbp)
jmp 0x5934b
leaq 0x1a127(%rip), %rdi     # 0x7345a
leaq 0x29546(%rip), %rsi     # 0x82880
movl $0x7a0, %edx            # imm = 0x7A0
leaq 0x2aa09(%rip), %rcx     # 0x83d4f
callq 0x30a0
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)