// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/frontend/semantics.c
// Function: check_expr_add_operands
static void _check_expr_add_operands(
	ParserContext *ctx,
	ParserASTNode *node,
	ParserASTNode *node_oprd1,
	ParserASTNode *node_oprd2,
	const char *operator,
	bool set_type
) {
	assert(ctx);
	assert(node);
	assert(node_oprd1);
	assert(node_oprd2);
	assert(operator);

	if (_is_pointer_type_node(ctx, node_oprd1) && _is_integer_type_node(ctx, node_oprd2)) {
		if (set_type) {
			FE_EXPR_AST_NODE_COPY(node, node_oprd1);
		}
	} else if (_is_number_type_node(ctx, node_oprd1) && _is_number_type_node(ctx, node_oprd2)) {
		if (set_type) {
			int32_t weight_oprd1_type = _get_primitive_type_weight_by_expr_node(ctx, node_oprd1);
			int32_t weight_oprd2_type = _get_primitive_type_weight_by_expr_node(ctx, node_oprd2);
			if (weight_oprd1_type > weight_oprd2_type) {
				FE_EXPR_AST_NODE_COPY(node, node_oprd1);
			} else {
				FE_EXPR_AST_NODE_COPY(node, node_oprd2);
			}
		}
	} else {
		_SYNERR_NODE(
			ctx,
			node,
			"binary operator '%s' do not support this operand combination.",
			operator
		);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
testq %rdx, %rdx
je 0x2cb47
movq %rcx, %r14
testq %rcx, %rcx
je 0x2cb66
movq %r8, %r12
testq %r8, %r8
je 0x2cb85
movq %rdx, %r13
movq %rsi, -0x30(%rbp)
movzbl 0x1(%rdx), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x2cba4
movq %rdi, %r15
movl %r9d, %ebx
leaq 0x60(%r13), %rax
movq %rax, -0x38(%rbp)
cmpb $0x10, 0x60(%r13)
jne 0x2ca9e
movq %r14, %rdi
callq 0x2d683
testb %al, %al
je 0x2ca9e
testb %bl, %bl
je 0x2cb16
movq -0x38(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movq -0x30(%rbp), %rax
movups %xmm2, 0x80(%rax)
movups %xmm1, 0x70(%rax)
movups %xmm0, 0x60(%rax)
jmp 0x2cb16
movq %r13, %rdi
callq 0x30769
testb %al, %al
je 0x2caed
movq %r14, %rdi
callq 0x30769
testb %al, %al
je 0x2caed
testb %bl, %bl
je 0x2cb16
movq -0x38(%rbp), %rbx
movzbl (%rbx), %edi
callq 0x2a3cd
movl %eax, %r15d
movzbl 0x60(%r14), %edi
callq 0x2a3cd
movq -0x30(%rbp), %rcx
addq $0x60, %rcx
cmpl %eax, %r15d
jbe 0x2cb28
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
jmp 0x2cb3a
leaq 0x1f78c(%rip), %rsi     # 0x4c280
leaq -0x440(%rbp), %r14
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x3160
movq %r15, %rdi
movq -0x30(%rbp), %rsi
movq %r14, %rdx
callq *0x58(%r15)
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x60, %r14
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rcx)
movups %xmm1, 0x10(%rcx)
movups %xmm0, (%rcx)
jmp 0x2cb16
leaq 0x1f713(%rip), %rdi     # 0x4c261
leaq 0x1dda5(%rip), %rsi     # 0x4a8fa
leaq 0x1f762(%rip), %rcx     # 0x4c2be
movl $0xfc9, %edx            # imm = 0xFC9
callq 0x30a0
leaq 0x1f6ff(%rip), %rdi     # 0x4c26c
leaq 0x1dd86(%rip), %rsi     # 0x4a8fa
leaq 0x1f743(%rip), %rcx     # 0x4c2be
movl $0xfca, %edx            # imm = 0xFCA
callq 0x30a0
leaq 0x1f6eb(%rip), %rdi     # 0x4c277
leaq 0x1dd67(%rip), %rsi     # 0x4a8fa
leaq 0x1f724(%rip), %rcx     # 0x4c2be
movl $0xfcb, %edx            # imm = 0xFCB
callq 0x30a0
leaq 0x1eeec(%rip), %rdi     # 0x4ba97
leaq 0x1dd48(%rip), %rsi     # 0x4a8fa
leaq 0x1f4c5(%rip), %rcx     # 0x4c07e
movl $0x1ff, %edx            # imm = 0x1FF
callq 0x30a0