// File: /workspace/github_c_makefile_star2_O2/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 0xe3060
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x58cec(%rip), %rsi     # 0x13baf8
xorl %eax, %eax
callq 0xde896
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 0xe2e53
movq 0x28(%r14), %rax
movb $0x1, %r12b
movabsq $0x100000000, %rcx      # imm = 0x100000000
cmpq %rcx, 0x18(%rax)
jl 0xe2e56
xorl %r12d, %r12d
leaq 0x58d37(%rip), %rsi     # 0x13bb94
movq %rbx, %rdi
xorl %edx, %edx
callq 0xdfae5
testl %eax, %eax
setle %bpl
setg %al
orb %r12b, %al
jne 0xe2e88
leaq 0x58d26(%rip), %rsi     # 0x13bba2
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf37f
movq 0x20(%r14), %rcx
movq 0x28(%r14), %rdi
movq 0x18(%rdi), %rdx
xorl %esi, %esi
callq 0xe45f4
testb %bpl, %bpl
jne 0xe2f5a
movq 0x20(%r14), %rdi
movq 0x18(%rdi), %r12
movl $0x6064b50, %esi        # imm = 0x6064B50
callq 0xe5f7f
movq 0x20(%r14), %rdi
pushq $0x2c
popq %rsi
callq 0xe5fd0
movq 0x20(%r14), %rdi
movl $0x33f, %esi            # imm = 0x33F
callq 0xe5f08
movq 0x20(%r14), %rdi
pushq $0x2d
popq %rsi
callq 0xe5f08
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xe5f7f
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xe5f7f
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
callq 0xe5fd0
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
callq 0xe5fd0
movq 0x20(%r14), %rdi
movq 0x28(%r14), %rax
movq 0x18(%rax), %rsi
callq 0xe5fd0
movq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0xe5fd0
movq 0x20(%r14), %rdi
movl $0x7064b50, %esi        # imm = 0x7064B50
callq 0xe5f7f
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xe5f7f
movq 0x20(%r14), %rdi
movq %r12, %rsi
callq 0xe5fd0
movq 0x20(%r14), %rdi
pushq $0x1
popq %rsi
callq 0xe5f7f
movq 0x20(%r14), %rdi
movl $0x6054b50, %esi        # imm = 0x6054B50
callq 0xe5f7f
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xe5f08
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xe5f08
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
cmpq $0x10000, %rsi          # imm = 0x10000
jl 0xe2fa4
movl $0xffff, %esi           # imm = 0xFFFF
callq 0xe5f08
movq 0x20(%r14), %rdi
movl $0xffff, %esi           # imm = 0xFFFF
jmp 0xe2fb1
callq 0xe5f08
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
callq 0xe5f08
movq 0x20(%r14), %rdi
movq 0x28(%r14), %rax
movq 0x18(%rax), %rsi
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpq %r12, %rsi
cmovgeq %r12, %rsi
callq 0xe5f7f
cmpq %r12, %r15
cmovlq %r15, %r12
movq 0x20(%r14), %rdi
movq %r12, %rsi
callq 0xe5f7f
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xe5f08
cmpb $0x0, 0x88(%rbx)
je 0xe302a
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0xe302a
cmpl $0x3, (%rdi)
jne 0xe302a
movq 0x18(%rdi), %rdx
testq %rdx, %rdx
jle 0xe302a
movq 0xaefb7(%rip), %rax     # 0x191fd0
movq (%rax), %r8
leaq 0x3e(%rip), %rcx        # 0xe3061
xorl %esi, %esi
callq 0xe4745
movq 0x28(%r14), %rdi
callq 0xe5591
movq 0x20(%r14), %rdi
callq 0xe5591
movq 0x30(%r14), %rdi
callq 0xe0e8d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
andq $0x0, 0x138(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq