// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
testq %rdx, %rdx
je 0x2d59f
movq %rcx, %r15
testq %rcx, %rcx
je 0x2d5be
testq %r8, %r8
je 0x2d5dd
movq %rdx, %r14
movzbl 0x1(%rdx), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x2d5fc
movq %rsi, %rbx
movq %rdi, %r12
movb 0x60(%r14), %al
addq $0x60, %r14
cmpb $0x10, %al
jne 0x2d4ee
movzbl 0x1(%r15), %ecx
shll $0x8, %ecx
cmpl $0xe00, %ecx            # imm = 0xE00
jne 0x2d61b
movb 0x60(%r15), %cl
decb %cl
cmpb $0x8, %cl
ja 0x2d4ee
testb %r9b, %r9b
je 0x2d574
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x80(%rbx)
movups %xmm1, 0x70(%rbx)
movups %xmm0, 0x60(%rbx)
jmp 0x2d574
leal -0x1(%rax), %ecx
cmpb $0xa, %cl
ja 0x2d54b
movzbl 0x1(%r15), %ecx
shll $0x8, %ecx
cmpl $0xe00, %ecx            # imm = 0xE00
jne 0x2d63a
movb 0x60(%r15), %cl
decb %cl
cmpb $0xa, %cl
ja 0x2d54b
testb %r9b, %r9b
je 0x2d574
addq $0x60, %r15
movzbl %al, %edi
callq 0x2acb8
movl %eax, %r12d
movzbl (%r15), %edi
callq 0x2acb8
addq $0x60, %rbx
cmpl %eax, %r12d
jbe 0x2d584
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
jmp 0x2d592
leaq 0x1fce5(%rip), %rsi     # 0x4d237
leaq -0x420(%rbp), %r14
movq %r14, %rdi
movq %r8, %rdx
xorl %eax, %eax
callq 0x3150
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *0x58(%r12)
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
jmp 0x2d574
leaq 0x1fc72(%rip), %rdi     # 0x4d218
leaq 0x1e2ad(%rip), %rsi     # 0x4b85a
leaq 0x1fcc1(%rip), %rcx     # 0x4d275
movl $0xfc9, %edx            # imm = 0xFC9
callq 0x30a0
leaq 0x1fc5e(%rip), %rdi     # 0x4d223
leaq 0x1e28e(%rip), %rsi     # 0x4b85a
leaq 0x1fca2(%rip), %rcx     # 0x4d275
movl $0xfca, %edx            # imm = 0xFCA
callq 0x30a0
leaq 0x1fc4a(%rip), %rdi     # 0x4d22e
leaq 0x1e26f(%rip), %rsi     # 0x4b85a
leaq 0x1fc83(%rip), %rcx     # 0x4d275
movl $0xfcb, %edx            # imm = 0xFCB
callq 0x30a0
leaq 0x1f3f4(%rip), %rdi     # 0x4c9f7
leaq 0x1e250(%rip), %rsi     # 0x4b85a
leaq 0x1f9cd(%rip), %rcx     # 0x4cfde
movl $0x1ff, %edx            # imm = 0x1FF
callq 0x30a0
leaq 0x1f3d5(%rip), %rdi     # 0x4c9f7
leaq 0x1e231(%rip), %rsi     # 0x4b85a
leaq 0x1f970(%rip), %rcx     # 0x4cfa0
movl $0x1b3, %edx            # imm = 0x1B3
callq 0x30a0
leaq 0x1f3b6(%rip), %rdi     # 0x4c9f7
leaq 0x1e212(%rip), %rsi     # 0x4b85a
leaq 0x1f36b(%rip), %rcx     # 0x4c9ba
movl $0x1ee, %edx            # imm = 0x1EE
callq 0x30a0