// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc3.c
// Function: de_run_hit
static void de_run_hit(deark *c, de_module_params *mparams)
{
	de_arch_lctx *d = NULL;
	struct de_arch_member_data *md = NULL;
	i64 pos;

	d = de_arch_create_lctx(c);
	d->is_le = 1;
	d->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_CP437);

	pos = 2;

	while(1) {
		if(pos+HIT_MINHEADERLEN > c->infile->len) goto done;

		if(md) {
			de_arch_destroy_md(c, md);
			md = NULL;
		}
		md = de_arch_create_md(c, d);
		md->member_hdr_pos = pos;

		if(!do_BUhit_member(c, d, md)) goto done;
		if(md->member_total_size<=0) goto done;
		pos += md->member_total_size;
	}

done:
	if(md) {
		de_arch_destroy_md(c, md);
	}
	de_arch_destroy_lctx(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0xfd4b2
movq %rax, %rbp
movl $0x1, 0x10(%rax)
movq %rbx, %rdi
xorl %esi, %esi
movl $0xd, %edx
callq 0xeb220
movl %eax, 0x18(%rbp)
movq 0x18(%rbx), %rax
cmpq $0x16, 0x18(%rax)
jl 0x7087f
movl $0x2, %r14d
movq %rsp, %r13
xorl %r15d, %r15d
testq %r15, %r15
je 0x705fa
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfd460
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xfd414
movq %rax, %r15
movq %r14, 0x18(%rax)
movq %r14, (%rsp)
movq %rbx, %rdi
leaq 0xc(%rsp), %rsi
callq 0xe8a1c
movq 0x18(%r15), %rdx
movq %rbx, %rdi
leaq 0xcb532(%rip), %rsi     # 0x13bb5d
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeebeb
movq %rax, 0x20(%r15)
movq %rbx, %rdi
leaq 0xb5d1f(%rip), %rsi     # 0x126378
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
cmpq $0x13, 0x20(%r15)
jle 0x70868
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeeb4b
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xb5f5d(%rip), %rsi     # 0x1265e4
xorl %eax, %eax
callq 0xe8617
movq (%r15), %rdi
movl $0x30, %esi
callq 0xeb499
movq %r14, 0x10(%rsp)
movq %r13, %r14
movq %rbp, %r13
movq %rax, %rbp
movq 0x8(%r15), %rax
movq 0x18(%r15), %rdx
movq 0x8(%rax), %rsi
movl $0x2, %ecx
movq %rbp, %rdi
callq 0xeb944
movq 0x8(%r15), %rax
movq 0x18(%r15), %rdx
movq 0x8(%rax), %rsi
addq $0x3, %rdx
movq 0x20(%r15), %rcx
addq $-0x3, %rcx
movq %rbp, %rdi
callq 0xeb944
movq %rbp, %rdi
callq 0xeb865
movzbl %al, %r12d
movq %rbp, %rdi
movq %r13, %rbp
movq %r14, %r13
movq 0x10(%rsp), %r14
callq 0xeb858
movq %rbx, %rdi
leaq 0xb5efc(%rip), %rsi     # 0x126607
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeeb4b
andb $0x1f, %al
movzbl %al, %edx
movl %edx, 0x90(%r15)
movq %rbx, %rdi
leaq 0xb5775(%rip), %rsi     # 0x125eac
xorl %eax, %eax
callq 0xe8617
incq (%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0xfd57d
movq %r15, %rdi
movq %r13, %rsi
callq 0xfd538
movq 0x18(%r15), %rax
addq $0xd, %rax
movq %rax, (%rsp)
movq 0x50(%r15), %rsi
addq $0x18, %rsi
movq %rbp, %rdi
leaq 0xa7a60(%rip), %rdx     # 0x1181d6
movl $0x4, %ecx
movq %r13, %r8
callq 0xfd638
movq %r15, %rdi
movq %r13, %rsi
callq 0xfd61b
addq $0x2, (%rsp)
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeed83
movl %eax, 0x48(%r15)
movq %rbx, %rdi
leaq 0xd3ab8(%rip), %rsi     # 0x144265
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeeb4b
movzbl %al, %r12d
movq 0x18(%rbx), %rdi
movq (%rsp), %rsi
movq 0x58(%r15), %rcx
movl 0x18(%rbp), %r9d
movq %r12, %rdx
xorl %r8d, %r8d
callq 0xefbd7
movq 0x58(%r15), %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0xcb55a(%rip), %rsi     # 0x13bd4e
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
addq %r12, (%rsp)
movq 0x20(%r15), %rdx
addq 0x18(%r15), %rdx
movq %rdx, 0x40(%r15)
movq %rbx, %rdi
leaq 0xb5e14(%rip), %rsi     # 0x12662c
xorl %eax, %eax
callq 0xe8617
movq 0x30(%r15), %rax
addq 0x20(%r15), %rax
movq %rax, 0x28(%r15)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
movq 0x28(%r15), %rax
testq %rax, %rax
jle 0x70874
leaq (%rax,%r14), %rcx
addq $0x14, %rcx
addq %rax, %r14
movq 0x18(%rbx), %rax
cmpq 0x18(%rax), %rcx
jle 0x705ea
jmp 0x70874
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfd460
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xfd4cd
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq