// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/gzip.c
// Function: de_run_gzip
static void de_run_gzip(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos;
	i64 member_size;

	d = de_malloc(c, sizeof(lctx));
	d->crco = de_crcobj_create(c, DE_CRCOBJ_CRC32_IEEE);

	pos = 0;
	while(1) {
		if(pos >= c->infile->len) break;
		if(!do_gzip_read_member(c, d, pos, &member_size)) {
			break;
		}
		if(member_size<=0) break;

		pos += member_size;
	}
	dbuf_close(d->output_file);

	if(d) {
		de_crcobj_destroy(d->crco);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
pushq $0x10
popq %rsi
callq 0xdecaf
movq %rax, %r14
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0xe0ae9
movq %r14, 0x20(%rsp)
movq %rax, 0x8(%r14)
pushq $0x28
popq %r13
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
cmpq 0x18(%rax), %r15
jge 0x51c35
movq %rbx, %rdi
movq %r13, %rsi
callq 0xdecaf
movq %rax, %r12
movq %rbx, %rdi
leaq 0x2c(%rsp), %rsi
callq 0xdebae
movq %rbx, %rdi
leaq 0xc1e6e(%rip), %rsi     # 0x1135b7
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3eb4
movl %eax, %ebp
movq 0x18(%rbx), %rdi
leaq 0x1(%r15), %rsi
callq 0xe3eb4
cmpb $0x1f, %bpl
jne 0x518dc
cmpb $-0x75, %al
jne 0x518dc
movq 0x18(%rbx), %rdi
leaq 0x2(%r15), %rsi
callq 0xe3eb4
movb %al, 0x1(%r12)
cmpb $0x8, %al
jne 0x518eb
movq 0x18(%rbx), %rdi
leaq 0x3(%r15), %rsi
callq 0xe3eb4
movb %al, (%r12)
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xd1623(%rip), %rsi     # 0x122de6
xorl %eax, %eax
callq 0xde896
leaq 0x4(%r15), %rsi
movq 0x18(%rbx), %rdi
callq 0xe409f
movq %rax, %r14
movq %r12, %r13
addq $0x18, %r13
movq %rax, %rdi
movq %r13, %rsi
pushq $0x1
popq %rdx
callq 0xe002e
cmpb $0x0, 0x18(%r12)
je 0x51823
movq %r13, %rdi
leaq 0x40(%rsp), %rbp
movq %rbp, %rsi
pushq $0x40
popq %rdx
xorl %ecx, %ecx
callq 0xe0644
movq %rbx, %rdi
leaq 0xb37d6(%rip), %rsi     # 0x104fec
movq %r14, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0xde896
leaq 0x8(%r15), %rsi
movq 0x18(%rbx), %rdi
leaq 0x9(%r15), %r14
callq 0xe3eb4
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xc1de7(%rip), %rsi     # 0x113628
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xe3eb4
movzbl %al, %edx
leaq 0xcd683(%rip), %rcx     # 0x11eee1
cmpb $0xd, %dl
ja 0x51873
movl %edx, %eax
leaq 0xc1f04(%rip), %rsi     # 0x113770
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
leaq 0xa(%r15), %rbp
movq %rbx, %rdi
leaq 0xc1dbb(%rip), %rsi     # 0x11363c
xorl %eax, %eax
callq 0xde896
movb (%r12), %al
testb $0x4, %al
je 0x518c5
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe3fa3
movq %rax, %r14
leaq 0xc(%r15), %rcx
movq %rbx, %rdi
leaq 0xc1da9(%rip), %rsi     # 0x113656
movl %ebp, %edx
movl %r14d, %r8d
xorl %eax, %eax
callq 0xde896
leaq (%r14,%r15), %rbp
addq $0xc, %rbp
movb (%r12), %al
testb $0x8, %al
movq %r13, 0x18(%rsp)
jne 0x5193d
movq $0x0, 0x10(%rsp)
jmp 0x519c5
movq %rbx, %rdi
leaq 0xc1ce3(%rip), %rsi     # 0x1135c9
movl %r15d, %edx
jmp 0x518f8
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xc1d0e(%rip), %rsi     # 0x113606
xorl %eax, %eax
callq 0xdf2a5
movb $0x1, %bpl
xorl %edi, %edi
xorl %r14d, %r14d
callq 0xeaf3c
movq %rbx, %rdi
movq %r12, %rsi
callq 0xded32
movl 0x2c(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
testb %bpl, %bpl
jne 0x51c35
addq %r14, %r15
testq %r14, %r14
jg 0x51716
jmp 0x51c35
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rcx
subq %rbp, %rcx
xorl %esi, %esi
movq %rbp, %rdx
leaq 0x40(%rsp), %r8
callq 0xe4b21
testl %eax, %eax
je 0x51bf5
movq 0x40(%rsp), %r14
subq %rbp, %r14
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r13
movq 0x18(%rbx), %rdi
movl $0x5, (%rsp)
movl $0x12c, %ecx            # imm = 0x12C
movq %rbp, %rsi
movq %r14, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xe4ced
movq %r13, 0x10(%rsp)
movq %r13, %rdi
callq 0xeb877
movq %rbx, %rdi
leaq 0xc1ce6(%rip), %rsi     # 0x113690
movl %ebp, %edx
movl %r14d, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0xde896
movq 0x40(%rsp), %rbp
incq %rbp
movb (%r12), %al
testb $0x10, %al
je 0x519f7
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rcx
subq %rbp, %rcx
xorl %esi, %esi
movq %rbp, %rdx
leaq 0x40(%rsp), %r8
callq 0xe4b21
testl %eax, %eax
je 0x51c10
movq 0x40(%rsp), %rbp
incq %rbp
movb (%r12), %al
testb $0x2, %al
je 0x51a23
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe3fa3
movl %eax, 0x4(%r12)
movq %rbx, %rdi
leaq 0xc1cae(%rip), %rsi     # 0x1136c4
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
addq $0x2, %rbp
movq %rbx, %rdi
leaq 0xc1cb0(%rip), %rsi     # 0x1136dd
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
movq 0x20(%rsp), %r13
movq (%r13), %rdi
testq %rdi, %rdi
jne 0x51acf
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, %r14
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
je 0x51a7d
cmpb $0x0, 0xd0(%rbx)
je 0x51a7d
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0xdfd55
movq 0x10(%rsp), %rdx
movb $0x1, 0x8(%r14)
movq 0x18(%rsp), %rax
cmpb $0x0, (%rax)
je 0x51a8f
movups (%rax), %xmm0
movups %xmm0, 0x18(%r14)
testq %rdx, %rdx
movl $0x0, %esi
leaq 0xd6a3f(%rip), %rax     # 0x1284dd
cmoveq %rax, %rsi
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xe4e62
movq 0x20(%rsp), %r13
movq %rax, (%r13)
movq %rax, %rdi
callq 0xe589c
movq %rbx, %rdi
movq %r14, %rsi
callq 0xdfd24
movq (%r13), %rdi
movq 0x8(%r13), %rdx
leaq 0x947e7(%rip), %rsi     # 0xe62c1
callq 0xe629a
movq 0x8(%r13), %rdi
callq 0xe0e44
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rdx
subq %rbp, %rdx
movq (%r13), %rcx
andl $0x0, (%rsp)
movq %rbp, %rsi
xorl %r8d, %r8d
leaq 0x38(%rsp), %r9
callq 0xf4638
movl %eax, %r14d
movq (%r13), %rdi
callq 0xe58e8
movq 0x8(%r13), %rdi
callq 0xe0e95
movl %eax, 0x18(%rsp)
movq (%r13), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe629a
testl %r14d, %r14d
je 0x51be1
movq 0x38(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq (%rax,%rbp), %r14
movq %rbx, %rdi
leaq 0xc1ba3(%rip), %rsi     # 0x1136f5
movl 0x18(%rsp), %r13d
movl %r13d, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xe409f
movl %eax, 0x8(%r12)
movq %rbx, %rdi
leaq 0xc1b94(%rip), %rsi     # 0x113710
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movl 0x8(%r12), %edx
cmpl %edx, %r13d
pushq $0x28
popq %r13
je 0x51ba8
movq %rbx, %rdi
leaq 0xe5477(%rip), %rsi     # 0x137014
movl 0x18(%rsp), %ecx
xorl %eax, %eax
callq 0xdf05a
movq 0x30(%rsp), %rax
leaq (%rax,%rbp), %rsi
addq $0x4, %rsi
movq 0x18(%rbx), %rdi
callq 0xe409f
movq %rax, 0x10(%r12)
xorl %ebp, %ebp
movq %rbx, %rdi
leaq 0xc1b5c(%rip), %rsi     # 0x11372b
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
subq %r15, %r14
addq $0x8, %r14
jmp 0x51beb
movb $0x1, %bpl
xorl %r14d, %r14d
pushq $0x28
popq %r13
movq 0x10(%rsp), %rdi
jmp 0x51907
movq %rbx, %rdi
leaq 0xc1a7e(%rip), %rsi     # 0x11367d
xorl %eax, %eax
callq 0xdf2a5
movb $0x1, %bpl
xorl %edi, %edi
xorl %r14d, %r14d
jmp 0x51c2c
movq %rbx, %rdi
leaq 0xc1a94(%rip), %rsi     # 0x1136ae
xorl %eax, %eax
callq 0xdf2a5
movb $0x1, %bpl
xorl %r14d, %r14d
movq 0x10(%rsp), %rdi
pushq $0x28
popq %r13
jmp 0x51907
movq 0x20(%rsp), %r14
movq (%r14), %rdi
callq 0xe5591
movq 0x8(%r14), %rdi
callq 0xe0e8d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq