// File: /workspace/github_c_makefile_star2_O2/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 0x2daa0
movq %rdi, %r12
movl (%rsi), %ebx
movl %ebx, %eax
andl $-0x2, %eax
cmpl $0xe90, %eax            # imm = 0xE90
jne 0x2d84e
cmpl $0x2, 0x44(%rsi)
jne 0x2dabf
movq %rsi, -0x30(%rbp)
movq 0x48(%rsi), %rax
movq (%rax), %r14
movq 0x8(%rax), %r15
movq %r12, %rdi
movq %r14, %rsi
callq 0x2dbb7
movq %r12, %rdi
movq %r15, %rsi
callq 0x2dbb7
cmpl $0xe90, %ebx            # imm = 0xE90
leaq 0x1c3b6(%rip), %rax     # 0x49ba5
leaq 0x1c3b2(%rip), %r13     # 0x49ba8
cmoveq %rax, %r13
testq %r14, %r14
je 0x2dade
testq %r15, %r15
je 0x2dafd
movq %r14, %rdi
callq 0x2ba25
testb %al, %al
je 0x2d867
movq %r15, %rdi
callq 0x2ba25
testb %al, %al
je 0x2d867
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 0x2d895
movq %r12, %rdi
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2dbb7
leaq 0x1c785(%rip), %rsi     # 0x49ff3
leaq -0x430(%rbp), %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x3150
movq %r12, %rdi
movq -0x30(%rbp), %r13
movq %r13, %rsi
leaq -0x430(%rbp), %rdx
callq *0x58(%r12)
cmpb $0x1, 0x70(%r14)
jne 0x2d920
movb 0x70(%r15), %al
movb %al, 0x70(%r13)
cmpb $0x1, %al
jne 0x2da8e
movzbl 0x1(%r14), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x2db1c
cmpb $0x0, 0x70(%r14)
je 0x2db3b
movzbl 0x1(%r15), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x2db5a
movzbl 0x60(%r14), %r12d
movq %r15, %rdi
callq 0x2f948
decl %r12d
cmpl $0xe90, %ebx            # imm = 0xE90
jne 0x2d92a
cmpl $0x8, %r12d
ja 0x2db79
leaq 0x1b09a(%rip), %rcx     # 0x489a4
movslq (%rcx,%r12,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2d950
movb $0x0, 0x70(%r13)
jmp 0x2da8e
cmpl $0x8, %r12d
ja 0x2db98
leaq 0x1b045(%rip), %rcx     # 0x48980
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 0x2da8a
movq 0x88(%r14), %rdx
movl %eax, %ecx
shlq %cl, %rdx
jmp 0x2d978
movq 0x88(%r14), %rdx
movl %eax, %ecx
sarq %cl, %rdx
movq %rdx, 0x88(%r13)
movb $0x5, %al
jmp 0x2da8a
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2d99f
movswl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movw %dx, 0x88(%r13)
movb $0x3, %al
jmp 0x2da8a
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2d9c6
movl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movl %edx, 0x88(%r13)
movb $0x4, %al
jmp 0x2da8a
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2d9ec
movl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
movl %edx, 0x88(%r13)
movb $0x8, %al
jmp 0x2da8a
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2da13
movsbl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movb %dl, 0x88(%r13)
movb $0x2, %al
jmp 0x2da8a
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2da37
movzbl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
movb %dl, 0x88(%r13)
movb $0x6, %al
jmp 0x2da8a
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2da5b
movzwl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
movw %dx, 0x88(%r13)
movb $0x7, %al
jmp 0x2da8a
movq 0x88(%r14), %rdx
movl %eax, %ecx
shlq %cl, %rdx
jmp 0x2da81
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 0x10463(%rip), %rdi     # 0x3df0a
leaq 0x1b6c2(%rip), %rsi     # 0x49170
leaq 0x1c0bd(%rip), %rcx     # 0x49b72
movl $0xc0c, %edx            # imm = 0xC0C
callq 0x30a0
leaq 0x1bb3f(%rip), %rdi     # 0x49605
leaq 0x1b6a3(%rip), %rsi     # 0x49170
leaq 0x1c09e(%rip), %rcx     # 0x49b72
movl $0xc18, %edx            # imm = 0xC18
callq 0x30a0
leaq 0x1c4f8(%rip), %rdi     # 0x49fdd
leaq 0x1b684(%rip), %rsi     # 0x49170
leaq 0x1c73b(%rip), %rcx     # 0x4a22e
movl $0xbf5, %edx            # imm = 0xBF5
callq 0x30a0
leaq 0x1c4e4(%rip), %rdi     # 0x49fe8
leaq 0x1b665(%rip), %rsi     # 0x49170
leaq 0x1c71c(%rip), %rcx     # 0x4a22e
movl $0xbf6, %edx            # imm = 0xBF6
callq 0x30a0
leaq 0x1c7f5(%rip), %rdi     # 0x4a318
leaq 0x1b646(%rip), %rsi     # 0x49170
leaq 0x1c776(%rip), %rcx     # 0x4a2a7
movl $0x8a1, %edx            # imm = 0x8A1
callq 0x30a0
leaq 0x1c7f5(%rip), %rdi     # 0x4a337
leaq 0x1b627(%rip), %rsi     # 0x49170
leaq 0x1c757(%rip), %rcx     # 0x4a2a7
movl $0x8a2, %edx            # imm = 0x8A2
callq 0x30a0
leaq 0x1c7fd(%rip), %rdi     # 0x4a35e
leaq 0x1b608(%rip), %rsi     # 0x49170
leaq 0x1c738(%rip), %rcx     # 0x4a2a7
movl $0x8a4, %edx            # imm = 0x8A4
callq 0x30a0
leaq 0xd7e9(%rip), %rdi      # 0x3b369
leaq 0x1b5e9(%rip), %rsi     # 0x49170
leaq 0x1c719(%rip), %rcx     # 0x4a2a7
movl $0x8c8, %edx            # imm = 0x8C8
callq 0x30a0
leaq 0xd7ca(%rip), %rdi      # 0x3b369
leaq 0x1b5ca(%rip), %rsi     # 0x49170
leaq 0x1c6fa(%rip), %rcx     # 0x4a2a7
movl $0x8c9, %edx            # imm = 0x8C9
callq 0x30a0