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

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

	uint32_t node_type = node->type;

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

			const char *operator = NULL;
			if (node_type == BE_NODE_EXPR_SHIFT_LEFT) {
				operator = "<<";
			} else if (node_type == BE_NODE_EXPR_SHIFT_RIGHT) {
				operator = ">>";
			} else {
				assert(0);
			}

			_check_expr_shift_operands(
				ctx, node, node_oprd1, node_oprd2, operator, true
			);

			BE_EXPR_AST_NODE_COPY_CONSTANT2(node, node_oprd1, node_oprd2);
			if (BE_EXPR_AST_NODE_GET_CONSTANT(node)) {
				_calc_shift_constexpr(ctx, node_type, node, node_oprd1, node_oprd2);
			}
			break;
		}
		default: {
			_expr_add(ctx, node);
			break;
		}
	}

	#undef	_CHECK
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
testq %rsi, %rsi
je 0x3059a
movq %rdi, %r12
movl (%rsi), %ebx
movl %ebx, %eax
andl $-0x2, %eax
cmpl $0xe90, %eax            # imm = 0xE90
jne 0x30348
cmpl $0x2, 0x44(%rsi)
jne 0x305b9
movq %rsi, -0x30(%rbp)
movq 0x48(%rsi), %rax
movq (%rax), %r14
movq 0x8(%rax), %r15
movq %r12, %rdi
movq %r14, %rsi
callq 0x306b1
movq %r12, %rdi
movq %r15, %rsi
callq 0x306b1
cmpl $0xe90, %ebx            # imm = 0xE90
leaq 0x1c88c(%rip), %rax     # 0x4cb75
leaq 0x1c888(%rip), %r13     # 0x4cb78
cmoveq %rax, %r13
testq %r14, %r14
je 0x305d8
testq %r15, %r15
je 0x305f7
movq %r14, %rdi
callq 0x2e4a1
testb %al, %al
je 0x30361
movq %r15, %rdi
callq 0x2e4a1
testb %al, %al
je 0x30361
movups 0x60(%r14), %xmm0
movups 0x70(%r14), %xmm1
movups 0x80(%r14), %xmm2
movq -0x30(%rbp), %r13
movups %xmm2, 0x80(%r13)
movups %xmm1, 0x70(%r13)
movups %xmm0, 0x60(%r13)
jmp 0x3038f
movq %r12, %rdi
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x306b1
leaq 0x1cc5b(%rip), %rsi     # 0x4cfc3
leaq -0x430(%rbp), %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x3160
movq %r12, %rdi
movq -0x30(%rbp), %r13
movq %r13, %rsi
leaq -0x430(%rbp), %rdx
callq *0x58(%r12)
cmpb $0x1, 0x70(%r14)
jne 0x3041a
movb 0x70(%r15), %al
movb %al, 0x70(%r13)
cmpb $0x1, %al
jne 0x30588
movzbl 0x1(%r14), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x30616
cmpb $0x0, 0x70(%r14)
je 0x30635
movzbl 0x1(%r15), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x30654
movzbl 0x60(%r14), %r12d
movq %r15, %rdi
callq 0x32516
decl %r12d
cmpl $0xe90, %ebx            # imm = 0xE90
jne 0x30424
cmpl $0x8, %r12d
ja 0x30673
leaq 0x1b570(%rip), %rcx     # 0x4b974
movslq (%rcx,%r12,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x3044a
movb $0x0, 0x70(%r13)
jmp 0x30588
cmpl $0x8, %r12d
ja 0x30692
leaq 0x1b51b(%rip), %rcx     # 0x4b950
movslq (%rcx,%r12,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movsbl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movb %dl, 0x88(%r13)
movb $0x1, %al
jmp 0x30584
movq 0x88(%r14), %rdx
movl %eax, %ecx
shlq %cl, %rdx
jmp 0x30472
movq 0x88(%r14), %rdx
movl %eax, %ecx
sarq %cl, %rdx
movq %rdx, 0x88(%r13)
movb $0x5, %al
jmp 0x30584
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x30499
movswl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movw %dx, 0x88(%r13)
movb $0x3, %al
jmp 0x30584
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x304c0
movl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movl %edx, 0x88(%r13)
movb $0x4, %al
jmp 0x30584
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x304e6
movl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
movl %edx, 0x88(%r13)
movb $0x8, %al
jmp 0x30584
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x3050d
movsbl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movb %dl, 0x88(%r13)
movb $0x2, %al
jmp 0x30584
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x30531
movzbl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
movb %dl, 0x88(%r13)
movb $0x6, %al
jmp 0x30584
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x30555
movzwl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
movw %dx, 0x88(%r13)
movb $0x7, %al
jmp 0x30584
movq 0x88(%r14), %rdx
movl %eax, %ecx
shlq %cl, %rdx
jmp 0x3057b
movq 0x88(%r14), %rdx
movl %eax, %ecx
shrq %cl, %rdx
movq %rdx, 0x88(%r13)
movb $0x9, %al
movb %al, 0x71(%r13)
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1096a(%rip), %rdi     # 0x40f0b
leaq 0x1bb98(%rip), %rsi     # 0x4c140
leaq 0x1c593(%rip), %rcx     # 0x4cb42
movl $0xc0c, %edx            # imm = 0xC0C
callq 0x30a0
leaq 0x1c015(%rip), %rdi     # 0x4c5d5
leaq 0x1bb79(%rip), %rsi     # 0x4c140
leaq 0x1c574(%rip), %rcx     # 0x4cb42
movl $0xc18, %edx            # imm = 0xC18
callq 0x30a0
leaq 0x1c9ce(%rip), %rdi     # 0x4cfad
leaq 0x1bb5a(%rip), %rsi     # 0x4c140
leaq 0x1cc11(%rip), %rcx     # 0x4d1fe
movl $0xbf5, %edx            # imm = 0xBF5
callq 0x30a0
leaq 0x1c9ba(%rip), %rdi     # 0x4cfb8
leaq 0x1bb3b(%rip), %rsi     # 0x4c140
leaq 0x1cbf2(%rip), %rcx     # 0x4d1fe
movl $0xbf6, %edx            # imm = 0xBF6
callq 0x30a0
leaq 0x1cccb(%rip), %rdi     # 0x4d2e8
leaq 0x1bb1c(%rip), %rsi     # 0x4c140
leaq 0x1cc4c(%rip), %rcx     # 0x4d277
movl $0x8a1, %edx            # imm = 0x8A1
callq 0x30a0
leaq 0x1cccb(%rip), %rdi     # 0x4d307
leaq 0x1bafd(%rip), %rsi     # 0x4c140
leaq 0x1cc2d(%rip), %rcx     # 0x4d277
movl $0x8a2, %edx            # imm = 0x8A2
callq 0x30a0
leaq 0x1ccd3(%rip), %rdi     # 0x4d32e
leaq 0x1bade(%rip), %rsi     # 0x4c140
leaq 0x1cc0e(%rip), %rcx     # 0x4d277
movl $0x8a4, %edx            # imm = 0x8A4
callq 0x30a0
leaq 0xdcef(%rip), %rdi      # 0x3e369
leaq 0x1babf(%rip), %rsi     # 0x4c140
leaq 0x1cbef(%rip), %rcx     # 0x4d277
movl $0x8c8, %edx            # imm = 0x8C8
callq 0x30a0
leaq 0xdcd0(%rip), %rdi      # 0x3e369
leaq 0x1baa0(%rip), %rsi     # 0x4c140
leaq 0x1cbd0(%rip), %rcx     # 0x4d277
movl $0x8c9, %edx            # imm = 0x8C9
callq 0x30a0