// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tar.c
// Function: read_exthdr
static void read_exthdr(deark *c, lctx *d, struct phys_member_data *pmd,
	struct extattr_data *ea)
{
	int saved_indent_level;
	i64 pos = pmd->file_data_pos;

	de_dbg_indent_save(c, &saved_indent_level);
	de_dbg(c, "POSIX extended header data at %"I64_FMT, pmd->file_data_pos);
	de_dbg_indent(c, 1);

	if(c->debug_level>=2) {
		de_ucstring *tmps;
		tmps = ucstring_create(c);
		dbuf_read_to_ucstring_n(c->infile, pmd->file_data_pos, pmd->filesize,
			32768, tmps, 0, DE_ENCODING_UTF8);
		de_dbg(c, "data: \"%s\"", ucstring_getpsz_d(tmps));
		ucstring_destroy(tmps);
	}

	while(pos < pmd->file_data_pos + pmd->filesize) {
		i64 bytes_consumed = 0;

		if(!read_exthdr_item(c, d, pmd, ea, pos,
			pmd->file_data_pos+pmd->filesize-pos, &bytes_consumed))
		{
			break;
		}
		if(bytes_consumed<1) break;
		pos += bytes_consumed;
	}

	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, 0x28(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rbp
leaq 0x18(%rsp), %rsi
callq 0xe8a1c
movq %r14, 0x20(%rsp)
movq 0x10(%r14), %rdx
leaq 0x72f9a(%rip), %rsi     # 0x13bd5d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
cmpl $0x2, (%rbx)
jl 0xc8e36
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r14
movq 0x18(%rbx), %rdi
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movl $0x2, (%rsp)
movl $0x8000, %ecx           # imm = 0x8000
movq %r14, %r8
xorl %r9d, %r9d
callq 0xefc2a
movq %r14, %rdi
callq 0xf70f6
leaq 0x570db(%rip), %rsi     # 0x11fefc
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
callq 0xf6753
movq 0x20(%rsp), %rax
movq 0x18(%rax), %r15
addq 0x10(%rax), %r15
cmpq %rbp, %r15
jle 0xc9324
movq %rbx, %rdi
leaq 0x1c(%rsp), %rsi
callq 0xe8a1c
movq %rbx, %rdi
leaq 0x72f1c(%rip), %rsi     # 0x13bd7f
movq %rbp, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movl $0x50, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %r15, %rcx
movq %rax, 0x8(%rsp)
movq %rbp, (%rax)
subq %rbp, %rcx
movq %rcx, 0x40(%rsp)
jle 0xc9221
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x20(%rax), %rcx
movq %rcx, 0x38(%rsp)
addq $0x10, %rax
movq %rax, 0x30(%rsp)
movq %rbp, %r12
subq %r15, %r12
xorl %r13d, %r13d
xorl %r15d, %r15d
movq %r12, %rax
addq %r15, %rax
je 0xc9221
cmpl $0x2, %r13d
jb 0xc8eec
movq 0x10(%rsp), %rax
cmpq (%rax), %r15
jge 0xc9221
movq 0x18(%rbx), %rdi
leaq (%r15,%rbp), %rsi
callq 0xeead3
cmpl $0x2, %r13d
je 0xc8fa4
cmpl $0x1, %r13d
je 0xc8f2f
testl %r13d, %r13d
jne 0xc8fc8
xorl %r13d, %r13d
cmpb $0x9, %al
je 0xc8fd6
movzbl %al, %edx
movl $0x1, %eax
movq 0x30(%rsp), %rcx
jmp 0xc8fbb
cmpb $0x20, %al
je 0xc8f45
movzbl %al, %eax
movl $0x1, %r13d
cmpl $0x9, %eax
jne 0xc8fd6
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rsi
movq %r15, %rdx
subq %rsi, %rdx
movq %rdx, 0x18(%rax)
movq 0x18(%rbx), %rdi
addq %rbp, %rsi
movl $0xa, %ecx
movq 0x10(%rsp), %r8
callq 0xef3d9
testl %eax, %eax
je 0xc9221
movq 0x10(%rsp), %r14
movl (%r14), %edx
movq %rbx, %rdi
leaq 0x624fd(%rip), %rsi     # 0x12b485
xorl %eax, %eax
callq 0xe8617
movl $0x2, %r13d
movq 0x40(%rsp), %rax
cmpq %rax, (%r14)
jle 0xc8fd6
jmp 0xc9221
movl $0x2, %r13d
cmpb $0x9, %al
je 0xc8fd6
movzbl %al, %edx
movl $0x3, %eax
movq 0x38(%rsp), %rcx
cmpl $0x20, %edx
je 0xc8fd6
movq %r15, (%rcx)
movl %eax, %r13d
jmp 0xc8fd6
cmpl $0x3, %r13d
jne 0xc8fd6
cmpb $0x3d, %al
je 0xc91ed
incq %r15
cmpl $0x4, %r13d
jne 0xc8ecc
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rbx), %rdi
leaq (%rax,%rbp), %rsi
decq %rsi
callq 0xeead3
cmpb $0xa, %al
jne 0xc9221
movq 0x8(%rsp), %r12
movq 0x28(%r12), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0xe9c3b
movq 0x18(%rbx), %rdi
movq 0x20(%r12), %rsi
addq %rbp, %rsi
movq %rax, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
movl $0x2, %r9d
callq 0xef87c
movq %rax, 0x40(%r12)
movq 0x18(%rax), %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0x72d4d(%rip), %rsi     # 0x13bd9c
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x38(%r12), %rdi
movl $0x10000, %esi          # imm = 0x10000
callq 0xe9c3b
movq 0x18(%rbx), %rdi
movq 0x30(%r12), %rsi
addq %rbp, %rsi
movq %rax, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
movl $0x2, %r9d
callq 0xef87c
movq %rax, 0x48(%r12)
movq 0x18(%rax), %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0x496cb(%rip), %rsi     # 0x11276b
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x40(%r12), %rax
movq 0x8(%rax), %r14
movl $0xb, %edx
movq %r14, %rdi
leaq 0x72ce8(%rip), %rsi     # 0x13bdaa
callq 0x18050
testl %eax, %eax
movq 0x28(%rsp), %r15
jne 0xc90d5
movb $0x1, 0x10(%r15)
movq %r14, %rdi
leaq 0x6a180(%rip), %rsi     # 0x13325f
callq 0x181a0
testl %eax, %eax
je 0xc91bc
movq %r14, %rdi
leaq 0x72cc0(%rip), %rsi     # 0x13bdb6
callq 0x181a0
testl %eax, %eax
je 0xc91bc
movq %r14, %rdi
leaq 0x72cb9(%rip), %rsi     # 0x13bdc6
callq 0x181a0
testl %eax, %eax
je 0xc928b
movq %r14, %rdi
leaq 0x72b02(%rip), %rsi     # 0x13bc26
callq 0x181a0
testl %eax, %eax
je 0xc92b1
movq %r14, %rdi
leaq 0x72c94(%rip), %rsi     # 0x13bdcf
callq 0x181a0
testl %eax, %eax
je 0xc92c5
movq %r14, %rdi
leaq 0x72c83(%rip), %rsi     # 0x13bdd5
callq 0x181a0
testl %eax, %eax
je 0xc92dc
movq %r14, %rdi
leaq 0x72c85(%rip), %rsi     # 0x13bdee
callq 0x181a0
testl %eax, %eax
je 0xc92f3
movq %r14, %rdi
leaq 0x4e18f(%rip), %rsi     # 0x11730f
callq 0x181a0
testl %eax, %eax
jne 0xc930d
cmpq $0x0, 0x38(%r12)
je 0xc931d
movb $0x1, 0x11(%r15)
movq 0x48(%r12), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x10937d
movq %rax, 0x18(%r15)
jmp 0xc930d
movq (%r15), %rdi
testq %rdi, %rdi
jne 0xc91d2
movq %rbx, %rdi
callq 0xf6410
movq %rax, %rdi
movq %rax, (%r15)
callq 0xf6423
movq (%r15), %rdi
movq 0x48(%r12), %rax
movq 0x18(%rax), %rsi
callq 0xf6509
jmp 0xc930d
movq %r15, %rax
movq 0x8(%rsp), %rsi
subq 0x20(%rsi), %rax
movq %rax, 0x28(%rsi)
leaq 0x1(%r15), %rax
movq %rax, 0x30(%rsi)
movq 0x8(%rsi), %rax
movq %rax, %rcx
subq %r15, %rcx
leaq -0x2(%rcx), %rdx
movq %rdx, 0x38(%rsi)
cmpq $0x2, %rcx
jge 0xc8feb
movq %rbx, %rdi
leaq 0x72bdb(%rip), %rsi     # 0x13be06
movq %rbp, %rdx
xorl %eax, %eax
callq 0xe8faa
movb $0x1, %r15b
xorl %r14d, %r14d
movq 0x8(%rsp), %r12
movq 0x40(%r12), %rsi
movq %rbx, %rdi
callq 0xefaca
movq 0x48(%r12), %rsi
movq %rbx, %rdi
callq 0xefaca
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe8be2
movl 0x1c(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
testb %r15b, %r15b
jne 0xc9324
addq %r14, %rbp
testq %r14, %r14
jg 0xc8e36
jmp 0xc9324
movq 0x8(%r15), %rdi
testq %rdi, %rdi
jne 0xc92a3
movq %rbx, %rdi
callq 0xf6410
movq %rax, %rdi
movq %rax, 0x8(%r15)
callq 0xf6423
movq 0x8(%r15), %rdi
jmp 0xc91da
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
leaq 0x64d91(%rip), %r8      # 0x12e054
jmp 0xc9308
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0x2, %ecx
leaq 0x630be(%rip), %r8      # 0x12c398
jmp 0xc9308
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0x3, %ecx
leaq 0x72aea(%rip), %r8      # 0x13bddb
jmp 0xc9308
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0x1, %ecx
leaq 0x66118(%rip), %r8      # 0x12f420
callq 0xc93e5
movq 0x10(%rsp), %rax
movq (%rax), %r14
xorl %r15d, %r15d
jmp 0xc9240
movb $0x0, 0x11(%r15)
jmp 0xc930d
movl 0x18(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq