// File: /workspace/github_c_makefile_star2_O2/Ihsoh[P]ilang/compiler/frontend/irgen.c
// Function: ir_expr_shift_left
static void _ir_expr_shift_left(
	IRGeneratorContext *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_var(
		ctx,
		func_symbol,
		&rstr_tmp_label_val,
		FE_EXPR_AST_NODE_GET_TYPE_NODE(node)
	);

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

	_expr_result_set_result(
		expr_result,
		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 $0x108, %rsp            # imm = 0x108
testq %rcx, %rcx
je 0x11342
movq %rsi, %r12
movq %rdi, %r15
movl (%r8), %eax
cmpl $0xe19, %eax            # imm = 0xE19
je 0x11181
cmpl $0xe90, %eax            # imm = 0xE90
jne 0x11380
movq %rdx, -0x48(%rbp)
movq %rcx, -0x58(%rbp)
movq 0x40(%r15), %rax
movq %rax, -0x50(%rbp)
testq %rax, %rax
je 0x11361
movq %r8, -0x40(%rbp)
movq 0x48(%r8), %rax
movq (%rax), %rbx
movq 0x8(%rax), %r14
movq 0x68(%rbx), %rax
movq %rax, -0x30(%rbp)
movq 0x68(%r14), %rax
movq %rax, -0x38(%rbp)
leaq -0xe8(%rbp), %r13
movq %r13, %rdi
callq 0xc17d
leaq -0x128(%rbp), %rdi
callq 0xc17d
leaq -0xa8(%rbp), %rdi
callq 0xc17d
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0xcfd6
leaq -0xd8(%rbp), %rsi
movq %r12, %rdi
callq 0x712e
movq %r12, %rdi
movq %r13, %rsi
callq 0x712e
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x11220
leaq -0xb8(%rbp), %rsi
callq 0x712e
leaq -0x128(%rbp), %r13
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0xcfd6
leaq -0x118(%rbp), %rsi
movq %r12, %rdi
callq 0x712e
movq %r12, %rdi
movq %r13, %rsi
callq 0x712e
leaq -0xa8(%rbp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
movq -0x30(%rbp), %rdx
movq %r13, %rcx
movq -0x38(%rbp), %r8
callq 0xc1f2
leaq -0x98(%rbp), %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x712e
movq %r12, %rdi
movq %rbx, %rsi
callq 0x712e
leaq -0x68(%rbp), %r12
movq %r12, %rdi
callq 0x6e1c
movq -0x40(%rbp), %rax
movq 0x68(%rax), %rcx
movq %r15, %rdi
movq -0x50(%rbp), %rsi
movq %r12, %rdx
callq 0xffa1
movq 0x8(%r12), %rdx
testq %rdx, %rdx
leaq 0x2ec58(%rip), %rbx     # 0x3ff16
cmoveq %rbx, %rdx
leaq -0xe8(%rbp), %r15
movq 0x28(%r15), %rcx
testq %rcx, %rcx
cmoveq %rbx, %rcx
movq 0x18(%r14), %r8
testq %r8, %r8
cmoveq %rbx, %r8
leaq 0x2e484(%rip), %rsi     # 0x3f76a
movq -0x58(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x739a
movq 0x8(%r12), %rsi
testq %rsi, %rsi
cmoveq %rbx, %rsi
addq $0x20, %r14
movq %r14, %rdi
callq 0x6e99
movq %r15, %rdi
callq 0xc8e4
movq %r13, %rdi
callq 0xc8e4
leaq -0xa8(%rbp), %rdi
callq 0xc8e4
movq %r12, %rdi
callq 0x72b9
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2d89b(%rip), %rdi     # 0x3ebe4
leaq 0x2d024(%rip), %rsi     # 0x3e374
leaq 0x2e348(%rip), %rcx     # 0x3f69f
movl $0x99c, %edx            # imm = 0x99C
callq 0x30a0
leaq 0x2ec0f(%rip), %rdi     # 0x3ff77
leaq 0x2d005(%rip), %rsi     # 0x3e374
leaq 0x2e329(%rip), %rcx     # 0x3f69f
movl $0x9a2, %edx            # imm = 0x9A2
callq 0x30a0
leaq 0x2e38d(%rip), %rdi     # 0x3f714
leaq 0x2cfe6(%rip), %rsi     # 0x3e374
leaq 0x2e30a(%rip), %rcx     # 0x3f69f
movl $0x99f, %edx            # imm = 0x99F
callq 0x30a0