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

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

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

	_asm_inst_mov_x_x(
		ctx,
		ctx->body,
		BE_TYPE_UINT32,
		_ASM_REG_NAME_EAX,
		RSTR_CSTR(BE_VAR_SYMBOL_GET_CODE_GEN_NAME(symbol_target_l))
	);

	_free_varsym(ctx, symbol_target_l);

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

	_asm_inst_mov_x_x(
		ctx,
		ctx->body,
		BE_TYPE_UINT32,
		RSTR_CSTR(&rstr_memref),
		_ASM_CONST_0
	);

	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 0x1ed79
jmp 0x1ed98
leaq 0x613e1(%rip), %rdi     # 0x80161
leaq 0x56b71(%rip), %rsi     # 0x758f8
movl $0x29df, %edx           # imm = 0x29DF
leaq 0x5b464(%rip), %rcx     # 0x7a1f7
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x1eda1
jmp 0x1edc0
leaq 0x577b4(%rip), %rdi     # 0x7655c
leaq 0x56b49(%rip), %rsi     # 0x758f8
movl $0x29e0, %edx           # imm = 0x29E0
leaq 0x5b43c(%rip), %rcx     # 0x7a1f7
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0xb71, (%rax)          # imm = 0xB71
jne 0x1edce
jmp 0x1eded
leaq 0x5b465(%rip), %rdi     # 0x7a23a
leaq 0x56b1c(%rip), %rsi     # 0x758f8
movl $0x29e1, %edx           # imm = 0x29E1
leaq 0x5b40f(%rip), %rcx     # 0x7a1f7
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0x1, 0x44(%rax)
jne 0x1edf9
jmp 0x1ee18
leaq 0x5860e(%rip), %rdi     # 0x7740e
leaq 0x56af1(%rip), %rsi     # 0x758f8
movl $0x29e2, %edx           # imm = 0x29E2
leaq 0x5b3e4(%rip), %rcx     # 0x7a1f7
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 0x1ee35
jmp 0x1ee54
leaq 0x57581(%rip), %rdi     # 0x763bd
leaq 0x56ab5(%rip), %rsi     # 0x758f8
movl $0x29e5, %edx           # imm = 0x29E5
leaq 0x5b3a8(%rip), %rcx     # 0x7a1f7
callq 0x30a0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1f720
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x1f8e0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x1eea4
leaq 0x570a1(%rip), %rax     # 0x75f3f
movq %rax, -0x50(%rbp)
jmp 0x1eeb0
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %r8
movl $0x8, %edx
leaq 0x5751d(%rip), %rcx     # 0x763e5
callq 0x20f30
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1fd10
leaq -0x38(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq 0x574f3(%rip), %rdx     # 0x763e5
callq 0x23200
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1ef1f
leaq 0x57026(%rip), %rax     # 0x75f3f
movq %rax, -0x68(%rbp)
jmp 0x1ef27
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rcx
movl $0x8, %edx
leaq 0x57b2c(%rip), %r8      # 0x76a6b
callq 0x20f30
leaq -0x38(%rbp), %rdi
callq 0x9310
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)