// File: /workspace/github_c_makefile_star2_O1/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
movl $0x10, %esi
callq 0xe969b
movq %rax, %r14
movq %rbx, %rdi
movl $0x10, %esi
callq 0xeba56
movq %r14, 0x28(%rsp)
movq %rax, 0x8(%r14)
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x5490d
leaq 0x14(%rsp), %r12
xorl %r13d, %r13d
movl $0x28, %esi
movq %rbx, %rdi
callq 0xe969b
movq %rax, %rbp
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe958c
movq %rbx, %rdi
leaq 0xcc17a(%rip), %rsi     # 0x120581
movl %r13d, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xef0d5
movl %eax, %r14d
movq 0x18(%rbx), %rdi
leaq 0x1(%r13), %rsi
callq 0xef0d5
cmpb $0x1f, %r14b
jne 0x545a5
cmpb $-0x75, %al
jne 0x545a5
movq 0x18(%rbx), %rdi
leaq 0x2(%r13), %rsi
callq 0xef0d5
movb %al, 0x1(%rbp)
cmpb $0x8, %al
jne 0x545b4
movq 0x18(%rbx), %rdi
leaq 0x3(%r13), %rsi
callq 0xef0d5
movb %al, (%rbp)
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xdb8e9(%rip), %rsi     # 0x12fd6a
xorl %eax, %eax
callq 0xe9226
leaq 0x4(%r13), %rsi
movq 0x18(%rbx), %rdi
callq 0xef37e
movq %rax, %r14
movq %rbp, %r15
addq $0x18, %rbp
movq %rax, %rdi
movq %rbp, %rsi
movl $0x1, %edx
callq 0xeace2
movq %r15, 0x18(%rsp)
cmpb $0x0, 0x18(%r15)
je 0x544e9
movl $0x40, %edx
movq %rbp, %rdi
leaq 0x40(%rsp), %r15
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xeb4f8
movq %rbx, %rdi
leaq 0xbdb20(%rip), %rsi     # 0x111ffc
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xe9226
leaq 0x8(%r13), %rsi
movq 0x18(%rbx), %rdi
leaq 0x9(%r13), %r14
callq 0xef0d5
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xcc0eb(%rip), %rsi     # 0x1205f2
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef0d5
movzbl %al, %edx
leaq 0xd7945(%rip), %rcx     # 0x12be69
cmpb $0xd, %dl
ja 0x54539
movl %edx, %eax
leaq 0xcc206(%rip), %rsi     # 0x120738
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
leaq 0xa(%r13), %r15
movq %rbx, %rdi
leaq 0xcc0bf(%rip), %rsi     # 0x120606
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rsp), %rax
testb $0x4, (%rax)
je 0x5458a
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef1ca
movq %rax, %r14
leaq 0xc(%r13), %rcx
movq %rbx, %rdi
leaq 0xcc0ab(%rip), %rsi     # 0x120620
movl %r15d, %edx
movl %r14d, %r8d
xorl %eax, %eax
callq 0xe9226
leaq (%r14,%r13), %r15
addq $0xc, %r15
movq 0x28(%rsp), %r14
movq 0x18(%rsp), %rax
testb $0x8, (%rax)
jne 0x54620
xorl %r12d, %r12d
jmp 0x546a5
movq %rbx, %rdi
leaq 0xcbfe4(%rip), %rsi     # 0x120593
movl %r13d, %edx
jmp 0x545c1
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xcc00f(%rip), %rsi     # 0x1205d0
xorl %eax, %eax
callq 0xe9df7
movb $0x1, %r14b
movq %r13, %r15
xorl %edi, %edi
subq %r13, %r15
callq 0xf6bb0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xe9752
movl 0x14(%rsp), %esi
movq %rbx, %rdi
callq 0xe9595
movl $0x0, %eax
testb %r14b, %r14b
cmoveq %r15, %rax
jne 0x5490d
testq %rax, %rax
jle 0x5490d
addq %rax, %r13
movq 0x18(%rbx), %rax
cmpq 0x18(%rax), %r13
jl 0x543e2
jmp 0x5490d
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rcx
subq %r15, %rcx
xorl %esi, %esi
movq %r15, %rdx
leaq 0x40(%rsp), %r8
callq 0xf0057
testl %eax, %eax
je 0x548cd
movq 0x40(%rsp), %r14
subq %r15, %r14
movq %rbx, %rdi
callq 0xf6870
movq %rax, %r12
movq 0x18(%rbx), %rdi
movl $0x5, (%rsp)
movl $0x12c, %ecx            # imm = 0x12C
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xf0203
movq %r12, %rdi
callq 0xf7557
movq %rbx, %rdi
leaq 0xcbfd2(%rip), %rsi     # 0x12065a
movl %r15d, %edx
movl %r14d, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0xe9226
movq 0x40(%rsp), %r15
incq %r15
movq 0x28(%rsp), %r14
movq %r12, 0x20(%rsp)
movq 0x18(%rsp), %rax
testb $0x10, (%rax)
je 0x546de
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rcx
subq %r15, %rcx
xorl %esi, %esi
movq %r15, %rdx
leaq 0x40(%rsp), %r8
callq 0xf0057
testl %eax, %eax
je 0x548e5
movq 0x40(%rsp), %r15
incq %r15
movq 0x18(%rsp), %r12
testb $0x2, (%r12)
je 0x54712
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef1ca
movl %eax, 0x4(%r12)
movq %rbx, %rdi
leaq 0xcbf89(%rip), %rsi     # 0x12068e
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
addq $0x2, %r15
movq %rbx, %rdi
leaq 0xcbf8b(%rip), %rsi     # 0x1206a7
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
cmpq $0x0, (%r14)
jne 0x547a8
movq %rbx, %rdi
callq 0xea9a9
movq %rax, %r12
movq 0x20(%rsp), %rdx
testq %rdx, %rdx
je 0x54762
cmpb $0x0, 0xd0(%rbx)
je 0x54762
movq %rbx, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xea9e4
movq 0x20(%rsp), %rdx
movb $0x1, 0x8(%r12)
cmpb $0x0, (%rbp)
je 0x54772
movups (%rbp), %xmm0
movups %xmm0, 0x18(%r12)
testq %rdx, %rdx
movl $0x0, %esi
leaq 0xe0cb0(%rip), %rax     # 0x135431
cmoveq %rax, %rsi
movq %rbx, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xf037a
movq %rax, (%r14)
movq %rax, %rdi
callq 0xf0e3f
movq %rbx, %rdi
movq %r12, %rsi
callq 0xea9b3
movq (%r14), %rdi
movq 0x8(%r14), %rdx
leaq 0x9d29b(%rip), %rsi     # 0xf1a51
callq 0xf1a12
movq 0x8(%r14), %rdi
callq 0xebdc3
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rdx
subq %r15, %rdx
movq (%r14), %rcx
movl $0x0, (%rsp)
movq %r15, %rsi
xorl %r8d, %r8d
leaq 0x38(%rsp), %r9
callq 0x100d18
movl %eax, %r12d
movq (%r14), %rdi
callq 0xf0ea4
movq 0x8(%r14), %rdi
callq 0xebe2a
movl %eax, %ebp
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf1a12
testl %r12d, %r12d
je 0x548be
movq 0x38(%rsp), %r14
leaq (%r14,%r15), %r12
movq %rbx, %rdi
leaq 0xcbe98(%rip), %rsi     # 0x1206bf
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r12, 0x30(%rsp)
movq %r12, %rsi
callq 0xef37e
movl %ebp, %r12d
movq 0x18(%rsp), %rbp
movl %eax, 0x8(%rbp)
movq %rbx, %rdi
leaq 0xcbe84(%rip), %rsi     # 0x1206da
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movl 0x8(%rbp), %edx
movl %r12d, %ecx
cmpl %edx, %r12d
leaq 0x14(%rsp), %r12
je 0x54880
movq %rbx, %rdi
leaq 0xef70b(%rip), %rsi     # 0x143f84
xorl %eax, %eax
callq 0xe9b27
leaq (%r14,%r15), %rsi
addq $0x4, %rsi
movq 0x18(%rbx), %rdi
callq 0xef37e
movq %rax, 0x10(%rbp)
xorl %r14d, %r14d
movq %rbx, %rdi
leaq 0xcbe53(%rip), %rsi     # 0x1206f5
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x30(%rsp), %r15
addq $0x8, %r15
movq 0x20(%rsp), %rdi
jmp 0x545d0
movb $0x1, %r14b
leaq 0x14(%rsp), %r12
movq 0x20(%rsp), %rdi
jmp 0x54903
movq %rbx, %rdi
leaq 0xcbd70(%rip), %rsi     # 0x120647
xorl %eax, %eax
callq 0xe9df7
movb $0x1, %r14b
xorl %edi, %edi
jmp 0x54903
movq %rbx, %rdi
leaq 0xcbd89(%rip), %rsi     # 0x120678
xorl %eax, %eax
callq 0xe9df7
movb $0x1, %r14b
movq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %r12
movq 0x18(%rsp), %rbp
jmp 0x545d0
movq 0x28(%rsp), %r14
movq (%r14), %rdi
callq 0xf0b13
movq 0x8(%r14), %rdi
callq 0xebe1d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe9752
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq