// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/zip.c
// Function: do_process_member
static int do_process_member(deark *c, lctx *d, struct member_data *md)
{
	int retval = 0;

	// If for some reason we have a central-dir filename but not a local-dir
	// filename, use the central-dir filename.
	if(ucstring_isempty(md->local_dir_entry_data.fname) &&
		ucstring_isnonempty(md->central_dir_entry_data.fname))
	{
		ucstring_append_ucstring(md->local_dir_entry_data.fname,
			md->central_dir_entry_data.fname);
	}

	// Set the final file size and crc fields.
	if(md->local_dir_entry_data.bit_flags & 0x0008) {
		if(d->using_scanmode) {
			de_err(c, "File is incompatible with scan mode");
			goto done;
		}

		// Indicates that certain fields are not present in the local file header,
		// and are instead in a "data descriptor" after the file data.
		// Let's hope they are also in the central file header.
		md->cmpr_size = md->central_dir_entry_data.cmpr_size;
		md->uncmpr_size = md->central_dir_entry_data.uncmpr_size;
		md->crc_reported = md->central_dir_entry_data.crc_reported;
	}
	else {
		md->cmpr_size = md->local_dir_entry_data.cmpr_size;
		md->uncmpr_size = md->local_dir_entry_data.uncmpr_size;
		md->crc_reported = md->local_dir_entry_data.crc_reported;
	}

	process_ext_attr(c, d, md);

	// In some cases, detect directories by checking whether the filename ends
	// with a slash.
	if(!md->is_dir && md->uncmpr_size==0 &&
		(d->using_scanmode || (md->ver_made_by_lo<20)))
	{
		if(ucstring_lastchar(md->local_dir_entry_data.fname) == '/') {
			de_dbg(c, "[assuming this is a subdirectory]");
			md->is_dir = 1;
		}
	}

	do_extract_file(c, d, md);
	retval = 1;

done:
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x1b8(%rdx), %rdi
callq 0xeaf76
testl %eax, %eax
je 0xd48d5
movq 0x140(%r14), %rdi
callq 0xeaf8a
testl %eax, %eax
je 0xd48d5
movq 0x140(%r14), %rsi
movq 0x1b8(%r14), %rdi
callq 0xead71
testb $0x8, 0x1a0(%r14)
jne 0xd492e
movq 0x180(%r14), %rcx
movq 0x188(%r14), %rax
movq %rcx, 0x1e8(%r14)
movq %rax, 0x1f0(%r14)
movl 0x1a4(%r14), %ecx
movl %ecx, 0x1f8(%r14)
leaq 0xb0(%r15), %rcx
cmpl $0x0, 0xb0(%r15)
je 0xd4981
leaq 0x38(%r14), %r13
cmpl $0x0, 0x38(%r14)
jne 0xd4a66
jmp 0xd4a16
cmpl $0x0, 0xb0(%r15)
je 0xd4950
leaq 0x6262e(%rip), %rsi     # 0x136f6d
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
jmp 0xd4b71
movq 0x108(%r14), %rcx
movq 0x110(%r14), %rax
movq %rcx, 0x1e8(%r14)
movq %rax, 0x1f0(%r14)
movl 0x12c(%r14), %ecx
movl %ecx, 0x1f8(%r14)
leaq 0xb0(%r15), %rcx
movl 0x10(%r14), %edx
cmpl $0x3, 0x4(%r14)
jne 0xd49cf
movl %edx, %esi
shrl $0x10, %esi
andl $0xf000, %esi           # imm = 0xF000
cmpw $0x4000, %si            # imm = 0x4000
je 0xd49aa
cmpl $0xa000, %esi           # imm = 0xA000
jne 0xd49b5
pushq $0x40
jmp 0xd49ac
pushq $0x38
popq %rsi
movl $0x1, (%r14,%rsi)
testl $0x490000, %edx         # imm = 0x490000
je 0xd49c7
movl $0x1, 0x34(%r14)
jmp 0xd49cf
movl $0x1, 0x30(%r14)
testb $0x10, %dl
jne 0xd49e0
testb $0x8, %dl
je 0xd49e8
movb $0x1, 0x3c(%r14)
jmp 0xd49e8
movl $0x1, 0x38(%r14)
cmpl $0x0, 0x38(%r14)
je 0xd49f9
testq %rax, %rax
je 0xd4a62
andl $0x0, 0x38(%r14)
cmpb $0x0, 0x3c(%r14)
sete %dl
testq %rax, %rax
sete %sil
orb %dl, %sil
jne 0xd4a12
movb $0x0, 0x3c(%r14)
leaq 0x38(%r14), %r13
testq %rax, %rax
jne 0xd4a66
cmpl $0x0, (%rcx)
jne 0xd4a27
cmpl $0x13, 0x8(%r14)
ja 0xd4a66
movq 0x1b8(%r14), %rax
testq %rax, %rax
je 0xd4a66
movq 0x10(%rax), %rcx
testq %rcx, %rcx
jle 0xd4a66
movq 0x8(%rax), %rax
cmpl $0x2f, -0x4(%rax,%rcx,4)
jne 0xd4a66
leaq 0x62543(%rip), %rsi     # 0x136f91
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movl $0x1, (%r13)
jmp 0xd4a66
leaq 0x38(%r14), %r13
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0xdebae
movq 0x28(%r14), %rdx
movq 0x1e8(%r14), %rcx
leaq 0x55d16(%rip), %rsi     # 0x12a79b
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0xdeba7
testb $0x1, 0x1a0(%r14)
jne 0xd4ae7
movq 0x198(%r14), %rax
testq %rax, %rax
je 0xd4b0c
cmpq $0x0, 0x10(%rax)
je 0xd4b0c
movq 0x1e8(%r14), %rax
addq 0x28(%r14), %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jle 0xd4b85
movq 0x1b8(%r14), %rdi
callq 0xeb877
leaq 0x33088(%rip), %rsi     # 0x107b6d
jmp 0xd4afa
movq 0x1b8(%r14), %rdi
callq 0xeb877
leaq 0x624b9(%rip), %rsi     # 0x136fb3
xorl %r12d, %r12d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xdf2a5
jmp 0xd4b4f
movq 0x1b8(%r14), %rdi
callq 0xeb877
movl 0x190(%r14), %ecx
movq 0x198(%r14), %rdx
testq %rdx, %rdx
je 0xd4b31
movq 0x8(%rdx), %r8
jmp 0xd4b38
leaq 0x4a3a9(%rip), %r8      # 0x11eee1
leaq 0x62144(%rip), %rsi     # 0x136c83
xorl %r12d, %r12d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xdf2a5
xorl %r13d, %r13d
movq %r13, %rdi
callq 0xe5591
movq %rbx, %rdi
movq %r12, %rsi
callq 0xdfd24
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
movl %ebp, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x40(%r14)
je 0xd4bac
movq 0x1b8(%r14), %rdi
callq 0xeb877
leaq 0x62434(%rip), %rsi     # 0x136fd3
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xdf05a
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, %r12
movb $0x1, 0xc(%rax)
movq 0x1b8(%r14), %rdi
callq 0xeaf8a
testl %eax, %eax
je 0xd4c1e
cmpb $0x0, 0xc0(%r14)
je 0xd4bf5
movq 0x1b8(%r14), %rdx
leaq 0xc8(%r14), %rcx
movl 0x38(%r14), %r8d
movq %rbx, %rdi
movq %r12, %rsi
xorl %r9d, %r9d
callq 0xeda93
xorl %eax, %eax
cmpl $0x0, 0x38(%r14)
setne %al
leal 0x1(,%rax,2), %ecx
movq 0x1b8(%r14), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xdfd55
movb $0x1, 0x8(%r12)
cmpb $0x0, 0x1ff(%r14)
je 0xd4c41
cmpb $0x0, 0x1fc(%r14)
je 0xd4c41
cmpb $0x0, 0x1fd(%r14)
jne 0xd4c41
movb $0x0, 0x78(%r14)
cmpb $0x0, 0x200(%r14)
je 0xd4c64
cmpb $0x0, 0x1fc(%r14)
je 0xd4c64
cmpb $0x0, 0x1fe(%r14)
jne 0xd4c64
movb $0x0, 0x60(%r14)
leaq 0x48(%r14), %rax
pushq $0x18
popq %rcx
cmpq $0x68, %rcx
je 0xd4c88
cmpb $0x0, (%rax)
je 0xd4c7e
movups (%rax), %xmm0
movups %xmm0, (%r12,%rcx)
addq $0x10, %rcx
addq $0x18, %rax
jmp 0xd4c6b
cmpb $0x0, 0xc0(%r14)
je 0xd4cb6
movb $0x1, 0x10(%r12)
movl 0xd4(%r14), %eax
movl %eax, 0xa0(%r12)
movq 0xcc(%r14), %rax
movq %rax, 0xa4(%r12)
cmpl $0x0, (%r13)
movq %r13, 0x8(%rsp)
je 0xd4cca
movb $0x1, 0x9(%r12)
jmp 0xd4cf5
cmpb $0x0, 0x3c(%r14)
je 0xd4cd9
movb $0x1, 0xa(%r12)
jmp 0xd4cf5
cmpl $0x0, 0x34(%r14)
je 0xd4ce8
orb $0x2, 0x14(%r12)
jmp 0xd4cf5
cmpl $0x0, 0x30(%r14)
je 0xd4cf5
orb $0x1, 0x14(%r12)
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %r13
movq %rax, %rdi
callq 0xe589c
movq 0x8(%rsp), %rax
cmpl $0x0, (%rax)
jne 0xd4b52
leaq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x48(%rsp), %rcx
movq %rbx, %rdi
callq 0xee7ee
movq 0x18(%rbx), %rax
leaq 0x28(%rsp), %rcx
movq %rax, (%rcx)
movq 0x28(%r14), %rax
movq %rax, 0x8(%rcx)
movq 0x1e8(%r14), %rax
movq %rax, 0x10(%rcx)
leaq 0x10(%rsp), %rcx
movq %r13, (%rcx)
movq 0x1f0(%r14), %rax
movq %rax, 0x10(%rcx)
movb $0x1, 0x8(%rcx)
movq 0xb8(%r15), %rdx
leaq 0x11549(%rip), %rsi     # 0xe62c1
movq %r13, %rdi
callq 0xe629a
movq 0xb8(%r15), %rdi
callq 0xe0e44
movl 0x190(%r14), %r9d
movl 0x1a0(%r14), %eax
movq %rbx, %rdi
movq %r15, %rsi
leaq 0x28(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0x48(%rsp), %r8
pushq %rax
pushq 0x198(%r14)
callq 0xd6523
popq %rax
popq %rcx
leaq 0x48(%rsp), %rax
cmpl $0x0, (%rax)
je 0xd4e00
movq 0x1b8(%r14), %rdi
callq 0xeb877
movq %rax, %r14
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0xee7bc
leaq 0x670c7(%rip), %rsi     # 0x13beb2
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xdf2a5
jmp 0xd4b52
movq 0xb8(%r15), %rdi
callq 0xe0e95
movl %eax, %r15d
leaq 0x36484(%rip), %rsi     # 0x10b29a
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
cmpl 0x1f8(%r14), %r15d
je 0xd4b52
movq 0x1b8(%r14), %rdi
callq 0xeb877
movl 0x1f8(%r14), %ecx
leaq 0x621c7(%rip), %rsi     # 0x137010
movq %rbx, %rdi
movq %rax, %rdx
movl %r15d, %r8d
xorl %eax, %eax
callq 0xdf2a5
cmpb $0x0, 0x4c(%rsp)
je 0xd4b52
movq 0x50(%rsp), %rdx
movq 0x38(%rsp), %rcx
cmpq %rcx, %rdx
jge 0xd4b52
leaq 0x621c4(%rip), %rsi     # 0x137042
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf37f
jmp 0xd4b52