// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/frontend/semantics.c
// Function: expr_add
static void _expr_add(
	ParserContext *ctx,
	ParserASTNode *node
) {
	assert(ctx);
	assert(node);

	#define	_CHECK	\
	{	\
		assert(node->nchilds == 2);	\
	}

	uint32_t node_type = node->type;

	switch (node_type) {
		case FE_NODE_EXPR_ADD: {
			_CHECK
			ParserASTNode *node_oprd1 = node->childs[0];
			ParserASTNode *node_oprd2 = node->childs[1];
			_expr_unary(ctx, node_oprd1);
			_expr_unary(ctx, node_oprd2);

			_check_expr_add_operands(
				ctx, node, node_oprd1, node_oprd2, "+", true
			);

			FE_EXPR_AST_NODE_COPY_CONSTANT2(node, node_oprd1, node_oprd2);
			if (FE_EXPR_AST_NODE_GET_CONSTANT(node)) {
				_calc_binary_constexpr(ctx, node_type, node, node_oprd1, node_oprd2);
			}
			break;
		}
		case FE_NODE_EXPR_SUB: {
			_CHECK
			ParserASTNode *node_oprd1 = node->childs[0];
			ParserASTNode *node_oprd2 = node->childs[1];
			_expr_unary(ctx, node_oprd1);
			_expr_unary(ctx, node_oprd2);

			_check_expr_sub_operands(
				ctx, node, node_oprd1, node_oprd2, "-", true
			);

			FE_EXPR_AST_NODE_COPY_CONSTANT2(node, node_oprd1, node_oprd2);
			if (FE_EXPR_AST_NODE_GET_CONSTANT(node)) {
				_calc_binary_constexpr(ctx, node_type, node, node_oprd1, node_oprd2);
			}
			break;
		}
		default: {
			_expr_mul(ctx, node);
			break;
		}
	}

	#undef	_CHECK
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x2f6e6
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %r15d
cmpl $0xeaf, %r15d           # imm = 0xEAF
jle 0x2f53b
leal -0xeb0(%r15), %eax
cmpl $0x2, %eax
jae 0x2f5c6
cmpl $0x2, 0x44(%rbx)
jne 0x2f705
movq 0x48(%rbx), %rax
movq (%rax), %r12
movq 0x8(%rax), %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0x2f781
movq %r14, %rdi
movq %r13, %rsi
callq 0x2f781
cmpl $0xeb0, %r15d           # imm = 0xEB0
leaq 0x145ba(%rip), %rax     # 0x43aa4
leaq 0x1c720(%rip), %r8      # 0x4bc11
cmoveq %rax, %r8
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r13, %rcx
movl $0x1, %r9d
callq 0x2cd83
cmpb $0x1, 0x70(%r12)
jne 0x2f6ba
movb 0x70(%r13), %al
movb %al, 0x70(%rbx)
cmpb $0x1, %al
jne 0x2f6be
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
movq %r12, %rcx
movq %r13, %r8
jmp 0x2f6a7
cmpl $0xea0, %r15d           # imm = 0xEA0
je 0x2f63a
cmpl $0xea1, %r15d           # imm = 0xEA1
jne 0x2f6cd
cmpl $0x2, 0x44(%rbx)
jne 0x2f762
movq 0x48(%rbx), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x2f781
movq %r14, %rdi
movq %r12, %rsi
callq 0x2f781
leaq 0x148f6(%rip), %r8      # 0x43e7d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
movl $0x1, %r9d
callq 0x2cbc3
cmpb $0x1, 0x70(%r15)
jne 0x2f6ba
movb 0x70(%r12), %al
movb %al, 0x70(%rbx)
cmpb $0x1, %al
jne 0x2f6be
movq %r14, %rdi
movl $0xea1, %esi            # imm = 0xEA1
jmp 0x2f69e
cmpl $0xeb2, %r15d           # imm = 0xEB2
jne 0x2f6cd
cmpl $0x2, 0x44(%rbx)
jne 0x2f724
movq 0x48(%rbx), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x2f781
movq %r14, %rdi
movq %r12, %rsi
callq 0x2f781
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
movl $0x1, %r8d
callq 0x2cecf
cmpb $0x1, 0x70(%r15)
jne 0x2f6ba
movb 0x70(%r12), %al
movb %al, 0x70(%rbx)
cmpb $0x1, %al
jne 0x2f6be
movq %r14, %rdi
movl $0xeb2, %esi            # imm = 0xEB2
jmp 0x2f69e
cmpl $0x2, 0x44(%rbx)
jne 0x2f743
movq 0x48(%rbx), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x2f781
movq %r14, %rdi
movq %r12, %rsi
callq 0x2f781
leaq 0x1480e(%rip), %r8      # 0x43e7a
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
movl $0x1, %r9d
callq 0x2ca03
cmpb $0x1, 0x70(%r15)
jne 0x2f6ba
movb 0x70(%r12), %al
movb %al, 0x70(%rbx)
cmpb $0x1, %al
jne 0x2f6be
movq %r14, %rdi
movl $0xea0, %esi            # imm = 0xEA0
movq %rbx, %rdx
movq %r15, %rcx
movq %r12, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2d93b
movb $0x0, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2f781
leaq 0x136f5(%rip), %rdi     # 0x42de2
leaq 0x1b206(%rip), %rsi     # 0x4a8fa
leaq 0x1bbf0(%rip), %rcx     # 0x4b2eb
movl $0x1010, %edx           # imm = 0x1010
callq 0x30a0
leaq 0x1b5e9(%rip), %rdi     # 0x4acf5
leaq 0x1b1e7(%rip), %rsi     # 0x4a8fa
leaq 0x1c4c6(%rip), %rcx     # 0x4bbe0
movl $0xf8c, %edx            # imm = 0xF8C
callq 0x30a0
leaq 0x1b5ca(%rip), %rdi     # 0x4acf5
leaq 0x1b1c8(%rip), %rsi     # 0x4a8fa
leaq 0x1c4a7(%rip), %rcx     # 0x4bbe0
movl $0xfa6, %edx            # imm = 0xFA6
callq 0x30a0
leaq 0x1b5ab(%rip), %rdi     # 0x4acf5
leaq 0x1b1a9(%rip), %rsi     # 0x4a8fa
leaq 0x1bb93(%rip), %rcx     # 0x4b2eb
movl $0x101b, %edx           # imm = 0x101B
callq 0x30a0
leaq 0x1b58c(%rip), %rdi     # 0x4acf5
leaq 0x1b18a(%rip), %rsi     # 0x4a8fa
leaq 0x1bb74(%rip), %rcx     # 0x4b2eb
movl $0x102c, %edx           # imm = 0x102C
callq 0x30a0