// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/backend/asmgen_gas64.c
// Function: asm_stat_store
static void _asm_stat_store(
	ASMGeneratorGas64Context *ctx,
	ParserASTNode *node
) {
	assert(ctx);
	assert(node);
	assert(node->type == BE_NODE_STAT_STORE);
	assert(node->nchilds == 2);

	ParserASTNode *node_target = node->childs[0];
	uint8_t type_target = _move_id_or_constexpr_to_reg(
		ctx,
		_ASM_REG_AX,
		node_target
	);
	assert(type_target == BE_TYPE_POINTER);

	ParserASTNode *node_source = node->childs[1];
	uint8_t type_source = _move_id_or_constexpr_to_reg(
		ctx,
		_ASM_REG_BX,
		node_source
	);

	ResizableString rstr_memref;
	rstr_init(&rstr_memref);
	_asm_inst_memref_base(ctx, &rstr_memref, _ASM_REG_NAME_RAX);

	_asm_inst_mov_x_x(
		ctx,
		ctx->body,
		type_source,
		RSTR_CSTR(&rstr_memref),
		_asm_inst_reg(ctx, type_source, _ASM_REG_BX)
	);

	rstr_free(&rstr_memref);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2b939
jmp 0x2b958
leaq 0x54821(%rip), %rdi     # 0x80161
leaq 0x4f1bd(%rip), %rsi     # 0x7ab04
movl $0xf7c, %edx            # imm = 0xF7C
leaq 0x50435(%rip), %rcx     # 0x7bd88
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x2b961
jmp 0x2b980
leaq 0x4abf4(%rip), %rdi     # 0x7655c
leaq 0x4f195(%rip), %rsi     # 0x7ab04
movl $0xf7d, %edx            # imm = 0xF7D
leaq 0x5040d(%rip), %rcx     # 0x7bd88
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0xb80, (%rax)          # imm = 0xB80
jne 0x2b98e
jmp 0x2b9ad
leaq 0x4bc57(%rip), %rdi     # 0x775ec
leaq 0x4f168(%rip), %rsi     # 0x7ab04
movl $0xf7e, %edx            # imm = 0xF7E
leaq 0x503e0(%rip), %rcx     # 0x7bd88
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x2b9b9
jmp 0x2b9d8
leaq 0x57384(%rip), %rdi     # 0x82d44
leaq 0x4f13d(%rip), %rsi     # 0x7ab04
movl $0xf7f, %edx            # imm = 0xF7F
leaq 0x503b5(%rip), %rcx     # 0x7bd88
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0x334a0
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x10, %eax
jne 0x2ba04
jmp 0x2ba23
leaq 0x4bc02(%rip), %rdi     # 0x7760d
leaq 0x4f0f2(%rip), %rsi     # 0x7ab04
movl $0xf87, %edx            # imm = 0xF87
leaq 0x5036a(%rip), %rcx     # 0x7bd88
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl $0x1, %esi
callq 0x334a0
movb %al, -0x29(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq 0x4f65a(%rip), %rdx     # 0x7b0ba
callq 0x35240
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x50(%rbp)
movb -0x29(%rbp), %al
movb %al, -0x41(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x2ba93
leaq 0x4a4b2(%rip), %rax     # 0x75f3f
movq %rax, -0x60(%rbp)
jmp 0x2ba9b
movq -0x38(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %edx
movzbl -0x29(%rbp), %esi
callq 0x334d0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x68(%rbp), %rcx
movq %rax, %r8
movb -0x41(%rbp), %al
movzbl %al, %edx
callq 0x33720
leaq -0x40(%rbp), %rdi
callq 0x9310
addq $0x70, %rsp
popq %rbp
retq
nop