// File: /workspace/github_c_makefile_star2_O3/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 0x2f39b
movq %rsi, %rbx
movq %rdi, %r12
movl (%rsi), %r13d
movl %r13d, %eax
andl $-0x2, %eax
cmpl $0xe90, %eax            # imm = 0xE90
jne 0x2f20e
cmpl $0x2, 0x44(%rbx)
jne 0x2f3ba
movq 0x48(%rbx), %rax
movq (%rax), %r14
movq 0x8(%rax), %r15
movq %r12, %rdi
movq %r14, %rsi
callq 0x2f474
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f474
cmpl $0xe90, %r13d           # imm = 0xE90
leaq 0x1c184(%rip), %rax     # 0x4b2e5
leaq 0x1c180(%rip), %r8      # 0x4b2e8
cmoveq %rax, %r8
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
movl $0x1, %r9d
callq 0x2d3cb
cmpb $0x1, 0x70(%r14)
jne 0x2f227
movb 0x70(%r15), %al
movb %al, 0x70(%rbx)
cmpb $0x1, %al
jne 0x2f38c
movzbl 0x1(%r14), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x2f3d9
cmpb $0x0, 0x70(%r14)
je 0x2f3f8
movzbl 0x1(%r15), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x2f417
movzbl 0x60(%r14), %r12d
movq %r15, %rdi
callq 0x31efb
decl %r12d
cmpl $0xe90, %r13d           # imm = 0xE90
jne 0x2f230
cmpl $0x8, %r12d
ja 0x2f436
leaq 0x1af3c(%rip), %rcx     # 0x4a134
movslq (%rcx,%r12,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2f256
movq %r12, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2f474
movb $0x0, 0x70(%rbx)
jmp 0x2f38c
cmpl $0x8, %r12d
ja 0x2f455
leaq 0x1aecf(%rip), %rcx     # 0x4a110
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 0x2f389
movq 0x88(%r14), %rdx
movl %eax, %ecx
shlq %cl, %rdx
jmp 0x2f27d
movq 0x88(%r14), %rdx
movl %eax, %ecx
sarq %cl, %rdx
movq %rdx, 0x88(%rbx)
movb $0x5, %al
jmp 0x2f389
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2f2a4
movswl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movw %dx, 0x88(%rbx)
movb $0x3, %al
jmp 0x2f389
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2f2ca
movl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movl %edx, 0x88(%rbx)
movb $0x4, %al
jmp 0x2f389
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2f2ef
movl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
movl %edx, 0x88(%rbx)
movb $0x8, %al
jmp 0x2f389
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2f315
movsbl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
movb %dl, 0x88(%rbx)
movb $0x2, %al
jmp 0x2f389
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2f338
movzbl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
movb %dl, 0x88(%rbx)
movb $0x6, %al
jmp 0x2f389
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x2f35b
movzwl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
movw %dx, 0x88(%rbx)
movb $0x7, %al
jmp 0x2f389
movq 0x88(%r14), %rdx
movl %eax, %ecx
shlq %cl, %rdx
jmp 0x2f380
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 0x13a40(%rip), %rdi     # 0x42de2
leaq 0x1b551(%rip), %rsi     # 0x4a8fa
leaq 0x1bf02(%rip), %rcx     # 0x4b2b2
movl $0x1066, %edx           # imm = 0x1066
callq 0x30a0
leaq 0x1b934(%rip), %rdi     # 0x4acf5
leaq 0x1b532(%rip), %rsi     # 0x4a8fa
leaq 0x1bee3(%rip), %rcx     # 0x4b2b2
movl $0x1072, %edx           # imm = 0x1072
callq 0x30a0
leaq 0x1c8a4(%rip), %rdi     # 0x4bc84
leaq 0x1b513(%rip), %rsi     # 0x4a8fa
leaq 0x1c825(%rip), %rcx     # 0x4bc13
movl $0xb89, %edx            # imm = 0xB89
callq 0x30a0
leaq 0x1c8a4(%rip), %rdi     # 0x4bca3
leaq 0x1b4f4(%rip), %rsi     # 0x4a8fa
leaq 0x1c806(%rip), %rcx     # 0x4bc13
movl $0xb8a, %edx            # imm = 0xB8A
callq 0x30a0
leaq 0x1c8b4(%rip), %rdi     # 0x4bcd2
leaq 0x1b4d5(%rip), %rsi     # 0x4a8fa
leaq 0x1c7e7(%rip), %rcx     # 0x4bc13
movl $0xb8c, %edx            # imm = 0xB8C
callq 0x30a0
leaq 0xff23(%rip), %rdi      # 0x3f360
leaq 0x1b4b6(%rip), %rsi     # 0x4a8fa
leaq 0x1c7c8(%rip), %rcx     # 0x4bc13
movl $0xbb0, %edx            # imm = 0xBB0
callq 0x30a0
leaq 0xff04(%rip), %rdi      # 0x3f360
leaq 0x1b497(%rip), %rsi     # 0x4a8fa
leaq 0x1c7a9(%rip), %rcx     # 0x4bc13
movl $0xbb1, %edx            # imm = 0xBB1
callq 0x30a0