// File: /workspace/github_c_makefile_star2_O1/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 0xfdb0a
movq %rax, %r13
movl $0x1, 0x10(%rax)
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
movl $0xd, %edx
callq 0xeb7d1
movl %eax, 0x18(%r13)
movq 0x18(%rbx), %rax
cmpq $0x16, 0x18(%rax)
jl 0x70ae9
movl $0x2, %r14d
movq %rsp, %rbp
xorl %r15d, %r15d
testq %r15, %r15
je 0x7086e
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfdab8
movq %rbx, %rdi
movq %r13, %rsi
callq 0xfda6c
movq %rax, %r15
movq %r14, 0x18(%rax)
movq %r14, (%rsp)
movq %rbx, %rdi
leaq 0xc(%rsp), %rsi
callq 0xe958c
movq 0x18(%r15), %rdx
movq %rbx, %rdi
leaq 0xcaf44(%rip), %rsi     # 0x13b7e3
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xef1ed
movq %rax, 0x20(%r15)
movq %rbx, %rdi
leaq 0xb587b(%rip), %rsi     # 0x126148
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
cmpq $0x14, 0x20(%r15)
jl 0x70add
movq %r14, 0x10(%rsp)
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xef14d
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xb5ab4(%rip), %rsi     # 0x1263b4
xorl %eax, %eax
callq 0xe9226
movq (%r15), %rdi
movl $0x30, %esi
callq 0xeba56
movq %rax, %r12
movq 0x8(%r15), %rax
movq 0x18(%r15), %rdx
movq 0x8(%rax), %rsi
movl $0x2, %ecx
movq %r12, %rdi
callq 0xebf09
movq 0x8(%r15), %rax
movq 0x18(%r15), %rdx
movq 0x8(%rax), %rsi
addq $0x3, %rdx
movq 0x20(%r15), %rcx
addq $-0x3, %rcx
movq %r12, %rdi
callq 0xebf09
movq %r12, %rdi
callq 0xebe2a
movq %rbp, %r14
movq %r13, %rbp
movzbl %al, %r13d
movq %r12, %rdi
callq 0xebe1d
movq %rbx, %rdi
leaq 0xb5a63(%rip), %rsi     # 0x1263d7
movl %r13d, %edx
movq %rbp, %r13
movq %r14, %rbp
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef14d
andb $0x1f, %al
movzbl %al, %edx
movl %edx, 0x90(%r15)
movq %rbx, %rdi
leaq 0xb52d6(%rip), %rsi     # 0x125c7c
xorl %eax, %eax
callq 0xe9226
incq (%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0xfdbe0
movq %r15, %rdi
movq %r14, %rsi
callq 0xfdb9b
movq 0x18(%r15), %rax
addq $0xd, %rax
movq %rax, (%rsp)
movq 0x50(%r15), %rsi
addq $0x18, %rsi
movq %r13, %rdi
leaq 0xa76b9(%rip), %rdx     # 0x11809e
movl $0x4, %ecx
movq %r14, %r8
callq 0xfdc9b
movq %r15, %rdi
movq %r14, %rsi
callq 0xfdc7e
addq $0x2, (%rsp)
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef3a0
movl %eax, 0x48(%r15)
movq %rbx, %rdi
leaq 0xd3369(%rip), %rsi     # 0x143d85
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef14d
movzbl %al, %r12d
movq 0x18(%rbx), %rdi
movq (%rsp), %rsi
movq 0x58(%r15), %rcx
movl 0x18(%r13), %r9d
movq %r12, %rdx
xorl %r8d, %r8d
callq 0xf01b0
movq 0x58(%r15), %rdi
callq 0xf7557
movq %rbx, %rdi
leaq 0xcaf71(%rip), %rsi     # 0x13b9d4
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
addq %r12, (%rsp)
movq 0x20(%r15), %rdx
addq 0x18(%r15), %rdx
movq %rdx, 0x40(%r15)
movq %rbx, %rdi
leaq 0xb5975(%rip), %rsi     # 0x1263fc
xorl %eax, %eax
callq 0xe9226
movq 0x30(%r15), %rax
addq 0x20(%r15), %rax
movq %rax, 0x28(%r15)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0xe9595
movq 0x28(%r15), %rax
testq %rax, %rax
jle 0x70ae9
movq 0x10(%rsp), %rdx
leaq (%rax,%rdx), %rcx
addq $0x14, %rcx
leaq (%rax,%rdx), %r14
movq 0x18(%rbx), %rax
cmpq 0x18(%rax), %rcx
jle 0x7085e
jmp 0x70ae9
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0xe9595
testq %r15, %r15
je 0x70af9
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfdab8
movq %rbx, %rdi
movq %r13, %rsi
callq 0xfdb25
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq