// File: /workspace/github_c_makefile_star2_O2/Ihsoh[P]ilang/compiler/frontend/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 FE_NODE_EXPR_SHIFT_LEFT:
		case FE_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 == FE_NODE_EXPR_SHIFT_LEFT) {
				operator = "<<";
			} else if (node_type == FE_NODE_EXPR_SHIFT_RIGHT) {
				operator = ">>";
			} else {
				assert(0);
			}

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

			FE_EXPR_AST_NODE_COPY_CONSTANT2(node, node_oprd1, node_oprd2);
			if (FE_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
pushq %rax
testq %rsi, %rsi
je 0x2d059
movq %rsi, %rbx
movq %rdi, %r12
movl (%rsi), %r13d
movl %r13d, %eax
andl $-0x2, %eax
cmpl $0xe90, %eax            # imm = 0xE90
jne 0x2cecc
cmpl $0x2, 0x44(%rbx)
jne 0x2d078
movq 0x48(%rbx), %rax
movq (%rax), %r14
movq 0x8(%rax), %r15
movq %r12, %rdi
movq %r14, %rsi
callq 0x2d132
movq %r12, %rdi
movq %r15, %rsi
callq 0x2d132
cmpl $0xe90, %r13d           # imm = 0xE90
leaq 0x1b504(%rip), %rax     # 0x48325
leaq 0x1b500(%rip), %r8      # 0x48328
cmoveq %rax, %r8
pushq $0x1
popq %r9
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x2b11c
cmpb $0x1, 0x70(%r14)
jne 0x2cee5
movb 0x70(%r15), %al
movb %al, 0x70(%rbx)
cmpb $0x1, %al
jne 0x2d04a
movzbl 0x1(%r14), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x2d097
cmpb $0x0, 0x70(%r14)
je 0x2d0b6
movzbl 0x1(%r15), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x2d0d5
movzbl 0x60(%r14), %r12d
movq %r15, %rdi
callq 0x2fac4
decl %r12d
cmpl $0xe90, %r13d           # imm = 0xE90
jne 0x2ceee
cmpl $0x8, %r12d
ja 0x2d0f4
leaq 0x1a2be(%rip), %rcx     # 0x47174
movslq (%rcx,%r12,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2cf14
movq %r12, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2d132
movb $0x0, 0x70(%rbx)
jmp 0x2d04a
cmpl $0x8, %r12d
ja 0x2d113
leaq 0x1a251(%rip), %rcx     # 0x47150
movslq (%rcx,%r12,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movsbl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movb %dl, 0x88(%rbx)
movb $0x1, %al
jmp 0x2d047
movq 0x88(%r14), %rdx
movl %eax, %ecx
shlq %cl, %rdx
jmp 0x2cf3b
movq 0x88(%r14), %rdx
movl %eax, %ecx
sarq %cl, %rdx
movq %rdx, 0x88(%rbx)
movb $0x5, %al
jmp 0x2d047
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2cf62
movswl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movw %dx, 0x88(%rbx)
movb $0x3, %al
jmp 0x2d047
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2cf88
movl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movl %edx, 0x88(%rbx)
movb $0x4, %al
jmp 0x2d047
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2cfad
movl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
movl %edx, 0x88(%rbx)
movb $0x8, %al
jmp 0x2d047
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2cfd3
movsbl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movb %dl, 0x88(%rbx)
movb $0x2, %al
jmp 0x2d047
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2cff6
movzbl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
movb %dl, 0x88(%rbx)
movb $0x6, %al
jmp 0x2d047
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2d019
movzwl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
movw %dx, 0x88(%rbx)
movb $0x7, %al
jmp 0x2d047
movq 0x88(%r14), %rdx
movl %eax, %ecx
shlq %cl, %rdx
jmp 0x2d03e
movq 0x88(%r14), %rdx
movl %eax, %ecx
shrq %cl, %rdx
movq %rdx, 0x88(%rbx)
movb $0x9, %al
movb %al, 0x71(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12d92(%rip), %rdi     # 0x3fdf2
leaq 0x1a8d3(%rip), %rsi     # 0x4793a
leaq 0x1b284(%rip), %rcx     # 0x482f2
movl $0x1066, %edx           # imm = 0x1066
callq 0x30a0
leaq 0x1acb6(%rip), %rdi     # 0x47d35
leaq 0x1a8b4(%rip), %rsi     # 0x4793a
leaq 0x1b265(%rip), %rcx     # 0x482f2
movl $0x1072, %edx           # imm = 0x1072
callq 0x30a0
leaq 0x1bc26(%rip), %rdi     # 0x48cc4
leaq 0x1a895(%rip), %rsi     # 0x4793a
leaq 0x1bba7(%rip), %rcx     # 0x48c53
movl $0xb89, %edx            # imm = 0xB89
callq 0x30a0
leaq 0x1bc26(%rip), %rdi     # 0x48ce3
leaq 0x1a876(%rip), %rsi     # 0x4793a
leaq 0x1bb88(%rip), %rcx     # 0x48c53
movl $0xb8a, %edx            # imm = 0xB8A
callq 0x30a0
leaq 0x1bc36(%rip), %rdi     # 0x48d12
leaq 0x1a857(%rip), %rsi     # 0x4793a
leaq 0x1bb69(%rip), %rcx     # 0x48c53
movl $0xb8c, %edx            # imm = 0xB8C
callq 0x30a0
leaq 0xf265(%rip), %rdi      # 0x3c360
leaq 0x1a838(%rip), %rsi     # 0x4793a
leaq 0x1bb4a(%rip), %rcx     # 0x48c53
movl $0xbb0, %edx            # imm = 0xBB0
callq 0x30a0
leaq 0xf246(%rip), %rdi      # 0x3c360
leaq 0x1a819(%rip), %rsi     # 0x4793a
leaq 0x1bb2b(%rip), %rcx     # 0x48c53
movl $0xbb1, %edx            # imm = 0xBB1
callq 0x30a0