// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x558b9
jmp 0x558d8
leaq 0x26c96(%rip), %rdi     # 0x7c556
leaq 0x28983(%rip), %rsi     # 0x7e24a
movl $0x1065, %edx           # imm = 0x1065
leaq 0x29345(%rip), %rcx     # 0x7ec18
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x558e1
jmp 0x55900
leaq 0x206eb(%rip), %rdi     # 0x75fd3
leaq 0x2895b(%rip), %rsi     # 0x7e24a
movl $0x1066, %edx           # imm = 0x1066
leaq 0x2931d(%rip), %rcx     # 0x7ec18
callq 0x30a0
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0xfffff170, %eax       # imm = 0xFFFFF170
subl $0x1, %eax
ja 0x55a3e
jmp 0x5591c
movq -0x10(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x55928
jmp 0x55947
leaq 0x28d45(%rip), %rdi     # 0x7e674
leaq 0x28914(%rip), %rsi     # 0x7e24a
movl $0x1072, %edx           # imm = 0x1072
leaq 0x292d6(%rip), %rcx     # 0x7ec18
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x55a60
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x55a60
movq $0x0, -0x30(%rbp)
cmpl $0xe90, -0x14(%rbp)     # imm = 0xE90
jne 0x5599e
leaq 0x25864(%rip), %rax     # 0x7b1fc
movq %rax, -0x30(%rbp)
jmp 0x559d5
cmpl $0xe91, -0x14(%rbp)     # imm = 0xE91
jne 0x559b4
leaq 0x2588d(%rip), %rax     # 0x7b23b
movq %rax, -0x30(%rbp)
jmp 0x559d3
leaq 0x1caa0(%rip), %rdi     # 0x7245b
leaq 0x28888(%rip), %rsi     # 0x7e24a
movl $0x107e, %edx           # imm = 0x107E
leaq 0x2924a(%rip), %rcx     # 0x7ec18
callq 0x30a0
jmp 0x559d5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movl $0x1, %r9d
callq 0x52310
movq -0x20(%rbp), %rcx
xorl %eax, %eax
testb $0x1, 0x70(%rcx)
movb %al, -0x31(%rbp)
je 0x55a0d
movq -0x28(%rbp), %rax
movb 0x70(%rax), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %cl
movq -0x10(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x70(%rax)
movq -0x10(%rbp), %rax
testb $0x1, 0x70(%rax)
je 0x55a3c
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x55cb0
jmp 0x55a4b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x55a60
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)