// File: /workspace/github_c_makefile_star2_O0/Encryptr[P]O-plus-plus/opp/compiler/compile_expr.c
// Function: opp_compile_struct
static Opp_Obj opp_compile_struct(struct Opp_Context* opp, struct Opp_Node* unary)
{
	bool global = unary->unary_expr.bidx->type == TYPE_GLOBAL || 
		unary->unary_expr.bidx->type == TYPE_EXTERN || 
		unary->unary_expr.bidx->type == TYPE_FUNC;

	opp->info.dot.sym = unary->unary_expr.bidx;

	if (global || (unary->unary_expr.bidx->sym_type.depth > 0 && unary->unary_expr.bidx->sym_type.size == 0)) {
		opp->info.dot.inptr = true;
		OPCODE_START();
			OPCODE_TYPE(OPCODE_CONST);
			opp->ir.opcodes[opp->ir.instr_idx].constant.loc_type = IMM_U64;
			opp->ir.opcodes[opp->ir.instr_idx].constant.val.type = 
				global ? IMM_SYM : IMM_LOC;

			if (global) {
				opp->ir.opcodes[opp->ir.instr_idx].constant.val.type = IMM_SYM;
				opp->ir.opcodes[opp->ir.instr_idx].constant.val.imm_sym = 
					unary->unary_expr.bidx->key;
			}
			else {
				opp->ir.opcodes[opp->ir.instr_idx].constant.val.type = IMM_LOC;
				opp->ir.opcodes[opp->ir.instr_idx].constant.val.imm_i32 = 
					unary->unary_expr.bidx->offset;
			}
		OPCODE_END();
	}

	if ((unary->unary_expr.bidx->sym_type.size > 0 || unary->unary_expr.bidx->sym_type.depth == 0) && !global)
		opp->info.dot.offset = unary->unary_expr.bidx->offset;

	return unary->unary_expr.bidx->sym_type;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movb $0x1, %al
cmpl $0x0, 0x8(%rcx)
movb %al, 0xe(%rsp)
je 0x727c
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movb $0x1, %al
cmpl $0x4, 0x8(%rcx)
movb %al, 0xe(%rsp)
je 0x727c
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
cmpl $0x2, 0x8(%rax)
sete %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
andb $0x1, %al
movb %al, 0xf(%rsp)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x30(%rax)
testb $0x1, 0xf(%rsp)
jne 0x72cb
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movzwl 0x18(%rax), %eax
cmpl $0x0, %eax
jle 0x73e0
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movzwl 0x1a(%rax), %eax
cmpl $0x0, %eax
jne 0x73e0
movq 0x18(%rsp), %rax
movb $0x1, 0x3c(%rax)
movq 0x18(%rsp), %rdi
callq 0x5600
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x18(%rsp), %rcx
imulq $0x28, 0x48(%rcx), %rcx
addq %rcx, %rax
movl $0x0, (%rax)
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x18(%rsp), %rcx
imulq $0x28, 0x48(%rcx), %rcx
addq %rcx, %rax
movl $0x9, 0x18(%rax)
movb 0xf(%rsp), %dl
movl $0x2, %ecx
xorl %eax, %eax
testb $0x1, %dl
cmovnel %eax, %ecx
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x18(%rsp), %rdx
imulq $0x28, 0x48(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
testb $0x1, 0xf(%rsp)
je 0x738d
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x18(%rsp), %rcx
imulq $0x28, 0x48(%rcx), %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x18(%rsp), %rdx
imulq $0x28, 0x48(%rdx), %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
jmp 0x73cf
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x18(%rsp), %rcx
imulq $0x28, 0x48(%rcx), %rcx
addq %rcx, %rax
movl $0x2, 0x8(%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movl 0x28(%rax), %ecx
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x18(%rsp), %rdx
imulq $0x28, 0x48(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x48(%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movzwl 0x1a(%rax), %eax
cmpl $0x0, %eax
jg 0x7404
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movzwl 0x18(%rax), %eax
cmpl $0x0, %eax
jne 0x741f
testb $0x1, 0xf(%rsp)
jne 0x741f
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movl 0x28(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x38(%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movups 0x10(%rax), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdx
addq $0x38, %rsp
retq