// File: /workspace/github_c_makefile_star2_O3/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 0xf678d
testl %eax, %eax
je 0xde000
movq 0x140(%r14), %rdi
callq 0xf67a3
testl %eax, %eax
je 0xde000
movq 0x140(%r14), %rsi
movq 0x1b8(%r14), %rdi
callq 0xf6509
testb $0x8, 0x1a0(%r14)
jne 0xde059
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 0xde0ac
leaq 0x38(%r14), %rbp
cmpl $0x0, 0x38(%r14)
jne 0xde199
jmp 0xde14a
cmpl $0x0, 0xb0(%r15)
je 0xde07b
leaq 0x66353(%rip), %rsi     # 0x1443bd
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
jmp 0xde2a9
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 0xde100
movl %edx, %esi
shrl $0x10, %esi
andl $0xf000, %esi           # imm = 0xF000
cmpl $0x4000, %esi           # imm = 0x4000
je 0xde0d9
cmpl $0xa000, %esi           # imm = 0xA000
jne 0xde0e6
movl $0x40, %esi
jmp 0xde0de
movl $0x38, %esi
movl $0x1, (%r14,%rsi)
testl $0x490000, %edx         # imm = 0x490000
je 0xde0f8
movl $0x1, 0x34(%r14)
jmp 0xde100
movl $0x1, 0x30(%r14)
testb $0x10, %dl
jne 0xde111
testb $0x8, %dl
je 0xde119
movb $0x1, 0x3c(%r14)
jmp 0xde119
movl $0x1, 0x38(%r14)
cmpl $0x0, 0x38(%r14)
je 0xde12d
testq %rax, %rax
je 0xde195
movl $0x0, 0x38(%r14)
cmpb $0x0, 0x3c(%r14)
sete %dl
testq %rax, %rax
sete %sil
orb %dl, %sil
jne 0xde146
movb $0x0, 0x3c(%r14)
leaq 0x38(%r14), %rbp
testq %rax, %rax
jne 0xde199
cmpl $0x0, (%rcx)
jne 0xde15b
cmpl $0x13, 0x8(%r14)
ja 0xde199
movq 0x1b8(%r14), %rax
testq %rax, %rax
je 0xde199
movq 0x10(%rax), %rcx
testq %rcx, %rcx
jle 0xde199
movq 0x8(%rax), %rax
cmpl $0x2f, -0x4(%rax,%rcx,4)
jne 0xde199
leaq 0x6625f(%rip), %rsi     # 0x1443e1
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movl $0x1, (%rbp)
jmp 0xde199
leaq 0x38(%r14), %rbp
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0xe8a1c
movq 0x28(%r14), %rdx
movq 0x1e8(%r14), %rcx
leaq 0x598c3(%rip), %rsi     # 0x137a7b
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
testb $0x1, 0x1a0(%r14)
jne 0xde21a
movq 0x198(%r14), %rax
testq %rax, %rax
je 0xde23f
cmpq $0x0, 0x10(%rax)
je 0xde23f
movq 0x1e8(%r14), %rax
addq 0x28(%r14), %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jle 0xde2bd
movq 0x1b8(%r14), %rdi
callq 0xf70f6
leaq 0x369e0(%rip), %rsi     # 0x114bf8
jmp 0xde22d
movq 0x1b8(%r14), %rdi
callq 0xf70f6
leaq 0x661d6(%rip), %rsi     # 0x144403
xorl %r12d, %r12d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9295
jmp 0xde282
movq 0x1b8(%r14), %rdi
callq 0xf70f6
movl 0x190(%r14), %ecx
movq 0x198(%r14), %rdx
testq %rdx, %rdx
je 0xde264
movq 0x8(%rdx), %r8
jmp 0xde26b
leaq 0x4dee6(%rip), %r8      # 0x12c151
leaq 0x65e61(%rip), %rsi     # 0x1440d3
xorl %r12d, %r12d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9295
xorl %r13d, %r13d
movq %r13, %rdi
callq 0xf052b
movq %rbx, %rdi
movq %r12, %rsi
callq 0xea50e
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
movl $0x1, %ebp
movl %ebp, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x40(%r14)
je 0xde2e4
movq 0x1b8(%r14), %rdi
callq 0xf70f6
leaq 0x6614c(%rip), %rsi     # 0x144423
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8faa
movq %rbx, %rdi
callq 0xea504
movq %rax, %r12
movb $0x1, 0xc(%rax)
movq 0x1b8(%r14), %rdi
callq 0xf67a3
testl %eax, %eax
je 0xde356
cmpb $0x0, 0xc0(%r14)
je 0xde32d
movq 0x1b8(%r14), %rdx
leaq 0xc8(%r14), %rcx
movl 0x38(%r14), %r8d
movq %rbx, %rdi
movq %r12, %rsi
xorl %r9d, %r9d
callq 0xf93ff
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 0xea53f
movb $0x1, 0x8(%r12)
cmpb $0x0, 0x1ff(%r14)
je 0xde379
cmpb $0x0, 0x1fc(%r14)
je 0xde379
cmpb $0x0, 0x1fd(%r14)
jne 0xde379
movb $0x0, 0x78(%r14)
cmpb $0x0, 0x200(%r14)
je 0xde39c
cmpb $0x0, 0x1fc(%r14)
je 0xde39c
cmpb $0x0, 0x1fe(%r14)
jne 0xde39c
movb $0x0, 0x60(%r14)
leaq 0x48(%r14), %rax
movl $0x18, %ecx
cmpb $0x0, (%rax)
je 0xde3b2
movups (%rax), %xmm0
movups %xmm0, (%r12,%rcx)
addq $0x10, %rcx
addq $0x18, %rax
cmpq $0x68, %rcx
jne 0xde3a5
cmpb $0x0, 0xc0(%r14)
je 0xde3ee
movb $0x1, 0x10(%r12)
movl 0xd4(%r14), %eax
movl %eax, 0xa0(%r12)
movq 0xcc(%r14), %rax
movq %rax, 0xa4(%r12)
cmpl $0x0, (%rbp)
je 0xde3fc
movb $0x1, 0x9(%r12)
jmp 0xde427
cmpb $0x0, 0x3c(%r14)
je 0xde40b
movb $0x1, 0xa(%r12)
jmp 0xde427
cmpl $0x0, 0x34(%r14)
je 0xde41a
orb $0x2, 0x14(%r12)
jmp 0xde427
cmpl $0x0, 0x30(%r14)
je 0xde427
orb $0x1, 0x14(%r12)
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xefda1
movq %rax, %r13
movq %rax, %rdi
callq 0xf0855
cmpl $0x0, (%rbp)
jne 0xde285
leaq 0x88(%rsp), %rbp
leaq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xfa1dc
movq 0x18(%rbx), %rax
movq %rax, (%rbp)
movq 0x28(%r14), %rax
movq %rax, 0x8(%rbp)
movq 0x1e8(%r14), %rax
movq %rax, 0x10(%rbp)
leaq 0x10(%rsp), %rcx
movq %r13, (%rcx)
movq 0x1f0(%r14), %rax
movq %rax, 0x10(%rcx)
movb $0x1, 0x8(%rcx)
movq 0xb8(%r15), %rdx
leaq 0x12fa9(%rip), %rsi     # 0xf1451
movq %r13, %rdi
callq 0xf1412
movq 0xb8(%r15), %rdi
callq 0xeb7fe
movl 0x190(%r14), %r9d
movl 0x1a0(%r14), %eax
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
leaq 0x10(%rsp), %rcx
leaq 0x28(%rsp), %r8
pushq %rax
pushq 0x198(%r14)
callq 0xdfcf6
addq $0x10, %rsp
leaq 0x28(%rsp), %rax
cmpl $0x0, (%rax)
je 0xde530
movq 0x1b8(%r14), %rdi
callq 0xf70f6
movq %rax, %r14
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0xfa1a4
leaq 0x6ae67(%rip), %rsi     # 0x149382
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9295
jmp 0xde285
movq 0xb8(%r15), %rdi
callq 0xeb865
movl %eax, %ebp
leaq 0x39e45(%rip), %rsi     # 0x11838a
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
cmpl 0x1f8(%r14), %ebp
je 0xde285
movq 0x1b8(%r14), %rdi
callq 0xf70f6
movl 0x1f8(%r14), %ecx
leaq 0x65ee8(%rip), %rsi     # 0x144460
movq %rbx, %rdi
movq %rax, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0xe9295
cmpb $0x0, 0x2c(%rsp)
je 0xde285
movq 0x30(%rsp), %rdx
movq 0x98(%rsp), %rcx
cmpq %rcx, %rdx
jge 0xde285
leaq 0x65ee2(%rip), %rsi     # 0x144492
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9393
jmp 0xde285