// File: /workspace/github_c_makefile_star2_O1/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 $0x58, %rsp
movq %rdx, 0x40(%rsp)
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rsi), %r12
leaq 0x30(%rsp), %rsi
callq 0xe958c
movq %rbx, 0x38(%rsp)
movq 0x10(%rbx), %rdx
leaq 0x720da(%rip), %rsi     # 0x13b9e3
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
cmpl $0x2, (%r15)
jl 0xc997d
movq %r15, %rdi
callq 0xf6870
movq %rax, %r14
movq 0x18(%r15), %rdi
movq 0x38(%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 0xf0203
movq %r14, %rdi
callq 0xf7557
leaq 0x5646c(%rip), %rsi     # 0x11fdd4
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
callq 0xf6bb0
movq %r15, 0x20(%rsp)
movq 0x38(%rsp), %rax
movq 0x18(%rax), %r13
addq 0x10(%rax), %r13
cmpq %r12, %r13
jle 0xc9f2c
movq %r15, %rdi
leaq 0x34(%rsp), %rsi
callq 0xe958c
movq %r15, %rdi
leaq 0x72056(%rip), %rsi     # 0x13ba05
movq %r12, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
movl $0x50, %esi
movq %r15, %rdi
callq 0xe969b
movq %rax, %r14
movq %r12, (%rax)
movb $0x1, %bpl
subq %r12, %r13
jle 0xc9bf3
movq %r12, 0x28(%rsp)
leaq 0x8(%r14), %rax
movq %rax, 0x18(%rsp)
leaq 0x20(%r14), %rax
movq %rax, 0x50(%rsp)
movq %r14, 0x10(%rsp)
addq $0x10, %r14
movq %r14, 0x48(%rsp)
xorl %ebp, %ebp
xorl %ebx, %ebx
xorl %r12d, %r12d
leaq 0x71d4c(%rip), %rcx     # 0x13b764
cmpl $0x4, %r12d
jne 0xc9a2f
movl $0x3, %r14d
movl $0x4, %r15d
jmp 0xc9bc6
movl $0x2, %r14d
cmpq %r13, %rbx
jge 0xc9bc3
cmpl $0x2, %r12d
jb 0xc9a52
movq 0x18(%rsp), %rax
cmpq (%rax), %rbx
jge 0xc9bc3
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x28(%rsp), %rax
leaq (%rax,%rbx), %rsi
callq 0xef0d5
cmpl $0x2, %r12d
je 0xc9b40
cmpl $0x1, %r12d
leaq 0x71ce6(%rip), %rcx     # 0x13b764
je 0xc9aad
testl %r12d, %r12d
jne 0xc9b73
movl $0x5, %r14d
xorl %r15d, %r15d
cmpb $0x9, %al
je 0xc9bc6
movzbl %al, %ecx
movl $0x1, %r12d
movq 0x48(%rsp), %rax
jmp 0xc9b62
cmpb $0x20, %al
je 0xc9ac3
movzbl %al, %eax
movl $0x1, %r12d
cmpl $0x9, %eax
jne 0xc9bc0
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rsi
movq %rbx, %rdx
subq %rsi, %rdx
movq %rdx, 0x18(%rax)
movq 0x20(%rsp), %r12
movq 0x18(%r12), %rdi
addq 0x28(%rsp), %rsi
movl $0xa, %ecx
movq 0x18(%rsp), %r8
callq 0xefa0a
movl $0x1, %r15d
testl %eax, %eax
je 0xc9bea
movq 0x18(%rsp), %rax
movl (%rax), %edx
movq %r12, %rdi
leaq 0x616a2(%rip), %rsi     # 0x12b1b5
xorl %eax, %eax
callq 0xe9226
movl $0x2, %r12d
movl $0x2, %r14d
movq 0x18(%rsp), %rax
cmpq %r13, (%rax)
leaq 0x71c2f(%rip), %rcx     # 0x13b764
jle 0xc9bc0
jmp 0xc9bc6
movl $0x5, %r14d
movl $0x2, %r15d
cmpb $0x9, %al
je 0xc9bea
movzbl %al, %ecx
movl $0x3, %r12d
movq 0x50(%rsp), %rax
cmpl $0x20, %ecx
leaq 0x71bf8(%rip), %rcx     # 0x13b764
je 0xc9bc6
movq %rbx, (%rax)
jmp 0xc9bc0
cmpl $0x3, %r12d
jne 0xc9bc0
cmpb $0x3d, %al
jne 0xc9bc0
movq %rbx, %rax
movq 0x10(%rsp), %rdx
subq 0x20(%rdx), %rax
movq %rax, 0x28(%rdx)
leaq 0x1(%rbx), %rax
movq %rax, 0x30(%rdx)
movq 0x8(%rdx), %rax
leaq (%rbp,%rax), %rcx
leaq -0x2(%rbp,%rax), %rax
movq %rax, 0x38(%rdx)
movl $0x4, %r12d
movl $0x3, %r15d
cmpq $0x2, %rcx
leaq 0x71ba6(%rip), %rcx     # 0x13b764
jl 0xc9bc6
xorl %r14d, %r14d
movl %r12d, %r15d
cmpl $0x5, %r14d
ja 0xc9de4
movl %r14d, %eax
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
incq %rbx
decq %rbp
movl %r15d, %r12d
jmp 0xc9a18
leaq 0x71b73(%rip), %rcx     # 0x13b764
jmp 0xc9bc6
xorl %ebx, %ebx
jmp 0xc9eb3
xorl %ebx, %ebx
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %r12
jmp 0xc9df7
movq 0x20(%rsp), %r15
movq 0x18(%r15), %rdi
movq 0x18(%rsp), %r13
movq (%r13), %rax
movq 0x28(%rsp), %r12
leaq (%r12,%rax), %rsi
decq %rsi
callq 0xef0d5
cmpb $0xa, %al
jne 0xc9df5
movq 0x10(%rsp), %r14
movq 0x28(%r14), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0xea792
movq 0x18(%r15), %rdi
movq 0x20(%r14), %rsi
addq %r12, %rsi
movq %rax, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
movl $0x2, %r9d
callq 0xefe67
movq %rax, 0x40(%r14)
movq 0x18(%rax), %rdi
callq 0xf7557
movq %r15, %rdi
leaq 0x71da3(%rip), %rsi     # 0x13ba22
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x38(%r14), %rdi
movl $0x10000, %esi          # imm = 0x10000
callq 0xea792
movq 0x18(%r15), %rdi
movq 0x30(%r14), %rsi
addq %r12, %rsi
movq %rax, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
movl $0x2, %r9d
callq 0xefe67
movq %rax, 0x48(%r14)
movq 0x18(%rax), %rdi
callq 0xf7557
movq %r15, %rdi
leaq 0x48a8e(%rip), %rsi     # 0x11275b
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x40(%r14), %rax
movq 0x8(%rax), %rbp
movl $0xb, %edx
movq %rbp, %rdi
leaq 0x71d42(%rip), %rsi     # 0x13ba30
callq 0x18050
testl %eax, %eax
movq 0x40(%rsp), %rbx
jne 0xc9d00
movb $0x1, 0x10(%rbx)
movq %rbp, %rdi
leaq 0x6915d(%rip), %rsi     # 0x132e67
callq 0x181a0
testl %eax, %eax
je 0xc9e04
movq %rbp, %rdi
leaq 0x71d1b(%rip), %rsi     # 0x13ba3c
callq 0x181a0
testl %eax, %eax
je 0xc9e04
movq %rbp, %rdi
leaq 0x71d14(%rip), %rsi     # 0x13ba4c
callq 0x181a0
testl %eax, %eax
je 0xc9e2f
movq %rbp, %rdi
leaq 0x71b5d(%rip), %rsi     # 0x13b8ac
callq 0x181a0
testl %eax, %eax
je 0xc9e51
movq %rbp, %rdi
leaq 0x71cef(%rip), %rsi     # 0x13ba55
callq 0x181a0
testl %eax, %eax
je 0xc9e65
movq %rbp, %rdi
leaq 0x71cde(%rip), %rsi     # 0x13ba5b
callq 0x181a0
testl %eax, %eax
je 0xc9e7c
movq %rbp, %rdi
leaq 0x71ce0(%rip), %rsi     # 0x13ba74
callq 0x181a0
testl %eax, %eax
je 0xc9e93
movq %rbp, %rdi
leaq 0x4d4c4(%rip), %rsi     # 0x11726f
callq 0x181a0
testl %eax, %eax
jne 0xc9ead
cmpq $0x0, 0x38(%r14)
je 0xc9f26
movb $0x1, 0x11(%rbx)
movq 0x48(%r14), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x109895
movq %rax, 0x18(%rbx)
jmp 0xc9ead
xorl %ebx, %ebx
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %r12
jmp 0xc9efb
xorl %ebx, %ebx
movq 0x10(%rsp), %r14
movb $0x1, %bpl
jmp 0xc9eb3
cmpq $0x0, (%rbx)
jne 0xc9e15
movq %r15, %rdi
callq 0xf6870
movq %rax, (%rbx)
movq (%rbx), %rdi
callq 0xf6883
movq (%rbx), %rdi
movq 0x48(%r14), %rax
movq 0x18(%rax), %rsi
callq 0xf6969
jmp 0xc9ead
cmpq $0x0, 0x8(%rbx)
jne 0xc9e42
movq %r15, %rdi
callq 0xf6870
movq %rax, 0x8(%rbx)
movq 0x8(%rbx), %rdi
callq 0xf6883
movq 0x8(%rbx), %rdi
jmp 0xc9e20
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
leaq 0x63ef9(%rip), %r8      # 0x12dd5c
jmp 0xc9ea8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x2, %ecx
leaq 0x62236(%rip), %r8      # 0x12c0b0
jmp 0xc9ea8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x3, %ecx
leaq 0x71bd0(%rip), %r8      # 0x13ba61
jmp 0xc9ea8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
leaq 0x65295(%rip), %r8      # 0x12f13d
callq 0xc9fed
movq (%r13), %rbx
xorl %ebp, %ebp
testb %bpl, %bpl
je 0xc9ecc
movq %r15, %rdi
leaq 0x71bca(%rip), %rsi     # 0x13ba8c
movq %r12, %rdx
xorl %eax, %eax
callq 0xe9b27
movq 0x40(%r14), %rsi
movq %r15, %rdi
callq 0xf00aa
movq 0x48(%r14), %rsi
movq %r15, %rdi
callq 0xf00aa
movq %r15, %rdi
movq %r14, %rsi
callq 0xe9752
movl 0x34(%rsp), %esi
movq %r15, %rdi
callq 0xe9595
testq %rbx, %rbx
movq %rbx, %rax
movl $0x0, %ecx
cmovleq %rcx, %rax
testb $0x1, %bpl
cmovneq %rcx, %rax
testb $0x1, %bpl
jne 0xc9f2c
addq %rax, %r12
testq %rbx, %rbx
jg 0xc9982
jmp 0xc9f2c
movb $0x0, 0x11(%rbx)
jmp 0xc9ead
movl 0x30(%rsp), %esi
movq %r15, %rdi
callq 0xe9595
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq