// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/plist.c
// Function: de_run_plist
static void de_run_plist(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

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

	if(c->infile->len>0xffffffffU) {
		// We *could* support huge PLIST files, but until I learn that they
		// are valid, for efficiency I'll make sure an offset can fit in
		// 4 bytes.
		de_err(c, "PLIST too large (%"I64_FMT")", c->infile->len);
		goto done;
	}

	if(!do_header(c, d, 0)) goto done;

	if(!do_trailer(c, d, c->infile->len-32)) goto done;
	read_offset_table(c, d);

	do_one_object_by_refnum(c, d, d->top_object_refnum);

done:
	if(d) {
		de_free(c, d->objref_table);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x38, %esi
callq 0xe969b
movq %rax, %r14
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rdx
movabsq $0x100000000, %rax      # imm = 0x100000000
cmpq %rax, %rdx
jl 0xc1515
leaq 0x787cb(%rip), %rsi     # 0x139cd4
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
jmp 0xc157b
leaq 0x77e42(%rip), %rsi     # 0x13935e
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
leaq 0x787b7(%rip), %rdx     # 0x139cea
movl $0x6, %ecx
xorl %esi, %esi
callq 0xf025e
testl %eax, %eax
je 0xc154c
leaq 0x787a7(%rip), %rsi     # 0x139cf1
jmp 0xc1571
movq 0x18(%rbx), %rdi
leaq 0x56d8c(%rip), %rdx     # 0x1182e3
movl $0x6, %esi
movl $0x2, %ecx
callq 0xf025e
testl %eax, %eax
je 0xc15a6
leaq 0x7879b(%rip), %rsi     # 0x139d0c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
testq %r14, %r14
je 0xc1597
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0xe9752
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe9752
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rdx
addq $-0x20, %rdx
movq %rsp, %r15
movq %rdx, (%r15)
leaq 0x7876e(%rip), %rsi     # 0x139d2d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
addq $0x6, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef14d
movzbl %al, %edx
movl %edx, 0x10(%r14)
leaq 0x78747(%rip), %rsi     # 0x139d3b
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef14d
movzbl %al, %edx
movl %edx, 0x14(%r14)
leaq 0x78744(%rip), %rsi     # 0x139d5c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq (%r15), %rsi
callq 0xef4c3
movq %rax, 0x28(%r14)
leaq 0x7873f(%rip), %rsi     # 0x139d78
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq (%r15), %rsi
addq $0x8, %rsi
movq %rsi, (%r15)
movq 0x18(%rbx), %rdi
callq 0xef4c3
movq %rax, 0x18(%r14)
leaq 0x78725(%rip), %rsi     # 0x139d88
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq (%r15), %rsi
addq $0x8, %rsi
movq %rsi, (%r15)
movq 0x18(%rbx), %rdi
callq 0xef4c3
leaq 0x20(%r14), %r12
movq %rax, 0x20(%r14)
leaq 0x7870e(%rip), %rsi     # 0x139da0
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeeeb0
addq $0x8, (%r15)
movl 0x10(%r14), %eax
addl $-0x9, %eax
cmpl $-0x8, %eax
jb 0xc16c7
movl 0x14(%r14), %eax
addl $-0x9, %eax
cmpl $-0x9, %eax
ja 0xc16ea
leaq 0x786ea(%rip), %rsi     # 0x139db8
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
jmp 0xc157b
movq 0x28(%r14), %rdx
cmpq $0xf4241, %rdx          # imm = 0xF4241
jb 0xc170a
leaq 0x786da(%rip), %rsi     # 0x139dd8
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
jmp 0xc16d8
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x20(%r14), %r15
leaq 0x786d3(%rip), %rsi     # 0x139df5
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x28(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0xea259
movq %rax, 0x30(%r14)
cmpq $0x0, 0x28(%r14)
jle 0xc17cb
xorl %ebp, %ebp
movl 0x10(%r14), %edx
leaq (%r15,%rdx), %r12
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %r13
addq $-0x20, %r13
cmpq %r13, %r12
jg 0xc17bd
movq %r15, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xef6f2
movq %rax, (%rsp)
cmpl $0x2, (%rbx)
jl 0xc17a0
movq %rbx, %rdi
leaq 0x78676(%rip), %rsi     # 0x139e09
movq %rbp, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %rsp, %rsi
callq 0xeeeb0
movl (%rsp), %eax
movq 0x30(%r14), %rcx
movl %eax, (%rcx,%rbp,4)
movl 0x10(%r14), %eax
addq %rax, %r15
cmpq %r13, %r12
jg 0xc17cb
incq %rbp
cmpq 0x28(%r14), %rbp
jl 0xc175a
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x18(%r14), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc1812
jmp 0xc157b