// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/backend/asmgen_gas64.c
// Function: asm_stat_shl
static void _asm_stat_shl(
	ASMGeneratorGas64Context *ctx,
	ParserASTNode *node
) {
	assert(ctx);
	assert(node);
	assert(node->type == BE_NODE_STAT_SHL);
	assert(node->nchilds == 3);

	ParserASTNode *node_target = node->childs[0];
	assert(node_target->type == BE_NODE_IDENTIFIER);
	ParserSymbol *symbol_target = _get_var_symbol_by_id_node(ctx, node_target);
	uint8_t type_target = BE_VAR_SYMBOL_GET_TYPE(symbol_target);

	ParserASTNode *node_source_left = node->childs[1];
	ParserASTNode *node_source_right = node->childs[2];

	if (be_sem_is_integer_type(type_target)) {
		_move_id_or_constexpr_to_reg(
			ctx,
			_ASM_REG_AX,
			node_source_left
		);

		_move_id_or_constexpr_to_reg(
			ctx,
			_ASM_REG_CX,
			node_source_right
		);

		_asm_inst_shl_x_x(
			ctx,
			ctx->body,
			BE_TYPE_UINT64,
			_ASM_REG_NAME_RAX,
			_ASM_REG_NAME_CL
		);

		_asm_inst_mov_sym_x(
			ctx,
			ctx->body,
			symbol_target,
			_asm_inst_reg(ctx, type_target, _ASM_REG_AX)
		);
	} else {
		assert(0);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2f3d9
jmp 0x2f3f8
leaq 0x50d81(%rip), %rdi     # 0x80161
leaq 0x4b71d(%rip), %rsi     # 0x7ab04
movl $0x161f, %edx           # imm = 0x161F
leaq 0x4e09a(%rip), %rcx     # 0x7d48d
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x2f401
jmp 0x2f420
leaq 0x47154(%rip), %rdi     # 0x7655c
leaq 0x4b6f5(%rip), %rsi     # 0x7ab04
movl $0x1620, %edx           # imm = 0x1620
leaq 0x4e072(%rip), %rcx     # 0x7d48d
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0xbeb, (%rax)          # imm = 0xBEB
jne 0x2f42e
jmp 0x2f44d
leaq 0x4a296(%rip), %rdi     # 0x796cb
leaq 0x4b6c8(%rip), %rsi     # 0x7ab04
movl $0x1621, %edx           # imm = 0x1621
leaq 0x4e045(%rip), %rcx     # 0x7d48d
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0x3, 0x44(%rax)
jne 0x2f459
jmp 0x2f478
leaq 0x47cde(%rip), %rdi     # 0x7713e
leaq 0x4b69d(%rip), %rsi     # 0x7ab04
movl $0x1622, %edx           # imm = 0x1622
leaq 0x4e01a(%rip), %rcx     # 0x7d48d
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x200, (%rax)          # imm = 0x200
jne 0x2f495
jmp 0x2f4b4
leaq 0x46f21(%rip), %rdi     # 0x763bd
leaq 0x4b661(%rip), %rsi     # 0x7ab04
movl $0x1625, %edx           # imm = 0x1625
leaq 0x4dfde(%rip), %rcx     # 0x7d48d
callq 0x30a0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x32820
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb 0x30(%rax), %al
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movzbl -0x21(%rbp), %edi
callq 0x4da80
testb $0x1, %al
jne 0x2f501
jmp 0x2f587
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
xorl %esi, %esi
callq 0x334a0
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rdx
movl $0x2, %esi
callq 0x334a0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
movl $0x9, %edx
leaq 0x4bb80(%rip), %rcx     # 0x7b0ba
leaq 0x47606(%rip), %r8      # 0x76b47
callq 0x381e0
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
xorl %edx, %edx
movzbl -0x21(%rbp), %esi
callq 0x334d0
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rax, %rcx
callq 0x32d40
jmp 0x2f5a6
leaq 0x43ecc(%rip), %rdi     # 0x7345a
leaq 0x4b56f(%rip), %rsi     # 0x7ab04
movl $0x1648, %edx           # imm = 0x1648
leaq 0x4deec(%rip), %rcx     # 0x7d48d
callq 0x30a0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)