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

	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);
	assert(type_target == BE_TYPE_POINTER);

	ParserASTNode *node_source_left = node->childs[1];
	MoveIdOrConstexprToRegEx result;
	_move_id_or_constexpr_to_reg_ex(
		ctx,
		_ASM_REG_AX,
		_ASM_REG_BX,
		node_source_left,
		&result
	);
	assert(result.node_type->type == BE_NODE_TYPE_POINTER);
	assert(result.node_type->childs[0]->type == BE_NODE_TYPE_STRUCT);
	ParserASTNode *node_struct_id = result.node_type->childs[0]->childs[0];

	ParserASTNode *node_source_right = node->childs[2];
	assert(node_source_right->type == BE_NODE_IDENTIFIER);
	ParserSymbol *symbol_struct_member = be_sem_get_struct_member_symbol(
		ctx->psrctx, node_struct_id, node_source_right
	);
	size_t offset = BE_STRUCT_MEMBER_VAR_SYMBOL_GET_OFFSET(symbol_struct_member);
	ResizableString rstr_offset;
	rstr_init(&rstr_offset);
	_asm_inst_uint_const(
		ctx,
		&rstr_offset,
		offset
	);
	_asm_inst_add_x_x(
		ctx,
		ctx->body,
		BE_TYPE_UINT32,
		_ASM_REG_NAME_EAX,
		RSTR_CSTR(&rstr_offset)
	);
	rstr_free(&rstr_offset);

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

	_asm_inst_mov_sym_x(
		ctx,
		ctx->body,
		symbol_target_l,
		_ASM_REG_NAME_EAX
	);

	_free_varsym(ctx, symbol_target_l);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x183ac
jmp 0x183cb
leaq 0x67dae(%rip), %rdi     # 0x80161
leaq 0x5d53e(%rip), %rsi     # 0x758f8
movl $0x1c43, %edx           # imm = 0x1C43
leaq 0x60f88(%rip), %rcx     # 0x7934e
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x183d4
jmp 0x183f3
leaq 0x5e181(%rip), %rdi     # 0x7655c
leaq 0x5d516(%rip), %rsi     # 0x758f8
movl $0x1c44, %edx           # imm = 0x1C44
leaq 0x60f60(%rip), %rcx     # 0x7934e
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0xbe5, (%rax)          # imm = 0xBE5
jne 0x18401
jmp 0x18420
leaq 0x60f86(%rip), %rdi     # 0x7938e
leaq 0x5d4e9(%rip), %rsi     # 0x758f8
movl $0x1c45, %edx           # imm = 0x1C45
leaq 0x60f33(%rip), %rcx     # 0x7934e
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0x3, 0x44(%rax)
jne 0x1842c
jmp 0x1844b
leaq 0x5ed0b(%rip), %rdi     # 0x7713e
leaq 0x5d4be(%rip), %rsi     # 0x758f8
movl $0x1c46, %edx           # imm = 0x1C46
leaq 0x60f08(%rip), %rcx     # 0x7934e
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 0x18468
jmp 0x18487
leaq 0x5df4e(%rip), %rdi     # 0x763bd
leaq 0x5d482(%rip), %rsi     # 0x758f8
movl $0x1c49, %edx           # imm = 0x1C49
leaq 0x60ecc(%rip), %rcx     # 0x7934e
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)
movzbl -0x21(%rbp), %eax
cmpl $0x10, %eax
jne 0x184ad
jmp 0x184cc
leaq 0x5f159(%rip), %rdi     # 0x7760d
leaq 0x5d43d(%rip), %rsi     # 0x758f8
movl $0x1c4c, %edx           # imm = 0x1C4C
leaq 0x60e87(%rip), %rcx     # 0x7934e
callq 0x30a0
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
leaq -0x48(%rbp), %r8
callq 0x201a0
movq -0x38(%rbp), %rax
cmpl $0x440, (%rax)          # imm = 0x440
jne 0x18502
jmp 0x18521
leaq 0x60ea4(%rip), %rdi     # 0x793ad
leaq 0x5d3e8(%rip), %rsi     # 0x758f8
movl $0x1c57, %edx           # imm = 0x1C57
leaq 0x60e32(%rip), %rcx     # 0x7934e
callq 0x30a0
movq -0x38(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
cmpl $0x410, (%rax)          # imm = 0x410
jne 0x18536
jmp 0x18555
leaq 0x60e9f(%rip), %rdi     # 0x793dc
leaq 0x5d3b4(%rip), %rsi     # 0x758f8
movl $0x1c58, %edx           # imm = 0x1C58
leaq 0x60dfe(%rip), %rcx     # 0x7934e
callq 0x30a0
movq -0x38(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpl $0x200, (%rax)          # imm = 0x200
jne 0x18589
jmp 0x185a8
leaq 0x60e85(%rip), %rdi     # 0x79415
leaq 0x5d361(%rip), %rsi     # 0x758f8
movl $0x1c5c, %edx           # imm = 0x1C5C
leaq 0x60dab(%rip), %rcx     # 0x7934e
callq 0x30a0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x4dd00
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x68(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
movq -0x68(%rbp), %rdx
leaq -0x78(%rbp), %rsi
callq 0x21e80
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x18617
leaq 0x5d931(%rip), %rax     # 0x75f3f
movq %rax, -0x98(%rbp)
jmp 0x18622
movq -0x70(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x88(%rbp), %rsi
movq -0x90(%rbp), %rdi
movq -0x98(%rbp), %r8
movl $0x8, %edx
leaq 0x5dda2(%rip), %rcx     # 0x763e5
callq 0x21eb0
leaq -0x78(%rbp), %rdi
callq 0x9310
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x1f8e0
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x80(%rbp), %rdx
leaq 0x5dd6a(%rip), %rcx     # 0x763e5
callq 0x20080
movq -0x8(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x1fd10
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)