// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ole1.c
// Function: de_run_ole1
static void de_run_ole1(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 bytes_consumed = 0;
	int u_flag;

	if(mparams) {
		mparams->out_params.flags = 0;
	}

	d = de_malloc(c, sizeof(lctx));

	d->input_encoding = de_get_input_encoding(c, mparams, DE_ENCODING_WINDOWS1252);
	// Use the "U" code if the exact size of the object is unknown. This will
	// improve the debug messages.
	u_flag = de_havemodcode(c, mparams, 'U');
	d->extract_all = de_get_ext_option_bool(c, "ole1:extractall",
		((c->extract_level>=2)?1:0));

	(void)do_ole_object(c, d, 0, c->infile->len, (u_flag?0:1),
		0, &bytes_consumed);
	calc_ole_obj_size(c, d);
	if(d->calculated_size>0 && d->calculated_size<=c->infile->len) {
		if(mparams) {
			mparams->out_params.flags |= 0x1;
			mparams->out_params.int64_1 = d->calculated_size;
		}
		de_dbg3(c, "ole1: calculated size=%"I64_FMT, d->calculated_size);
	}
	else {
		de_dbg3(c, "ole1: failed to calculate object size");
	}

	de_free(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
je 0x9cb1a
movl $0x0, 0x40(%r15)
movl $0x18, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movl $0x9, %edx
callq 0xeb220
movl %eax, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x55, %edx
callq 0xea4d9
movl %eax, %ebp
xorl %edx, %edx
cmpl $0x2, 0x90(%rbx)
setge %dl
leaq 0x94ef5(%rip), %rsi     # 0x131a57
movq %rbx, %rdi
callq 0xe9bd0
movl %eax, 0x4(%r14)
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rcx
xorl %r8d, %r8d
testl %ebp, %ebp
sete %r8b
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %r9d, %r9d
callq 0x9ccc8
leaq 0x8(%r14), %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq %r14, %r12
addq $0x10, %r12
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeed83
andl $0xff0000ff, %eax       # imm = 0xFF0000FF
cmpl $0x1, %eax
jne 0x9cbd8
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeed83
movq %rax, %r13
addl $-0x4, %eax
cmpl $-0x3, %eax
jae 0x9cbe1
movq (%rbp), %rdx
jmp 0x9cc6e
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeed83
addq (%r12), %rax
movq %rax, (%r12)
cmpl $0x3, %r13d
jne 0x9cc15
addq $0x8, %rax
movq %rax, (%r12)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeed83
addq %rax, (%r12)
jmp 0x9cc66
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeed83
addq %rax, (%r12)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeed83
addq %rax, (%r12)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeed83
addq (%r12), %rax
cmpl $0x2, %r13d
je 0x9cc4f
addq $0x8, %rax
movq %rax, 0x10(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9ddda
testl %eax, %eax
je 0x9cbd8
movq (%r12), %rdx
movq %rdx, (%rbp)
testq %rdx, %rdx
jle 0x9cc7d
movq 0x18(%rbx), %rax
cmpq 0x18(%rax), %rdx
jle 0x9cc90
leaq 0x94dfd(%rip), %rsi     # 0x131a81
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe889f
jmp 0x9ccaf
testq %r15, %r15
je 0x9cc9e
orb $0x1, 0x40(%r15)
movq %rdx, 0x58(%r15)
leaq 0x94dc2(%rip), %rsi     # 0x131a67
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe889f
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe8be2