// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/backend/asmgen_gas64.c
// Function: asm_stat_asm_get_reg
static void _asm_stat_asm_get_reg(
	ASMGeneratorGas64Context *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);

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

	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 0x2ae79
jmp 0x2ae98
leaq 0x552e1(%rip), %rdi     # 0x80161
leaq 0x4fc7d(%rip), %rsi     # 0x7ab04
movl $0xe74, %edx            # imm = 0xE74
leaq 0x50a6e(%rip), %rcx     # 0x7b901
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x2aea1
jmp 0x2aec0
leaq 0x4b6b4(%rip), %rdi     # 0x7655c
leaq 0x4fc55(%rip), %rsi     # 0x7ab04
movl $0xe75, %edx            # imm = 0xE75
leaq 0x50a46(%rip), %rcx     # 0x7b901
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0xb42, (%rax)          # imm = 0xB42
jne 0x2aece
jmp 0x2aeed
leaq 0x4c017(%rip), %rdi     # 0x76eec
leaq 0x4fc28(%rip), %rsi     # 0x7ab04
movl $0xe76, %edx            # imm = 0xE76
leaq 0x50a19(%rip), %rcx     # 0x7b901
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x2aef9
jmp 0x2af18
leaq 0x57e44(%rip), %rdi     # 0x82d44
leaq 0x4fbfd(%rip), %rsi     # 0x7ab04
movl $0xe77, %edx            # imm = 0xE77
leaq 0x509ee(%rip), %rcx     # 0x7b901
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 0x2af35
jmp 0x2af54
leaq 0x4b481(%rip), %rdi     # 0x763bd
leaq 0x4fbc1(%rip), %rsi     # 0x7ab04
movl $0xe7a, %edx            # imm = 0xE7A
leaq 0x509b2(%rip), %rcx     # 0x7b901
callq 0x30a0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x32820
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 0x2af83
jmp 0x2afa2
leaq 0x4bf89(%rip), %rdi     # 0x76f13
leaq 0x4fb73(%rip), %rsi     # 0x7ab04
movl $0xe7e, %edx            # imm = 0xE7E
leaq 0x50964(%rip), %rcx     # 0x7b901
callq 0x30a0
leaq -0x38(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x34590
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)
cmpq $0x0, -0x30(%rbp)
jne 0x2afec
leaq 0x4af59(%rip), %rax     # 0x75f3f
movq %rax, -0x58(%rbp)
jmp 0x2aff4
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rdx
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rcx
callq 0x32d40
leaq -0x38(%rbp), %rdi
callq 0x9310
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)