// File: /workspace/github_c_makefile_star2_O1/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 0x311bd
movq %rsi, %rbx
movq %rdi, %r12
movl (%rsi), %r13d
movl %r13d, %eax
andl $-0x2, %eax
cmpl $0xe90, %eax            # imm = 0xE90
jne 0x30ecd
cmpl $0x2, 0x44(%rbx)
jne 0x311fb
movq 0x48(%rbx), %rax
movq (%rax), %r14
movq 0x8(%rax), %r15
movq %r12, %rdi
movq %r14, %rsi
callq 0x31350
movq %r12, %rdi
movq %r15, %rsi
callq 0x31350
cmpl $0xe90, %r13d           # imm = 0xE90
je 0x30ee9
cmpl $0xe91, %r13d           # imm = 0xE91
jne 0x31258
leaq 0x1dcdd(%rip), %rdx     # 0x4eba8
jmp 0x30ef0
movq %r12, %rdi
movq %rbx, %rsi
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31350
leaq 0x1dcb5(%rip), %rdx     # 0x4eba5
testq %r14, %r14
je 0x3121a
testq %r15, %r15
je 0x31239
movzbl 0x1(%r14), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x311dc
leaq 0x60(%r14), %rax
movq %rax, -0x30(%rbp)
movb 0x60(%r14), %al
decb %al
cmpb $0x8, %al
ja 0x30f64
movzbl 0x1(%r15), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x311dc
movb 0x60(%r15), %al
decb %al
cmpb $0x8, %al
ja 0x30f64
movq -0x30(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm2, 0x80(%rbx)
movups %xmm1, 0x70(%rbx)
movups %xmm0, 0x60(%rbx)
jmp 0x30f8b
leaq 0x1e088(%rip), %rsi     # 0x4eff3
leaq -0x430(%rbp), %rdi
xorl %eax, %eax
callq 0x3150
movq %r12, %rdi
movq %rbx, %rsi
leaq -0x430(%rbp), %rdx
callq *0x58(%r12)
cmpb $0x1, 0x70(%r14)
jne 0x31031
movb 0x70(%r15), %al
movb %al, 0x70(%rbx)
cmpb $0x1, %al
jne 0x31035
movzbl 0x1(%r14), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x31277
cmpb $0x0, 0x70(%r14)
je 0x31296
movzbl 0x1(%r15), %eax
shll $0x8, %eax
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x312b5
cmpb $0x0, 0x70(%r15)
je 0x312d4
movq -0x30(%rbp), %rax
movzbl (%rax), %r12d
movq %r15, %rdi
callq 0x3333d
cmpl $0xe91, %r13d           # imm = 0xE91
je 0x31047
cmpl $0xe90, %r13d           # imm = 0xE90
jne 0x312f3
decl %r12d
cmpl $0x8, %r12d
ja 0x31312
leaq 0x1c989(%rip), %rcx     # 0x4d9a4
movslq (%rcx,%r12,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
jmp 0x31070
movb $0x0, 0x70(%rbx)
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decl %r12d
cmpl $0x8, %r12d
ja 0x31331
leaq 0x1c925(%rip), %rcx     # 0x4d980
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, 0x71(%rbx)
jmp 0x31035
movq 0x88(%r14), %rdx
movl %eax, %ecx
sarq %cl, %rdx
jmp 0x31096
movq 0x88(%r14), %rdx
movl %eax, %ecx
shlq %cl, %rdx
movq %rdx, 0x88(%rbx)
movb $0x5, 0x71(%rbx)
jmp 0x31035
movswl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
jmp 0x310bc
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
movw %dx, 0x88(%rbx)
movb $0x3, 0x71(%rbx)
jmp 0x31035
movl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
jmp 0x310e4
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
movl %edx, 0x88(%rbx)
movb $0x4, 0x71(%rbx)
jmp 0x31035
movl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
jmp 0x3110b
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
movl %edx, 0x88(%rbx)
movb $0x8, 0x71(%rbx)
jmp 0x31035
movsbl 0x88(%r14), %edx
movl %eax, %ecx
sarl %cl, %edx
jmp 0x31133
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
movb %dl, 0x88(%rbx)
movb $0x2, 0x71(%rbx)
jmp 0x31035
movzbl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
jmp 0x3115b
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
movb %dl, 0x88(%rbx)
movb $0x6, 0x71(%rbx)
jmp 0x31035
movzwl 0x88(%r14), %edx
movl %eax, %ecx
shrl %cl, %edx
jmp 0x31183
movl 0x88(%r14), %edx
movl %eax, %ecx
shll %cl, %edx
movw %dx, 0x88(%rbx)
movb $0x7, 0x71(%rbx)
jmp 0x31035
movq 0x88(%r14), %rdx
movl %eax, %ecx
shrq %cl, %rdx
jmp 0x311ad
movq 0x88(%r14), %rdx
movl %eax, %ecx
shlq %cl, %rdx
movq %rdx, 0x88(%rbx)
movb $0x9, 0x71(%rbx)
jmp 0x31035
leaq 0x11d87(%rip), %rdi     # 0x42f4b
leaq 0x1cfa5(%rip), %rsi     # 0x4e170
leaq 0x1d9a0(%rip), %rcx     # 0x4eb72
movl $0xc0c, %edx            # imm = 0xC0C
callq 0x30a0
leaq 0x1dcb3(%rip), %rdi     # 0x4ee96
leaq 0x1cf86(%rip), %rsi     # 0x4e170
leaq 0x1e66e(%rip), %rcx     # 0x4f85f
movl $0x1bd, %edx            # imm = 0x1BD
callq 0x30a0
leaq 0x1d403(%rip), %rdi     # 0x4e605
leaq 0x1cf67(%rip), %rsi     # 0x4e170
leaq 0x1d962(%rip), %rcx     # 0x4eb72
movl $0xc18, %edx            # imm = 0xC18
callq 0x30a0
leaq 0x1ddbc(%rip), %rdi     # 0x4efdd
leaq 0x1cf48(%rip), %rsi     # 0x4e170
leaq 0x1dfff(%rip), %rcx     # 0x4f22e
movl $0xbf5, %edx            # imm = 0xBF5
callq 0x30a0
leaq 0x1dda8(%rip), %rdi     # 0x4efe8
leaq 0x1cf29(%rip), %rsi     # 0x4e170
leaq 0x1dfe0(%rip), %rcx     # 0x4f22e
movl $0xbf6, %edx            # imm = 0xBF6
callq 0x30a0
leaq 0xf12e(%rip), %rdi      # 0x4038d
leaq 0x1cf0a(%rip), %rsi     # 0x4e170
leaq 0x1d905(%rip), %rcx     # 0x4eb72
movl $0xc24, %edx            # imm = 0xC24
callq 0x30a0
leaq 0x1e09a(%rip), %rdi     # 0x4f318
leaq 0x1ceeb(%rip), %rsi     # 0x4e170
leaq 0x1e01b(%rip), %rcx     # 0x4f2a7
movl $0x8a1, %edx            # imm = 0x8A1
callq 0x30a0
leaq 0x1e09a(%rip), %rdi     # 0x4f337
leaq 0x1cecc(%rip), %rsi     # 0x4e170
leaq 0x1dffc(%rip), %rcx     # 0x4f2a7
movl $0x8a2, %edx            # imm = 0x8A2
callq 0x30a0
leaq 0x1e0a2(%rip), %rdi     # 0x4f35e
leaq 0x1cead(%rip), %rsi     # 0x4e170
leaq 0x1dfdd(%rip), %rcx     # 0x4f2a7
movl $0x8a4, %edx            # imm = 0x8A4
callq 0x30a0
leaq 0x1e0a2(%rip), %rdi     # 0x4f37d
leaq 0x1ce8e(%rip), %rsi     # 0x4e170
leaq 0x1dfbe(%rip), %rcx     # 0x4f2a7
movl $0x8a5, %edx            # imm = 0x8A5
callq 0x30a0
leaq 0xf093(%rip), %rdi      # 0x4038d
leaq 0x1ce6f(%rip), %rsi     # 0x4e170
leaq 0x1df9f(%rip), %rcx     # 0x4f2a7
movl $0x8cb, %edx            # imm = 0x8CB
callq 0x30a0
leaq 0xf074(%rip), %rdi      # 0x4038d
leaq 0x1ce50(%rip), %rsi     # 0x4e170
leaq 0x1df80(%rip), %rcx     # 0x4f2a7
movl $0x8c8, %edx            # imm = 0x8C8
callq 0x30a0
leaq 0xf055(%rip), %rdi      # 0x4038d
leaq 0x1ce31(%rip), %rsi     # 0x4e170
leaq 0x1df61(%rip), %rcx     # 0x4f2a7
movl $0x8c9, %edx            # imm = 0x8C9
callq 0x30a0