// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/stuffit.c
// Function: do_extract_member_file
static void do_extract_member_file(deark *c, lctx *d, struct member_data *md)
{
	struct advfudata u;

	ucstring_append_ucstring(md->advf->filename, md->full_fname);
	md->advf->original_filename_flag = 1;
	md->advf->snflags = DE_SNFLAG_FULLPATH;
	de_advfile_set_orig_filename(md->advf, md->fname->sz, md->fname->sz_strlen);

	// resource fork
	if(md->rfork.cmpr_len>0) {
		de_dbg(c, "rsrc fork data at %"I64_FMT", len=%"I64_FMT,
			md->rfork.cmpr_pos, md->rfork.cmpr_len);
		md->advf->rsrcfork.fork_len = md->rfork.unc_len;
		de_dbg_indent(c, 1);
		do_pre_decompress_fork(c, d, md, &md->rfork);
		de_dbg_indent(c, -1);
	}

	// data fork
	if(md->dfork.cmpr_len>0) {
		de_dbg(c, "data fork data at %"I64_FMT", len=%"I64_FMT,
			md->dfork.cmpr_pos, md->dfork.cmpr_len);
		md->advf->mainfork.fork_len = md->dfork.unc_len;
		de_dbg_indent(c, 1);
		do_pre_decompress_fork(c, d, md, &md->dfork);
		de_dbg_indent(c, -1);
	}

	u.d = d;
	u.md = md;
	md->advf->userdata = (void*)&u;
	md->advf->writefork_cbfn = my_advfile_cbfn;
	de_advfile_run(md->advf);

	if(md->advf->rsrcfork.fork_exists) {
		do_post_decompress_fork(c, d, md, &md->rfork);
	}
	if(md->advf->mainfork.fork_exists) {
		do_post_decompress_fork(c, d, md, &md->dfork);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x68(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x171460
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movb $0x1, 0x79(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x1, 0x70(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rdx
callq 0x17ab20
movq -0x18(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
jle 0x140252
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0xb8(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0xc0(%rax), %rcx
leaq 0x8dda6(%rip), %rsi     # 0x1cdfa2
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rcx
addq $0xa0, %rcx
callq 0x140fa0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x18(%rbp), %rax
cmpq $0x0, 0x100(%rax)
jle 0x1402d7
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0xf8(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x100(%rax), %rcx
leaq 0x8dd40(%rip), %rsi     # 0x1cdfc1
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0xf0(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rcx
addq $0xe0, %rcx
callq 0x140fa0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
leaq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
leaq 0xeba(%rip), %rcx       # 0x1411c0
movq %rcx, 0x60(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x17ac20
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpb $0x0, 0x38(%rax)
je 0x140341
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rcx
addq $0xa0, %rcx
callq 0x141260
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpb $0x0, 0x10(%rax)
je 0x14036b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rcx
addq $0xe0, %rcx
callq 0x141260
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)