// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/backend/asmgen_gas32.c
// Function: asm_stat_trunc
static void _asm_stat_trunc(
	ASMGeneratorGas32Context *ctx,
	ParserASTNode *node
) {
	assert(ctx);
	assert(node);
	assert(node->type == BE_NODE_STAT_TRUNC);
	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);
	uint8_t type_target = BE_VAR_SYMBOL_GET_TYPE(symbol_target);

	ParserASTNode *node_source = node->childs[1];

	uint8_t type_source = _move_id_or_constexpr_to_reg(
		ctx,
		_ASM_REG_AX,
		_ASM_REG_BX,
		node_source
	);

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

	_asm_inst_mov_sym_x(
		ctx,
		ctx->body,
		symbol_target_l,
		_asm_inst_reg(ctx, type_target, _ASM_REG_AX)
	);

	_free_varsym(ctx, symbol_target_l);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x13d59
jmp 0x13d78
leaq 0x6c401(%rip), %rdi     # 0x80161
leaq 0x61b91(%rip), %rsi     # 0x758f8
movl $0x1339, %edx           # imm = 0x1339
leaq 0x63939(%rip), %rcx     # 0x776ac
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x13d81
jmp 0x13da0
leaq 0x627d4(%rip), %rdi     # 0x7655c
leaq 0x61b69(%rip), %rsi     # 0x758f8
movl $0x133a, %edx           # imm = 0x133A
leaq 0x63911(%rip), %rcx     # 0x776ac
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0xbc0, (%rax)          # imm = 0xBC0
jne 0x13dae
jmp 0x13dcd
leaq 0x63939(%rip), %rdi     # 0x776ee
leaq 0x61b3c(%rip), %rsi     # 0x758f8
movl $0x133b, %edx           # imm = 0x133B
leaq 0x638e4(%rip), %rcx     # 0x776ac
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x13dd9
jmp 0x13df8
leaq 0x6ef64(%rip), %rdi     # 0x82d44
leaq 0x61b11(%rip), %rsi     # 0x758f8
movl $0x133c, %edx           # imm = 0x133C
leaq 0x638b9(%rip), %rcx     # 0x776ac
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 0x13e15
jmp 0x13e34
leaq 0x625a1(%rip), %rdi     # 0x763bd
leaq 0x61ad5(%rip), %rsi     # 0x758f8
movl $0x133f, %edx           # imm = 0x133F
leaq 0x6387d(%rip), %rcx     # 0x776ac
callq 0x30a0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1f720
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb 0x30(%rax), %al
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rcx
xorl %esi, %esi
movl $0x1, %edx
callq 0x22a20
movb %al, -0x31(%rbp)
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)
movq -0x8(%rbp), %rdi
xorl %edx, %edx
leaq 0x61a46(%rip), %rcx     # 0x758f8
movl $0x1352, %r8d           # imm = 0x1352
movzbl -0x21(%rbp), %esi
callq 0x20d10
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rax, %rcx
callq 0x20080
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x1fd10
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)