// File: /workspace/github_c_makefile_star2_O2/Ihsoh[P]ilang/compiler/frontend/irgen_llvmir.c
// Function: ir_expr_shift_left
static void _ir_expr_shift_left(
	IRGeneratorLlvmirContext *ctx,
	ResizableString *rstr,
	ResizableString *rstr_result_lhs_ptr,
	_ExprResult *expr_result,
	ParserASTNode *node
) {
	assert(ctx);
	assert(rstr);
	assert(expr_result);
	assert(node);
	assert(node->type == FE_NODE_EXPR_SHIFT_LEFT
			|| node->type == FE_NODE_EXPR_SHIFT_LEFT_ASSIGN);

	ParserSymbol *func_symbol = ctx->func_symbol;
	assert(func_symbol);

	ParserASTNode *node_lhs = node->childs[0];
	ParserASTNode *node_rhs = node->childs[1];

	ParserASTNode *node_lhs_type = FE_EXPR_AST_NODE_GET_TYPE_NODE(node_lhs);
	ParserASTNode *node_rhs_type = FE_EXPR_AST_NODE_GET_TYPE_NODE(node_rhs);

	_ExprResult result_lhs;
	_ExprResult result_rhs;
	_ExprResult result_rhs_casted;

	_expr_result_init(&result_lhs);
	_expr_result_init(&result_rhs);
	_expr_result_init(&result_rhs_casted);

	_ir_expr(ctx, rstr, &result_lhs, node_lhs);
	rstr_append_with_rstr(rstr, &(result_lhs.rstr_for_result_ptr));
	rstr_append_with_rstr(rstr, &(result_lhs.rstr_for_result));

	if (rstr_result_lhs_ptr != NULL) {
		rstr_append_with_rstr(
			rstr_result_lhs_ptr,
			&(result_lhs.rstr_result_ptr)
		);
	}

	_ir_expr(ctx, rstr, &result_rhs, node_rhs);
	rstr_append_with_rstr(rstr, &(result_rhs.rstr_for_result_ptr));
	rstr_append_with_rstr(rstr, &(result_rhs.rstr_for_result));

	_expr_result_cast(
		ctx,
		&result_rhs_casted,
		node_lhs_type,
		&result_rhs,
		node_rhs_type
	);
	rstr_append_with_rstr(rstr, &(result_rhs_casted.rstr_for_result_ptr));
	rstr_append_with_rstr(rstr, &(result_rhs_casted.rstr_for_result));

	ResizableString rstr_tmp_label_val;
	rstr_init(&rstr_tmp_label_val);
	_generate_func_tmp(ctx, func_symbol, &rstr_tmp_label_val);

	rstr_appendf(
		&(expr_result->rstr_for_result),
		"%s = shl %s, %s\n",
		RSTR_CSTR(&rstr_tmp_label_val),
		RSTR_CSTR(&(result_lhs.rstr_result)),
		RSTR_CSTR(&(result_rhs_casted.rstr_result_val))
	);
	_expr_result_set_result(
		expr_result,
		RSTR_CSTR(&(result_lhs.rstr_result_type)),
		RSTR_CSTR(&rstr_tmp_label_val)
	);

	_expr_result_free(&result_lhs);
	_expr_result_free(&result_rhs);
	_expr_result_free(&result_rhs_casted);
	rstr_free(&rstr_tmp_label_val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
testq %rcx, %rcx
je 0x1e358
movq %rsi, %r14
movq %rdi, %r13
movl (%r8), %eax
cmpl $0xe19, %eax            # imm = 0xE19
je 0x1e19f
cmpl $0xe90, %eax            # imm = 0xE90
jne 0x1e396
movq %rdx, -0x40(%rbp)
movq %rcx, -0x50(%rbp)
movq 0x40(%r13), %rax
movq %rax, -0x48(%rbp)
testq %rax, %rax
je 0x1e377
movq 0x48(%r8), %rax
movq (%rax), %r12
movq 0x8(%rax), %rbx
movq 0x68(%r12), %rax
movq %rax, -0x30(%rbp)
movq 0x68(%rbx), %rax
movq %rax, -0x38(%rbp)
leaq -0x160(%rbp), %r15
movq %r15, %rdi
callq 0x188c9
leaq -0xe0(%rbp), %rdi
callq 0x188c9
leaq -0x1e0(%rbp), %rdi
callq 0x188c9
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x19792
leaq -0x150(%rbp), %rsi
movq %r14, %rdi
callq 0x712e
movq %r14, %rdi
movq %r15, %rsi
callq 0x712e
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x1e23b
leaq -0x110(%rbp), %rsi
callq 0x712e
leaq -0xe0(%rbp), %r15
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x19792
leaq -0xd0(%rbp), %rsi
movq %r14, %rdi
callq 0x712e
movq %r14, %rdi
movq %r15, %rsi
callq 0x712e
leaq -0x1e0(%rbp), %rsi
movq %r13, %rdi
movq %rsi, %r13
movq -0x30(%rbp), %rdx
movq %r15, %rcx
movq -0x38(%rbp), %r8
callq 0x1896e
leaq -0x1d0(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x712e
movq %r14, %rdi
movq %r13, %rsi
callq 0x712e
leaq -0x60(%rbp), %r14
movq %r14, %rdi
callq 0x6e1c
movq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x1cc34
movq 0x8(%r14), %rdx
testq %rdx, %rdx
leaq 0x21c49(%rip), %r15     # 0x3ff16
cmoveq %r15, %rdx
leaq -0x160(%rbp), %rbx
movq 0x28(%rbx), %rcx
testq %rcx, %rcx
cmoveq %r15, %rcx
movq 0x38(%r12), %r8
testq %r8, %r8
cmoveq %r15, %r8
leaq 0x246ef(%rip), %rsi     # 0x429e5
movq -0x50(%rbp), %r12
movq %r12, %rdi
xorl %eax, %eax
callq 0x739a
movq 0x38(%rbx), %rsi
testq %rsi, %rsi
cmoveq %r15, %rsi
movq 0x8(%r14), %rdx
testq %rdx, %rdx
cmoveq %r15, %rdx
movq %r12, %rdi
callq 0x1cba4
movq %rbx, %rdi
callq 0x191df
leaq -0xe0(%rbp), %rdi
callq 0x191df
movq %r13, %rdi
callq 0x191df
movq %r14, %rdi
callq 0x72b9
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20885(%rip), %rdi     # 0x3ebe4
leaq 0x23622(%rip), %rsi     # 0x41988
leaq 0x245fd(%rip), %rcx     # 0x4296a
movl $0xe35, %edx            # imm = 0xE35
callq 0x30a0
leaq 0x21bf9(%rip), %rdi     # 0x3ff77
leaq 0x23603(%rip), %rsi     # 0x41988
leaq 0x245de(%rip), %rcx     # 0x4296a
movl $0xe3b, %edx            # imm = 0xE3B
callq 0x30a0
leaq 0x21377(%rip), %rdi     # 0x3f714
leaq 0x235e4(%rip), %rsi     # 0x41988
leaq 0x245bf(%rip), %rcx     # 0x4296a
movl $0xe38, %edx            # imm = 0xE38
callq 0x30a0