// File: /workspace/github_c_makefile_star2_O2/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 0x2d38f
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %r15d
leal -0xeb0(%r15), %eax
cmpl $0x2, %eax
jb 0x2d1f8
cmpl $0xeb2, %r15d           # imm = 0xEB2
je 0x2d2ec
cmpl $0xea1, %r15d           # imm = 0xEA1
je 0x2d280
cmpl $0xea0, %r15d           # imm = 0xEA0
jne 0x2d376
cmpl $0x2, 0x44(%rbx)
jne 0x2d40b
movq 0x48(%rbx), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x2d42a
movq %r14, %rdi
movq %r12, %rsi
callq 0x2d42a
leaq 0x13cea(%rip), %r8      # 0x40ea5
pushq $0x1
popq %r9
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x2a7ae
cmpb $0x1, 0x70(%r15)
jne 0x2d363
movb 0x70(%r12), %al
movb %al, 0x70(%rbx)
cmpb $0x1, %al
jne 0x2d367
movq %r14, %rdi
movl $0xea0, %esi            # imm = 0xEA0
jmp 0x2d347
cmpl $0x2, 0x44(%rbx)
jne 0x2d3ae
movq 0x48(%rbx), %rax
movq (%rax), %r12
movq 0x8(%rax), %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0x2d42a
movq %r14, %rdi
movq %r13, %rsi
callq 0x2d42a
cmpl $0xeb0, %r15d           # imm = 0xEB0
leaq 0x1389e(%rip), %rax     # 0x40acf
leaq 0x1ba19(%rip), %r8      # 0x48c51
cmoveq %rax, %r8
pushq $0x1
popq %r9
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x2aad4
cmpb $0x1, 0x70(%r12)
jne 0x2d363
movb 0x70(%r13), %al
movb %al, 0x70(%rbx)
cmpb $0x1, %al
jne 0x2d367
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
movq %r12, %rcx
movq %r13, %r8
jmp 0x2d350
cmpl $0x2, 0x44(%rbx)
jne 0x2d3cd
movq 0x48(%rbx), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x2d42a
movq %r14, %rdi
movq %r12, %rsi
callq 0x2d42a
leaq 0x13bf6(%rip), %r8      # 0x40ea8
pushq $0x1
popq %r9
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x2a941
cmpb $0x1, 0x70(%r15)
jne 0x2d363
movb 0x70(%r12), %al
movb %al, 0x70(%rbx)
cmpb $0x1, %al
jne 0x2d367
movq %r14, %rdi
movl $0xea1, %esi            # imm = 0xEA1
jmp 0x2d347
cmpl $0x2, 0x44(%rbx)
jne 0x2d3ec
movq 0x48(%rbx), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x2d42a
movq %r14, %rdi
movq %r12, %rsi
callq 0x2d42a
pushq $0x1
popq %r8
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x2ac20
cmpb $0x1, 0x70(%r15)
jne 0x2d363
movb 0x70(%r12), %al
movb %al, 0x70(%rbx)
cmpb $0x1, %al
jne 0x2d367
movq %r14, %rdi
movl $0xeb2, %esi            # imm = 0xEB2
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 0x2b68c
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 0x2d42a
leaq 0x12a5c(%rip), %rdi     # 0x3fdf2
leaq 0x1a59d(%rip), %rsi     # 0x4793a
leaq 0x1af87(%rip), %rcx     # 0x4832b
movl $0x1010, %edx           # imm = 0x1010
callq 0x30a0
leaq 0x1a980(%rip), %rdi     # 0x47d35
leaq 0x1a57e(%rip), %rsi     # 0x4793a
leaq 0x1b85d(%rip), %rcx     # 0x48c20
movl $0xf8c, %edx            # imm = 0xF8C
callq 0x30a0
leaq 0x1a961(%rip), %rdi     # 0x47d35
leaq 0x1a55f(%rip), %rsi     # 0x4793a
leaq 0x1af49(%rip), %rcx     # 0x4832b
movl $0x102c, %edx           # imm = 0x102C
callq 0x30a0
leaq 0x1a942(%rip), %rdi     # 0x47d35
leaq 0x1a540(%rip), %rsi     # 0x4793a
leaq 0x1b81f(%rip), %rcx     # 0x48c20
movl $0xfa6, %edx            # imm = 0xFA6
callq 0x30a0
leaq 0x1a923(%rip), %rdi     # 0x47d35
leaq 0x1a521(%rip), %rsi     # 0x4793a
leaq 0x1af0b(%rip), %rcx     # 0x4832b
movl $0x101b, %edx           # imm = 0x101B
callq 0x30a0