// File: /workspace/github_c_makefile_star2_O3/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 0xe8b2b
movq %rax, %r14
movq %rbx, %rdi
movl $0x10, %esi
callq 0xeb499
movq %r14, 0x28(%rsp)
movq %rax, 0x8(%r14)
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x54818
leaq 0x14(%rsp), %r15
xorl %r13d, %r13d
movl $0x28, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %rbp
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe8a1c
movq %rbx, %rdi
leaq 0xcc386(%rip), %rsi     # 0x1206a9
movl %r13d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeead3
movl %eax, %r14d
movq 0x18(%rbx), %rdi
leaq 0x1(%r13), %rsi
callq 0xeead3
cmpb $0x1f, %r14b
jne 0x544b7
cmpb $-0x75, %al
jne 0x544b7
movq 0x18(%rbx), %rdi
leaq 0x2(%r13), %rsi
callq 0xeead3
movb %al, 0x1(%rbp)
cmpb $0x8, %al
jne 0x544c6
movq 0x18(%rbx), %rdi
leaq 0x3(%r13), %rsi
callq 0xeead3
movb %al, (%rbp)
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xdbcd9(%rip), %rsi     # 0x130076
xorl %eax, %eax
callq 0xe8617
leaq 0x4(%r13), %rsi
movq 0x18(%rbx), %rdi
callq 0xeed61
movq %rax, %r14
movq %rbp, %r15
addq $0x18, %r15
movq %rax, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0xea7f5
cmpb $0x0, 0x18(%rbp)
je 0x543ff
movl $0x40, %edx
movq %r15, %rdi
leaq 0x40(%rsp), %r12
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xeaf46
movq %rbx, %rdi
leaq 0xbdc1a(%rip), %rsi     # 0x11200c
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xe8617
leaq 0x8(%r13), %rsi
movq 0x18(%rbx), %rdi
leaq 0x9(%r13), %r14
callq 0xeead3
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xcc2fd(%rip), %rsi     # 0x12071a
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xeead3
movzbl %al, %edx
leaq 0xd7d17(%rip), %rcx     # 0x12c151
cmpb $0xd, %dl
ja 0x5444f
movl %edx, %eax
leaq 0xcc418(%rip), %rsi     # 0x120860
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
leaq 0xa(%r13), %r12
movq %rbx, %rdi
leaq 0xcc2d1(%rip), %rsi     # 0x12072e
xorl %eax, %eax
callq 0xe8617
movb (%rbp), %al
testb $0x4, %al
je 0x544a0
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeebc8
movq %rax, %r14
leaq 0xc(%r13), %rcx
movq %rbx, %rdi
leaq 0xcc2c0(%rip), %rsi     # 0x120748
movl %r12d, %edx
movl %r14d, %r8d
xorl %eax, %eax
callq 0xe8617
leaq (%r14,%r13), %r12
addq $0xc, %r12
movb (%rbp), %al
testb $0x8, %al
movq %r15, 0x20(%rsp)
jne 0x54526
movq $0x0, 0x18(%rsp)
jmp 0x545ae
movq %rbx, %rdi
leaq 0xcc1fa(%rip), %rsi     # 0x1206bb
movl %r13d, %edx
jmp 0x544d3
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xcc225(%rip), %rsi     # 0x1206f8
xorl %eax, %eax
callq 0xe9295
movb $0x1, %r12b
xorl %edi, %edi
xorl %r14d, %r14d
callq 0xf6753
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xe8be2
movl 0x14(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
testb %r12b, %r12b
jne 0x54818
testq %r14, %r14
jle 0x54818
addq %r14, %r13
movq 0x18(%rbx), %rax
cmpq 0x18(%rax), %r13
jl 0x542fe
jmp 0x54818
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rcx
subq %r12, %rcx
xorl %esi, %esi
movq %r12, %rdx
leaq 0x40(%rsp), %r8
callq 0xefa77
testl %eax, %eax
je 0x547d7
movq 0x40(%rsp), %r14
subq %r12, %r14
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r15
movq 0x18(%rbx), %rdi
movl $0x5, (%rsp)
movl $0x12c, %ecx            # imm = 0x12C
movq %r12, %rsi
movq %r14, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xefc2a
movq %r15, 0x18(%rsp)
movq %r15, %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0xcc1ef(%rip), %rsi     # 0x120782
movl %r12d, %edx
movl %r14d, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0xe8617
movq 0x40(%rsp), %r12
incq %r12
movb (%rbp), %al
testb $0x10, %al
je 0x545df
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rcx
subq %r12, %rcx
xorl %esi, %esi
movq %r12, %rdx
leaq 0x40(%rsp), %r8
callq 0xefa77
testl %eax, %eax
je 0x547f2
movq 0x40(%rsp), %r12
incq %r12
movb (%rbp), %al
testb $0x2, %al
je 0x54609
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeebc8
movl %eax, 0x4(%rbp)
movq %rbx, %rdi
leaq 0xcc1ba(%rip), %rsi     # 0x1207b6
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
addq $0x2, %r12
movq %rbx, %rdi
leaq 0xcc1bc(%rip), %rsi     # 0x1207cf
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x28(%rsp), %r15
movq (%r15), %rdi
testq %rdi, %rdi
jne 0x546b3
movq %rbx, %rdi
callq 0xea504
movq %rax, %r14
movq 0x18(%rsp), %rdx
testq %rdx, %rdx
je 0x54663
cmpb $0x0, 0xd0(%rbx)
je 0x54663
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0xea53f
movq 0x18(%rsp), %rdx
movb $0x1, 0x8(%r14)
movq 0x20(%rsp), %rax
cmpb $0x0, (%rax)
je 0x54675
movups (%rax), %xmm0
movups %xmm0, 0x18(%r14)
testq %rdx, %rdx
movl $0x0, %esi
leaq 0xe1139(%rip), %rax     # 0x1357bd
cmoveq %rax, %rsi
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xefda1
movq 0x28(%rsp), %r15
movq %rax, (%r15)
movq %rax, %rdi
callq 0xf0855
movq %rbx, %rdi
movq %r14, %rsi
callq 0xea50e
movq (%r15), %rdi
movq 0x8(%r15), %rdx
leaq 0x9cd93(%rip), %rsi     # 0xf1451
callq 0xf1412
movq 0x8(%r15), %rdi
callq 0xeb7fe
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rdx
subq %r12, %rdx
movq (%r15), %rcx
movl $0x0, (%rsp)
movq %r12, %rsi
xorl %r8d, %r8d
leaq 0x38(%rsp), %r9
callq 0x100594
movl %eax, %r14d
movq (%r15), %rdi
callq 0xf08ba
movq 0x8(%r15), %rdi
callq 0xeb865
movl %eax, 0x20(%rsp)
movq (%r15), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf1412
testl %r14d, %r14d
je 0x547c2
movq 0x38(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq (%rax,%r12), %r14
movq %rbx, %rdi
leaq 0xcc0b1(%rip), %rsi     # 0x1207e7
movl 0x20(%rsp), %r15d
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xeed61
movl %eax, 0x8(%rbp)
movq %rbx, %rdi
leaq 0xcc0a4(%rip), %rsi     # 0x120802
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movl 0x8(%rbp), %edx
cmpl %edx, %r15d
leaq 0x14(%rsp), %r15
je 0x54789
movq %rbx, %rdi
leaq 0xefce6(%rip), %rsi     # 0x144464
movl 0x20(%rsp), %ecx
xorl %eax, %eax
callq 0xe8faa
movq 0x30(%rsp), %rax
leaq (%rax,%r12), %rsi
addq $0x4, %rsi
movq 0x18(%rbx), %rdi
callq 0xeed61
movq %rax, 0x10(%rbp)
xorl %r12d, %r12d
movq %rbx, %rdi
leaq 0xcc06d(%rip), %rsi     # 0x12081d
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
subq %r13, %r14
addq $0x8, %r14
jmp 0x547cd
movb $0x1, %r12b
xorl %r14d, %r14d
leaq 0x14(%rsp), %r15
movq 0x18(%rsp), %rdi
jmp 0x544e2
movq %rbx, %rdi
leaq 0xcbf8e(%rip), %rsi     # 0x12076f
xorl %eax, %eax
callq 0xe9295
movb $0x1, %r12b
xorl %edi, %edi
xorl %r14d, %r14d
jmp 0x5480e
movq %rbx, %rdi
leaq 0xcbfa4(%rip), %rsi     # 0x1207a0
xorl %eax, %eax
callq 0xe9295
movb $0x1, %r12b
xorl %r14d, %r14d
movq 0x18(%rsp), %rdi
leaq 0x14(%rsp), %r15
jmp 0x544e2
movq 0x28(%rsp), %r14
movq (%r14), %rdi
callq 0xf052b
movq 0x8(%r14), %rdi
callq 0xeb858
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8be2
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq