// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: do_info_item
static void do_info_item(deark *c, lctx *d, struct member_data *md)
{
	int saved_indent_level;
	i64 pos = md->cmpr_data_pos;
	i64 endpos = md->cmpr_data_pos+md->cmpr_size;

	de_dbg_indent_save(c, &saved_indent_level);
	de_dbg(c, "info item data (meth=%d) at %"I64_FMT" len=%"I64_FMT, (int)md->cmpr_meth,
		md->cmpr_data_pos, md->cmpr_size);
	de_dbg_indent(c, 1);

	while(1) {
		i64 reclen;
		i64 recpos;
		i64 dpos;
		i64 dlen;
		u8 rectype;
		const struct extinfo_item_info *ei;
		const char *ei_name;

		recpos = pos;
		if(pos+3 > endpos) goto done;
		reclen = de_getu16le_p(&pos);
		if(reclen<3 || recpos+reclen > endpos) goto done;
		rectype = de_getbyte_p(&pos);
		ei = find_extinfo_item(md->cmpr_meth, rectype);
		if(ei && ei->name) ei_name = ei->name;
		else ei_name = "?";

		dpos = recpos + 3;
		dlen = reclen - 3;
		de_dbg(c, "record type %d (%s) at %"I64_FMT", dpos=%"I64_FMT", dlen=%"I64_FMT,
			(int)rectype, ei_name, recpos, dpos, dlen);
		de_dbg_indent(c, 1);
		if(ei && (ei->flags & 0x01)) {
			do_info_record_string(c, d, dpos, dlen, ei_name);
		}
		else {
			de_dbg_hexdump(c, c->infile, dpos, dlen, 256, NULL, 0x1);
		}
		de_dbg_indent(c, -1);
		pos = recpos + reclen;
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x18(%rbp), %rcx
addq 0x38(%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x15b580
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %edx
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x38(%rax), %r8
leaq 0x16e88e(%rip), %rsi    # 0x1a0872
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
addq $0x3, %rax
cmpq -0x30(%rbp), %rax
jle 0x32014
jmp 0x32164
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1652c0
movq %rax, -0x38(%rbp)
cmpq $0x3, -0x38(%rbp)
jl 0x3203e
movq -0x40(%rbp), %rax
addq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jle 0x32043
jmp 0x32164
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movb %al, -0x51(%rbp)
movq -0x18(%rbp), %rax
movb 0x10(%rax), %al
movzbl %al, %edi
movzbl -0x51(%rbp), %esi
callq 0x32c00
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x3208e
movq -0x60(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3208e
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x32099
leaq 0x185b98(%rip), %rax    # 0x1b7c2d
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
subq $0x3, %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x51(%rbp), %edx
movq -0x68(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x48(%rbp), %r9
movq -0x50(%rbp), %rax
leaq 0x16e7ca(%rip), %rsi    # 0x1a089a
movq %rax, (%rsp)
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
cmpq $0x0, -0x60(%rbp)
je 0x3211a
movq -0x60(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3211a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x68(%rbp), %r8
callq 0x32c90
jmp 0x32145
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x48(%rbp), %rdx
movq -0x50(%rbp), %rcx
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, (%rsp)
callq 0x15b840
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x40(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x31ff9
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x15b5a0
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)