// File: /workspace/github_c_makefile_star2_O0/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
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1c808
jmp 0x1c827
leaq 0x5fd47(%rip), %rdi     # 0x7c556
leaq 0x57b7e(%rip), %rsi     # 0x74394
movl $0x99a, %edx            # imm = 0x99A
leaq 0x5905e(%rip), %rcx     # 0x75880
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x1c830
jmp 0x1c84f
leaq 0x562d7(%rip), %rdi     # 0x72b0e
leaq 0x57b56(%rip), %rsi     # 0x74394
movl $0x99b, %edx            # imm = 0x99B
leaq 0x59036(%rip), %rcx     # 0x75880
callq 0x30a0
cmpq $0x0, -0x20(%rbp)
je 0x1c858
jmp 0x1c877
leaq 0x583b4(%rip), %rdi     # 0x74c13
leaq 0x57b2e(%rip), %rsi     # 0x74394
movl $0x99c, %edx            # imm = 0x99C
leaq 0x5900e(%rip), %rcx     # 0x75880
callq 0x30a0
cmpq $0x0, -0x28(%rbp)
je 0x1c880
jmp 0x1c89f
leaq 0x5974c(%rip), %rdi     # 0x75fd3
leaq 0x57b06(%rip), %rsi     # 0x74394
movl $0x99d, %edx            # imm = 0x99D
leaq 0x58fe6(%rip), %rcx     # 0x75880
callq 0x30a0
movq -0x28(%rbp), %rax
cmpl $0xe90, (%rax)          # imm = 0xE90
je 0x1c8b7
movq -0x28(%rbp), %rax
cmpl $0xe19, (%rax)          # imm = 0xE19
jne 0x1c8b9
jmp 0x1c8d8
leaq 0x59035(%rip), %rdi     # 0x758f5
leaq 0x57acd(%rip), %rsi     # 0x74394
movl $0x99f, %edx            # imm = 0x99F
leaq 0x58fad(%rip), %rcx     # 0x75880
callq 0x30a0
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1c8ed
jmp 0x1c90c
leaq 0x5987f(%rip), %rdi     # 0x76173
leaq 0x57a99(%rip), %rsi     # 0x74394
movl $0x9a2, %edx            # imm = 0x9A2
leaq 0x58f79(%rip), %rcx     # 0x75880
callq 0x30a0
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x50(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x113b0
leaq -0xd0(%rbp), %rdi
callq 0x113b0
leaq -0x110(%rbp), %rdi
callq 0x113b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rdx
callq 0x13d10
movq -0x10(%rbp), %rdi
leaq -0x90(%rbp), %rsi
addq $0x10, %rsi
callq 0x9100
movq -0x10(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x9100
cmpq $0x0, -0x18(%rbp)
je 0x1c9be
movq -0x18(%rbp), %rdi
leaq -0x90(%rbp), %rsi
addq $0x30, %rsi
callq 0x9100
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rcx
leaq -0xd0(%rbp), %rdx
callq 0x13d10
movq -0x10(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
addq $0x10, %rsi
callq 0x9100
movq -0x10(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x9100
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rdx
movq -0x50(%rbp), %r8
leaq -0x110(%rbp), %rsi
leaq -0xd0(%rbp), %rcx
callq 0x11460
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
addq $0x10, %rsi
callq 0x9100
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x9100
leaq -0x120(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rax
movq 0x68(%rax), %rcx
leaq -0x120(%rbp), %rdx
callq 0x1ab00
movq -0x20(%rbp), %rax
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x118(%rbp)
jne 0x1ca8a
leaq 0x5ae34(%rip), %rax     # 0x778b5
movq %rax, -0x130(%rbp)
jmp 0x1ca98
movq -0x118(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x138(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x1cabd
leaq 0x5ae01(%rip), %rax     # 0x778b5
movq %rax, -0x140(%rbp)
jmp 0x1cac8
movq -0x68(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0x148(%rbp)
cmpq $0x0, -0xe8(%rbp)
jne 0x1caf0
leaq 0x5adce(%rip), %rax     # 0x778b5
movq %rax, -0x150(%rbp)
jmp 0x1cafe
movq -0xe8(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x148(%rbp), %rcx
movq -0x138(%rbp), %rdx
movq -0x128(%rbp), %rdi
movq -0x150(%rbp), %r8
leaq 0x58e2a(%rip), %rsi     # 0x7594b
movb $0x0, %al
callq 0x94d0
movq -0x20(%rbp), %rax
movq %rax, -0x158(%rbp)
cmpq $0x0, -0x118(%rbp)
jne 0x1cb4d
leaq 0x5ad71(%rip), %rax     # 0x778b5
movq %rax, -0x160(%rbp)
jmp 0x1cb5b
movq -0x118(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x158(%rbp), %rdi
movq -0x160(%rbp), %rsi
callq 0x1a6c0
leaq -0x90(%rbp), %rdi
callq 0x130a0
leaq -0xd0(%rbp), %rdi
callq 0x130a0
leaq -0x110(%rbp), %rdi
callq 0x130a0
leaq -0x120(%rbp), %rdi
callq 0x9310
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopw (%rax,%rax)