// File: /workspace/github_c_makefile_star2_O3/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 0xedb9c
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x5b689(%rip), %rsi     # 0x148fc8
xorl %eax, %eax
callq 0xe8617
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 0xed986
movq 0x28(%r14), %rax
movb $0x1, %r12b
movabsq $0x100000000, %rcx      # imm = 0x100000000
cmpq %rcx, 0x18(%rax)
jl 0xed989
xorl %r12d, %r12d
leaq 0x5b6d4(%rip), %rsi     # 0x149064
movq %rbx, %rdi
xorl %edx, %edx
callq 0xe9bd0
testl %eax, %eax
setle %bpl
setg %al
orb %r12b, %al
jne 0xed9bb
leaq 0x5b6c3(%rip), %rsi     # 0x149072
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9393
movq 0x20(%r14), %rcx
movq 0x28(%r14), %rdi
movq 0x18(%rdi), %rdx
xorl %esi, %esi
callq 0xef481
testb %bpl, %bpl
jne 0xeda93
movq 0x20(%r14), %rdi
movq 0x18(%rdi), %r12
movl $0x6064b50, %esi        # imm = 0x6064B50
callq 0xf1042
movq 0x20(%r14), %rdi
movl $0x2c, %esi
callq 0xf10d7
movq 0x20(%r14), %rdi
movl $0x33f, %esi            # imm = 0x33F
callq 0xf0f95
movq 0x20(%r14), %rdi
movl $0x2d, %esi
callq 0xf0f95
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xf1042
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xf1042
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
callq 0xf10d7
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
callq 0xf10d7
movq 0x20(%r14), %rdi
movq 0x28(%r14), %rax
movq 0x18(%rax), %rsi
callq 0xf10d7
movq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0xf10d7
movq 0x20(%r14), %rdi
movl $0x7064b50, %esi        # imm = 0x7064B50
callq 0xf1042
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xf1042
movq 0x20(%r14), %rdi
movq %r12, %rsi
callq 0xf10d7
movq 0x20(%r14), %rdi
movl $0x1, %esi
callq 0xf1042
movq 0x20(%r14), %rdi
movl $0x6054b50, %esi        # imm = 0x6054B50
callq 0xf1042
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xf0f95
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xf0f95
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
cmpq $0x10000, %rsi          # imm = 0x10000
jl 0xedadd
movl $0xffff, %esi           # imm = 0xFFFF
callq 0xf0f95
movq 0x20(%r14), %rdi
movl $0xffff, %esi           # imm = 0xFFFF
jmp 0xedaea
callq 0xf0f95
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
callq 0xf0f95
movq 0x20(%r14), %rdi
movq 0x28(%r14), %rax
movq 0x18(%rax), %rsi
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpq %r12, %rsi
cmovgeq %r12, %rsi
callq 0xf1042
cmpq %r12, %r15
cmovlq %r15, %r12
movq 0x20(%r14), %rdi
movq %r12, %rsi
callq 0xf1042
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xf0f95
cmpb $0x0, 0x88(%rbx)
je 0xedb63
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0xedb63
cmpl $0x3, (%rdi)
jne 0xedb63
movq 0x18(%rdi), %rdx
testq %rdx, %rdx
jle 0xedb63
movq 0xa147e(%rip), %rax     # 0x18efd0
movq (%rax), %r8
leaq 0x41(%rip), %rcx        # 0xedb9d
xorl %esi, %esi
callq 0xef5e4
movq 0x28(%r14), %rdi
callq 0xf052b
movq 0x20(%r14), %rdi
callq 0xf052b
movq 0x30(%r14), %rdi
callq 0xeb858
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8be2
movq $0x0, 0x138(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq