// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-zip.c
// Function: de_zip_close_file
void de_zip_close_file(deark *c)
{
	struct zipw_ctx *zzz;

	if(!c->zip_data) return;
	de_dbg(c, "closing zip file");

	zzz = (struct zipw_ctx*)c->zip_data;

	zipw_finalize(c, zzz);

	if(c->archive_to_stdout && zzz->outf && zzz->outf->btype==DBUF_TYPE_MEMBUF) {
		dbuf_copy_to_FILE(zzz->outf, 0, zzz->outf->len, stdout);
	}

	dbuf_close(zzz->cdir);
	dbuf_close(zzz->outf);
	de_crcobj_destroy(zzz->crc32o);

	de_free(c, zzz);
	c->zip_data = NULL;
}

// Assembly:
cmpq $0x0, 0x138(%rdi)
je 0xee1e6
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x5aaa7(%rip), %rsi     # 0x148a30
xorl %eax, %eax
callq 0xe9226
movq 0x138(%rbx), %r14
movq 0x20(%r14), %rax
movq 0x18(%rax), %r15
cmpq $0x10000, 0x18(%r14)    # imm = 0x10000
setge %al
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %r15
setg %cl
orb %al, %cl
jne 0xedfd0
movq 0x28(%r14), %rax
movb $0x1, %r12b
movabsq $0x100000000, %rcx      # imm = 0x100000000
cmpq %rcx, 0x18(%rax)
jl 0xedfd3
xorl %r12d, %r12d
leaq 0x5aaf2(%rip), %rsi     # 0x148acc
movq %rbx, %rdi
xorl %edx, %edx
callq 0xea727
testl %eax, %eax
setle %bpl
setg %al
orb %r12b, %al
jne 0xee005
leaq 0x5aae1(%rip), %rsi     # 0x148ada
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9ef5
movq 0x20(%r14), %rcx
movq 0x28(%r14), %rdi
movq 0x18(%rdi), %rdx
xorl %esi, %esi
callq 0xefabc
testb %bpl, %bpl
jne 0xee0dd
movq 0x20(%r14), %rdi
movq 0x18(%rdi), %r12
movl $0x6064b50, %esi        # imm = 0x6064B50
callq 0xf1645
movq 0x20(%r14), %rdi
movl $0x2c, %esi
callq 0xf16da
movq 0x20(%r14), %rdi
movl $0x33f, %esi            # imm = 0x33F
callq 0xf1598
movq 0x20(%r14), %rdi
movl $0x2d, %esi
callq 0xf1598
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xf1645
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xf1645
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
callq 0xf16da
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
callq 0xf16da
movq 0x20(%r14), %rdi
movq 0x28(%r14), %rax
movq 0x18(%rax), %rsi
callq 0xf16da
movq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0xf16da
movq 0x20(%r14), %rdi
movl $0x7064b50, %esi        # imm = 0x7064B50
callq 0xf1645
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xf1645
movq 0x20(%r14), %rdi
movq %r12, %rsi
callq 0xf16da
movq 0x20(%r14), %rdi
movl $0x1, %esi
callq 0xf1645
movq 0x20(%r14), %rdi
movl $0x6054b50, %esi        # imm = 0x6054B50
callq 0xf1645
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xf1598
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xf1598
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
cmpq $0x10000, %rsi          # imm = 0x10000
jl 0xee127
movl $0xffff, %esi           # imm = 0xFFFF
callq 0xf1598
movq 0x20(%r14), %rdi
movl $0xffff, %esi           # imm = 0xFFFF
jmp 0xee134
callq 0xf1598
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
callq 0xf1598
movq 0x20(%r14), %rdi
movq 0x28(%r14), %rax
movq 0x18(%rax), %rsi
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpq %r12, %rsi
cmovgeq %r12, %rsi
callq 0xf1645
cmpq %r12, %r15
cmovlq %r15, %r12
movq 0x20(%r14), %rdi
movq %r12, %rsi
callq 0xf1645
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xf1598
cmpb $0x0, 0x88(%rbx)
je 0xee1ad
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0xee1ad
cmpl $0x3, (%rdi)
jne 0xee1ad
movq 0x18(%rdi), %rdx
testq %rdx, %rdx
jle 0xee1ad
movq 0xa0e34(%rip), %rax     # 0x18efd0
movq (%rax), %r8
leaq 0x41(%rip), %rcx        # 0xee1e7
xorl %esi, %esi
callq 0xefc28
movq 0x28(%r14), %rdi
callq 0xf0b13
movq 0x20(%r14), %rdi
callq 0xf0b13
movq 0x30(%r14), %rdi
callq 0xebe1d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe9752
movq $0x0, 0x138(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq