// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/backend/asmgen_gas32.c
// Function: asm_stat_asm_get_reg
static void _asm_stat_asm_get_reg(
	ASMGeneratorGas32Context *ctx,
	ParserASTNode *node
) {
	assert(ctx);
	assert(node);
	assert(node->type == BE_NODE_STAT_ASM_GET_REG);
	assert(node->nchilds == 2);

	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);

	ParserASTNode *node_source = node->childs[1];
	assert(node_source->type == BE_NODE_LITERAL_STRING);

	ResizableString rstr_reg;
	rstr_init(&rstr_reg);
	_out_literal_string(ctx, &rstr_reg, node_source);

	ParserSymbol *tmp = _instantiate_varsym(ctx, symbol_target, 0);

	_asm_inst_mov_sym_x(
		ctx,
		ctx->body,
		tmp,
		RSTR_CSTR(&rstr_reg)
	);

	_free_varsym(ctx, tmp);

	rstr_free(&rstr_reg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x12959
jmp 0x12978
leaq 0x6d801(%rip), %rdi     # 0x80161
leaq 0x62f91(%rip), %rsi     # 0x758f8
movl $0x1196, %edx           # imm = 0x1196
leaq 0x64531(%rip), %rcx     # 0x76ea4
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x12981
jmp 0x129a0
leaq 0x63bd4(%rip), %rdi     # 0x7655c
leaq 0x62f69(%rip), %rsi     # 0x758f8
movl $0x1197, %edx           # imm = 0x1197
leaq 0x64509(%rip), %rcx     # 0x76ea4
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0xb42, (%rax)          # imm = 0xB42
jne 0x129ae
jmp 0x129cd
leaq 0x64537(%rip), %rdi     # 0x76eec
leaq 0x62f3c(%rip), %rsi     # 0x758f8
movl $0x1198, %edx           # imm = 0x1198
leaq 0x644dc(%rip), %rcx     # 0x76ea4
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x129d9
jmp 0x129f8
leaq 0x70364(%rip), %rdi     # 0x82d44
leaq 0x62f11(%rip), %rsi     # 0x758f8
movl $0x1199, %edx           # imm = 0x1199
leaq 0x644b1(%rip), %rcx     # 0x76ea4
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 0x12a15
jmp 0x12a34
leaq 0x639a1(%rip), %rdi     # 0x763bd
leaq 0x62ed5(%rip), %rsi     # 0x758f8
movl $0x119c, %edx           # imm = 0x119C
leaq 0x64475(%rip), %rcx     # 0x76ea4
callq 0x30a0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1f720
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x303, (%rax)          # imm = 0x303
jne 0x12a63
jmp 0x12a82
leaq 0x644a9(%rip), %rdi     # 0x76f13
leaq 0x62e87(%rip), %rsi     # 0x758f8
movl $0x11a0, %edx           # imm = 0x11A0
leaq 0x64427(%rip), %rcx     # 0x76ea4
callq 0x30a0
leaq -0x38(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x21ff0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x1f8e0
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x12adf
leaq 0x63466(%rip), %rax     # 0x75f3f
movq %rax, -0x60(%rbp)
jmp 0x12ae7
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rdx
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rcx
callq 0x20080
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x1fd10
leaq -0x38(%rbp), %rdi
callq 0x9310
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)