// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: do_member
static void do_member(deark *c, lctx *d, i64 pos1, i64 *next_member_hdr_pos)
{
	struct de_arch_member_data *md = NULL;
	struct zoo_member_data *mdz = NULL;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	on_offset_found(c, d, pos1, 1);

	mdz = de_malloc(c, sizeof(struct zoo_member_data));
	md = de_arch_create_md(c, d->da);
	md->userdata = (void*)mdz;

	md->member_hdr_pos = pos1;
	if (!do_member_header(c, d, md)) {
		goto done;
	}
	on_offset_found(c, d, md->cmpr_pos, md->cmpr_len);

	*next_member_hdr_pos = mdz->next_member_hdr_pos;

	if ( ! mdz->next_member_hdr_pos ) {
		goto done;
	}

	if(mdz->is_deleted && !d->undelete) {
		de_dbg(c, "ignoring deleted entry");
		goto done;
	}

	if ( (mdz->majver>2) || (mdz->majver==2 && mdz->minver>1) ) {
		de_err(c, "%s: Unsupported format version: %d.%d",
			ucstring_getpsz_d(md->filename),
			(int)mdz->majver, (int)mdz->minver);
		goto done;
	}

	de_dbg(c, "compressed data at %"I64_FMT", len=%"I64_FMT, md->cmpr_pos,
		md->cmpr_len);
	de_dbg_indent(c, 1);

	if(mdz->method!=ZOOCMPR_STORED && mdz->method!=ZOOCMPR_LZD && mdz->method!=ZOOCMPR_LZH) {
		de_err(c, "%s: Unsupported compression method: %d",
			ucstring_getpsz_d(md->filename), (int)mdz->method);
		goto done;
	}

	md->set_name_flags |= DE_SNFLAG_FULLPATH;
	md->validate_crc = 1;
	md->dfn = zoo_decompressor_fn;
	de_arch_extract_member_file(md);

done:
	if(mdz) {
		if(mdz->is_deleted) d->num_deleted_files_found++;
		de_free(c, mdz);
	}
	de_arch_destroy_md(c, md);
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x15b580
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x1, %ecx
callq 0x14f320
movq -0x8(%rbp), %rdi
movl $0x48, %esi
callq 0x15b780
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x17c120
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x14f4b0
cmpl $0x0, %eax
jne 0x14ef77
jmp 0x14f106
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rdx
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rcx
callq 0x14f320
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x14efb3
jmp 0x14f106
movq -0x30(%rbp), %rax
movzbl 0x36(%rax), %eax
cmpl $0x0, %eax
je 0x14efe1
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x14efe1
movq -0x8(%rbp), %rdi
leaq 0x8184d(%rip), %rsi     # 0x1d0822
movb $0x0, %al
callq 0x15b0d0
jmp 0x14f106
movq -0x30(%rbp), %rax
movzbl 0x34(%rax), %eax
cmpl $0x2, %eax
jg 0x14f008
movq -0x30(%rbp), %rax
movzbl 0x34(%rax), %eax
cmpl $0x2, %eax
jne 0x14f048
movq -0x30(%rbp), %rax
movzbl 0x35(%rax), %eax
cmpl $0x1, %eax
jle 0x14f048
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x172650
movq -0x40(%rbp), %rdi
movq %rax, %rdx
movq -0x30(%rbp), %rax
movzbl 0x34(%rax), %ecx
movq -0x30(%rbp), %rax
movzbl 0x35(%rax), %r8d
leaq 0x817fd(%rip), %rsi     # 0x1d0839
movb $0x0, %al
callq 0x15bfb0
jmp 0x14f106
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rdx
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rcx
leaq 0x62a05(%rip), %rsi     # 0x1b1a68
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x14f0d3
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x1, %eax
je 0x14f0d3
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x2, %eax
je 0x14f0d3
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x172650
movq -0x48(%rbp), %rdi
movq %rax, %rdx
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %ecx
leaq 0x81795(%rip), %rsi     # 0x1d085f
movb $0x0, %al
callq 0x15bfb0
jmp 0x14f106
movq -0x28(%rbp), %rax
movl 0x78(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x78(%rax)
movq -0x28(%rbp), %rax
movb $0x1, 0xa1(%rax)
movq -0x28(%rbp), %rax
leaq 0xeda(%rip), %rcx       # 0x14ffd0
movq %rcx, 0xa8(%rax)
movq -0x28(%rbp), %rdi
callq 0x17c920
cmpq $0x0, -0x30(%rbp)
je 0x14f131
movq -0x30(%rbp), %rax
cmpb $0x0, 0x36(%rax)
je 0x14f124
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x3c(%rax)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x17c1a0
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x15b5a0
addq $0x50, %rsp
popq %rbp
retq