// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/officeart.c
// Function: de_run_officeart
static void de_run_officeart(deark *c, de_module_params *mparams)
{
	struct officeartctx * oactx = NULL;
	dbuf *inf = c->infile;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	oactx = de_malloc(c, sizeof(struct officeartctx));

	oactx->record_pos = 0;
	while(1) {
		i64 ret;

		if(oactx->record_pos >= inf->len-8) break;

		// Have we reached the end of any containers?
		while(oactx->container_end_stackptr>0 &&
			oactx->record_pos>=oactx->container_end_stack[oactx->container_end_stackptr-1])
		{
			oactx->container_end_stackptr--;
			de_dbg_indent(c, -1);
		}

		ret = do_OfficeArtStream_record(c, oactx, inf);
		if(!ret || oactx->record_bytes_consumed<=0) break;

		oactx->record_pos += oactx->record_bytes_consumed;

		// Is a new container open?
		if(oactx->is_container && oactx->container_end_stackptr<OACTX_STACKSIZE) {
			oactx->container_end_stack[oactx->container_end_stackptr++] = oactx->container_endpos;
			de_dbg_indent(c, 1);
		}
	}

	de_free(c, oactx);
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %r15
leaq 0x34(%rsp), %rsi
callq 0xdebae
pushq $0x78
popq %rsi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r14
andq $0x0, 0x58(%rax)
pushq $-0x1
popq %r12
xorl %ebp, %ebp
movq %r15, 0x18(%rsp)
movq 0x18(%r15), %rax
addq $-0x8, %rax
cmpq %rax, %rbp
jge 0x9908a
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x98c1b
cmpq -0x8(%r14,%rax,8), %rbp
jl 0x98c1b
decq %rax
movq %rax, 0x50(%r14)
movq %rbx, %rdi
movl %r12d, %esi
callq 0xdeba7
movq 0x58(%r14), %rbp
jmp 0x98bf3
movq %rbp, 0x8(%rsp)
andq $0x0, 0x60(%r14)
andl $0x0, 0x68(%r14)
andq $0x0, 0x70(%r14)
movq %rbx, %rdi
leaq 0x24(%rsp), %rsi
callq 0xdebae
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0xe3fc4
movq %rax, %r13
movl %r13d, %r12d
andl $0xf, %r12d
cmpl $0xf, %r12d
jne 0x98c61
movl $0x1, 0x68(%r14)
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0xe3fc4
movq %r15, %rdi
movq %rax, %r15
notl %eax
testw $0xf000, %ax            # imm = 0xF000
jne 0x99077
shrl $0x4, %r13d
leaq 0x8(%rsp), %rsi
callq 0xe40bf
movq %rax, %r11
xorl %ecx, %ecx
leaq 0xef806(%rip), %rsi     # 0x1884a0
leaq 0x18(%rcx), %rax
cmpq $0x198, %rax            # imm = 0x198
je 0x98cb9
movzwl (%rcx,%rsi), %edx
movq %rax, %rcx
cmpl %r15d, %edx
jne 0x98c9a
movq -0x10(%rax,%rsi), %r10
jmp 0x98cc0
leaq 0x86221(%rip), %r10     # 0x11eee1
movq %rbx, %rdi
leaq 0x8bfc6(%rip), %rsi     # 0x124c90
movq %rbp, %rdx
movl %r12d, %ecx
movl %r13d, %r8d
movl %r15d, %r9d
xorl %eax, %eax
pushq %r11
pushq %r10
movq %r11, 0x38(%rsp)
callq 0xde896
popq %rax
popq %rcx
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x28(%rsp), %r9
movq 0x8(%rsp), %r8
leaq (%r8,%r9), %rax
movq 0x18(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jg 0x99077
cmpl $0x0, 0x68(%r14)
je 0x98d2b
movq 0x58(%r14), %rax
addq %r9, %rax
addq $0x8, %rax
movq %rax, 0x70(%r14)
pushq $0x8
popq %rax
jmp 0x98d34
movq %r9, %rax
subq %rbp, %rax
addq %r8, %rax
movq %rax, 0x60(%r14)
leal -0xf118(%r15), %eax
cmpl $0xffffff00, %eax       # imm = 0xFFFFFF00
jb 0x98efa
movzwl %r15w, %eax
addl $0xffff0fe6, %eax       # imm = 0xFFFF0FE6
cmpl $0xf, %eax
ja 0x98ee3
leaq 0x8bedd(%rip), %rcx     # 0x124c40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x3d4, %r13d           # imm = 0x3D4
je 0x98f7b
cmpl $0x3d5, %r13d           # imm = 0x3D5
jne 0x98ee3
movb $0x1, %al
movl %eax, 0x4(%rsp)
leaq 0x752f2(%rip), %rbp     # 0x10e085
jmp 0x98e62
pushq $0x11
popq %rax
cmpl $0x7a8, %r13d           # imm = 0x7A8
je 0x98db4
cmpl $0x7a9, %r13d           # imm = 0x7A9
jne 0x98ee3
pushq $0x21
popq %rax
addq %rax, %r8
movq %r8, 0x8(%rsp)
subq %rax, %r9
movq %rbx, %rdi
leaq 0x7d486(%rip), %rsi     # 0x11624f
leaq 0x9d81c(%rip), %rdx     # 0x1365ec
movq 0x18(%rsp), %rcx
callq 0xdfa28
jmp 0x98efa
cmpl $0x216, %r13d           # imm = 0x216
je 0x98f6c
cmpl $0x217, %r13d           # imm = 0x217
jne 0x98ee3
movb $0x1, %al
movl %eax, 0x4(%rsp)
leaq 0x76681(%rip), %rbp     # 0x10f487
jmp 0x98e62
leaq 0xa4188(%rip), %rsi     # 0x13cf97
pushq $0x11
popq %r12
cmpl $0x6e4, %r13d           # imm = 0x6E4
je 0x98ed5
cmpl $0x6e5, %r13d           # imm = 0x6E5
jne 0x98ee3
leaq 0xa4163(%rip), %rsi     # 0x13cf97
jmp 0x98ed1
cmpl $0x542, %r13d           # imm = 0x542
je 0x98f8a
cmpl $0x543, %r13d           # imm = 0x543
jne 0x98ee3
movl $0x0, 0x4(%rsp)
leaq 0x6ffee(%rip), %rbp     # 0x108e50
movq %rbp, 0x10(%rsp)
pushq $0x42
jmp 0x98fa0
leaq 0x8d765(%rip), %rsi     # 0x1265da
pushq $0x11
popq %r12
cmpl $0x46a, %r13d           # imm = 0x46A
je 0x98ed5
cmpl $0x6e3, %r13d           # imm = 0x6E3
je 0x98ea4
leaq 0x8d748(%rip), %rsi     # 0x1265da
cmpl $0x6e2, %r13d           # imm = 0x6E2
je 0x98ed5
cmpl $0x46b, %r13d           # imm = 0x46B
jne 0x98ee3
leaq 0x8d72f(%rip), %rsi     # 0x1265da
jmp 0x98ed1
leaq 0x8263c(%rip), %rsi     # 0x11b4f0
pushq $0x11
popq %r12
cmpl $0x6e0, %r13d           # imm = 0x6E0
je 0x98ed5
cmpl $0x6e1, %r13d           # imm = 0x6E1
jne 0x98ee3
leaq 0x8261f(%rip), %rsi     # 0x11b4f0
pushq $0x21
popq %r12
addq %r12, %r8
movb $0x1, %r13b
movb $0x1, %bpl
jmp 0x98fe4
movq %rbx, %rdi
leaq 0x8bde6(%rip), %rsi     # 0x124cd3
movl %r13d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0xdf05a
xorl %r15d, %r15d
pushq $-0x1
popq %r12
movl 0x24(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
movq %r15, %rdi
callq 0xe5591
movq 0x60(%r14), %rbp
testq %rbp, %rbp
movq 0x18(%rsp), %r15
jle 0x9908a
addq 0x58(%r14), %rbp
movq %rbp, 0x58(%r14)
cmpl $0x0, 0x68(%r14)
je 0x98be2
movq 0x50(%r14), %rax
cmpq $0x9, %rax
ja 0x98be2
movq 0x70(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x50(%r14)
movq %rcx, (%r14,%rax,8)
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x58(%r14), %rbp
jmp 0x98be2
movb $0x1, %al
movl %eax, 0x4(%rsp)
leaq 0x7650e(%rip), %rbp     # 0x10f487
jmp 0x98f99
movb $0x1, %al
movl %eax, 0x4(%rsp)
leaq 0x750fd(%rip), %rbp     # 0x10e085
jmp 0x98f99
movl $0x0, 0x4(%rsp)
leaq 0x6feb7(%rip), %rbp     # 0x108e50
movq %rbp, 0x10(%rsp)
pushq $0x32
popq %r12
leaq (%r8,%r12), %rsi
addq $-0x2, %rsi
movq 0x18(%rsp), %rdi
callq 0xe3eb4
movzbl %al, %r15d
movq %rbx, %rdi
leaq 0x71b55(%rip), %rsi     # 0x10ab17
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
testb %r15b, %r15b
setne %r13b
movq 0x8(%rsp), %r8
addq %r12, %r8
movl 0x4(%rsp), %ebp
movq 0x10(%rsp), %rsi
movq %r8, 0x8(%rsp)
movq %rbx, %rdi
xorl %edx, %edx
pushq $0x1
popq %rcx
callq 0xe4e62
movq %rax, %r15
testb %bpl, %bpl
jne 0x9900b
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
callq 0xe5d20
testb %r13b, %r13b
je 0x9902f
movq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdx
subq %r12, %rdx
movq 0x18(%rsp), %rdi
movq %r15, %rcx
callq 0xe45f4
jmp 0x98efd
movq 0x28(%rsp), %r13
subq %r12, %r13
movq 0x8(%rsp), %rsi
subq $0x8, %rsp
movq 0x20(%rsp), %rdi
movq %r13, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x1
callq 0xf4638
popq %rcx
popq %rdx
movq 0x18(%r15), %rcx
movq %rbx, %rdi
leaq 0x7b3f7(%rip), %rsi     # 0x11445f
movq %r13, %rdx
xorl %eax, %eax
callq 0xde896
jmp 0x98efd
movl 0x24(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
xorl %edi, %edi
callq 0xe5591
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
movl 0x34(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq