// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: do_extract_member_file_arcmac
static void do_extract_member_file_arcmac(deark *c, lctx *d, struct member_data *md,
	de_finfo *fi)
{
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);

	if(!md->cmi || !md->cmi->decompressor) {
		de_err(c, "%s: Compression type 0x%02x (%s) is not supported.",
			ucstring_getpsz_d(md->fn), (unsigned int)md->cmpr_meth, md->cmpr_meth_name);
		goto done;
	}

	if(md->arcmac_dforklen && md->arcmac_rforklen) {
		// This seems to be allowed, but I need sample files.
		de_err(c, "Can't handle multi-fork ArcMac file");
		goto done;
	}
	if(md->arcmac_dforklen + md->arcmac_rforklen != md->orig_size) {
		de_err(c, "Inconsistent ArcMac fork size");
		goto done;
	}

	if(md->arcmac_fn && ucstring_isnonempty(md->arcmac_fn->str)) {
		ucstring_append_ucstring(md->arcmac_advf->filename, md->arcmac_fn->str);
	}
	else {
		ucstring_append_ucstring(md->arcmac_advf->filename, md->fn);
	}
	md->arcmac_advf->original_filename_flag = 1;

	md->arcmac_advf->mainfork.fi->timestamp[DE_TIMESTAMPIDX_MODIFY] =
		fi->timestamp[DE_TIMESTAMPIDX_MODIFY];

	md->arcmac_advf->userdata = (void*)md;
	md->arcmac_advf->writefork_cbfn = my_advfile_cbfn;

	md->arcmac_advf->mainfork.writelistener_cb = de_writelistener_for_crc;
	md->arcmac_advf->mainfork.userdata_for_writelistener = (void*)d->crco;
	md->arcmac_advf->rsrcfork.writelistener_cb = de_writelistener_for_crc;
	md->arcmac_advf->rsrcfork.userdata_for_writelistener = (void*)d->crco;
	de_crcobj_reset(d->crco);

	de_advfile_run(md->arcmac_advf);

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x15b580
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x321bf
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0x10(%rax)
jne 0x321fe
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x172650
movq -0x30(%rbp), %rdi
movq %rax, %rdx
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %ecx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %r8
leaq 0x16e747(%rip), %rsi    # 0x1a0939
movb $0x0, %al
callq 0x15bfb0
jmp 0x323a2
movq -0x18(%rbp), %rax
cmpq $0x0, 0x98(%rax)
je 0x32231
movq -0x18(%rbp), %rax
cmpq $0x0, 0xa0(%rax)
je 0x32231
movq -0x8(%rbp), %rdi
leaq 0x16e747(%rip), %rsi    # 0x1a096c
movb $0x0, %al
callq 0x15bfb0
jmp 0x323a2
movq -0x18(%rbp), %rax
movq 0x98(%rax), %rax
movq -0x18(%rbp), %rcx
addq 0xa0(%rcx), %rax
movq -0x18(%rbp), %rcx
cmpq 0x28(%rcx), %rax
je 0x32268
movq -0x8(%rbp), %rdi
leaq 0x16e734(%rip), %rsi    # 0x1a0990
movb $0x0, %al
callq 0x15bfb0
jmp 0x323a2
movq -0x18(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
je 0x322b4
movq -0x18(%rbp), %rax
movq 0xa8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x1717f0
cmpl $0x0, %eax
je 0x322b4
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rax
movq 0x68(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0xa8(%rax), %rax
movq 0x18(%rax), %rsi
callq 0x171460
jmp 0x322d0
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rax
movq 0x68(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x171460
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rax
movb $0x1, 0x79(%rax)
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rdx
movq %rdx, 0x18(%rax)
movq 0x20(%rcx), %rcx
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rax
leaq 0xa09(%rip), %rcx       # 0x32d30
movq %rcx, 0x60(%rax)
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rax
leaq 0x136f93(%rip), %rcx    # 0x1692d0
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rax
leaq 0x136f66(%rip), %rcx    # 0x1692d0
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x15f250
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rdi
callq 0x17ac20
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x15b5a0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)