// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/fat.c
// Function: do_dir_entries
static int do_dir_entries(deark *c, lctx *d, struct dirctx *dctx,
	i64 pos1, i64 len, int nesting_level, int scanmode)
{
	i64 num_entries;
	i64 i;
	int retval = 0;

	num_entries = len/32;
	de_dbg(c, "num entries: %"I64_FMT, num_entries);

	for(i=0; i<num_entries; i++) {
		if(!do_dir_entry(c, d, dctx, pos1+32*i, nesting_level, scanmode)) {
			goto done;
		}
		dctx->dir_entry_count++;
	}

	retval = 1;
done:
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %r9d, %r14d
movq %r8, %rbx
movq %rcx, 0x60(%rsp)
movq %rdx, %rbp
movq %rsi, 0x10(%rsp)
movq %rdi, %r13
leaq 0x1f(%r8), %rdx
testq %r8, %r8
cmovnsq %r8, %rdx
sarq $0x5, %rdx
leaq 0xe6916(%rip), %rsi     # 0x143408
movq %rdx, 0x58(%rsp)
xorl %eax, %eax
callq 0xe8617
movl $0x1, %eax
cmpq $0x20, %rbx
jl 0x5d510
leaq 0x18(%rbp), %rax
movq %rax, 0x40(%rsp)
movq %r14, 0x50(%rsp)
leal 0x1(%r14), %eax
movl %eax, 0x4c(%rsp)
xorl %ebx, %ebx
movq %rbp, 0x28(%rsp)
movq %rbx, 0x68(%rsp)
shlq $0x5, %rbx
movq 0x60(%rsp), %rbp
leaq (%rbx,%rbp), %r14
movl $0x58, %esi
movq %r13, %rdi
callq 0xe8b2b
movq %rax, %r12
movq %r13, %rdi
leaq 0xe6b57(%rip), %rsi     # 0x1436ad
movq %r14, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r13, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%r13), %rdi
movl $0x8, %ecx
movq %r12, %rsi
movq %r14, %rdx
callq 0xee8d4
movq 0x18(%r13), %rdi
leaq 0x8(%r12), %r15
leaq (%rbx,%rbp), %rdx
addq $0x8, %rdx
movl $0x3, %ecx
movq %r15, %rsi
callq 0xee8d4
movzbl (%r12), %ebx
testl %ebx, %ebx
je 0x5cc46
movq %r14, %rax
movq %r15, %r14
movq 0x18(%r13), %rdi
movq %rax, 0x18(%rsp)
leaq 0xb(%rax), %rsi
callq 0xeead3
movzbl %al, %eax
movl %eax, 0x10(%r12)
movq %r13, %rdi
callq 0xf6410
movq %rax, %r15
movl 0x10(%r12), %esi
movq %r13, %rdi
movq %rax, %rdx
movl $0x1, %ecx
callq 0xeaae1
movl 0x10(%r12), %ebp
movq %r15, 0x20(%rsp)
movq %r15, %rdi
callq 0xf70f6
movq %r13, %rdi
leaq 0xe6cc4(%rip), %rsi     # 0x1438cc
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movl 0x10(%r12), %eax
movl %eax, %ecx
andl $0x3f, %ecx
cmpl $0xf, %ecx
jne 0x5cc63
cmpl $0xe5, %ebx
movq 0x28(%rsp), %rbp
movq %r13, %rdi
jne 0x5cc86
leaq 0xc5c5b(%rip), %rsi     # 0x122895
xorl %eax, %eax
callq 0xe8617
jmp 0x5cdb4
movq %r13, %rdi
leaq 0xc5bbb(%rip), %rsi     # 0x12280b
xorl %eax, %eax
callq 0xe8617
xorl %edi, %edi
movq 0x28(%rsp), %rbp
jmp 0x5cdbd
shrl $0x3, %eax
andl $0x3, %eax
leaq 0xc5750(%rip), %rcx     # 0x1223c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq 0x28(%rsp), %rbp
jmpq *%rax
movb $0x1, 0xc(%r12)
jmp 0x5ccc8
leaq 0xc5c1d(%rip), %rsi     # 0x1228aa
movl %ebx, %edx
xorl %eax, %eax
callq 0xe8617
movl %ebx, %r15d
andl $-0x41, %r15d
leal -0x15(%r15), %eax
cmpb $-0x15, %al
ja 0x5cddb
movq %r13, %rdi
leaq 0xc5c0a(%rip), %rsi     # 0x1228bd
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8faa
jmp 0x5cdb4
movb $0x1, 0xb(%r12)
cmpb $0x0, (%rbp)
movq %r14, %r15
movq 0x18(%rsp), %r14
je 0x5cf41
cmpb $0x1, 0x2(%rbp)
jne 0x5cf3d
cmpq $0x0, 0x40(%r12)
jne 0x5cf3d
xorl %eax, %eax
xorl %ecx, %ecx
rorb %al
addb (%r12,%rcx), %al
incq %rcx
cmpq $0x8, %rcx
jne 0x5ccf4
movq $-0x3, %rcx
rorb %al
addb 0x3(%r15,%rcx), %al
incq %rcx
jne 0x5cd0a
movzbl %al, %ebp
movq %r13, %rdi
leaq 0xc5c0e(%rip), %rsi     # 0x122931
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x28(%rsp), %rax
cmpb 0x3(%rax), %bpl
movq %rax, %rbp
jne 0x5cf3d
movzbl 0x1(%rbp), %eax
cmpq $0x14, %rax
ja 0x5cf3d
testq %rax, %rax
je 0x5cee8
leaq (%rax,%rax,4), %rcx
leaq (%rcx,%rcx,4), %rdx
addq %rax, %rdx
xorl %eax, %eax
movzbl 0x18(%rbp,%rax), %ecx
cmpl $0xff, %ecx
je 0x5cd7f
testl %ecx, %ecx
jne 0x5cd8a
cmpb $0x0, 0x19(%rbp,%rax)
jne 0x5cd8a
jmp 0x5cef3
cmpb $-0x1, 0x19(%rbp,%rax)
je 0x5cef3
addq $0x2, %rax
cmpq %rax, %rdx
jne 0x5cd62
movq %rdx, 0x30(%rsp)
jmp 0x5cef8
movq %r13, %rdi
leaq 0xc5a78(%rip), %rsi     # 0x12281f
xorl %eax, %eax
callq 0xe8faa
movb $0x1, 0xd(%r12)
movb $0x0, (%rbp)
movq 0x20(%rsp), %rdi
callq 0xf6753
movq 0x38(%r12), %rdi
callq 0xf6753
movq 0x40(%r12), %rdi
callq 0xf6753
jmp 0x5d29a
testb $0x40, %bl
jne 0x5ce06
cmpb $0x0, (%rbp)
movq 0x18(%rsp), %r14
je 0x5cdf7
leal 0x1(%r15), %eax
movzbl 0x2(%rbp), %ecx
cmpl %ecx, %eax
je 0x5ce24
movq %r13, %rdi
leaq 0xc5ada(%rip), %rsi     # 0x1228db
jmp 0x5cc3a
movl $0x208, %edx            # imm = 0x208
movq 0x40(%rsp), %rdi
xorl %esi, %esi
callq 0x18140
movb %r15b, 0x1(%rbp)
movb $0x1, (%rbp)
movq 0x18(%rsp), %r14
movb %r15b, 0x2(%rbp)
leaq (%r15,%r15,4), %rax
movq %rbx, 0x38(%rsp)
leaq (%rax,%rax,4), %rbx
addq %r15, %rbx
movq 0x18(%r13), %rdi
movq 0x40(%rsp), %r15
leaq (%r15,%rbx), %rsi
addq $-0x1a, %rsi
leaq 0x1(%r14), %rdx
movl $0xa, %ecx
callq 0xee8d4
movq 0x18(%r13), %rdi
leaq 0xd(%r14), %rsi
callq 0xeead3
movl %eax, %ebp
movq 0x18(%r13), %rdi
leaq (%r15,%rbx), %rsi
addq $-0x10, %rsi
leaq 0xe(%r14), %rdx
movl $0xc, %ecx
callq 0xee8d4
movq 0x18(%r13), %rdi
leaq (%r15,%rbx), %rsi
addq $-0x4, %rsi
movq 0x38(%rsp), %rbx
addq $0x1c, %r14
movl $0x4, %ecx
movq %r14, %rdx
callq 0xee8d4
movzbl %bpl, %r14d
movq 0x28(%rsp), %rbp
movq %r13, %rdi
leaq 0xc5a39(%rip), %rsi     # 0x1228ee
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8617
testb $0x40, %bl
jne 0x5cedf
cmpb 0x3(%rbp), %r14b
je 0x5cedf
movq %r13, %rdi
leaq 0xc5a3f(%rip), %rsi     # 0x122913
xorl %eax, %eax
callq 0xe8617
movb $0x0, (%rbp)
movb %r14b, 0x3(%rbp)
jmp 0x5cdb8
movq $0x0, 0x30(%rsp)
jmp 0x5cef8
movq %rax, 0x30(%rsp)
movq %r13, %rdi
callq 0xf6410
movq %rax, 0x40(%r12)
movq %rax, %rdi
movq 0x40(%rsp), %rsi
movq 0x30(%rsp), %rdx
xorl %ecx, %ecx
movl $0x3, %r8d
callq 0xf6cdd
movq 0x40(%r12), %rdi
callq 0xf70f6
movq %r13, %rdi
leaq 0xc5a25(%rip), %rsi     # 0x122958
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movb $0x0, (%rbp)
cmpq $0xe5, %rbx
movq %rbx, 0x38(%rsp)
jne 0x5cf69
movq %r13, %rdi
leaq 0xc58de(%rip), %rsi     # 0x122837
xorl %eax, %eax
callq 0xe8617
movb $0x3f, %al
movq 0x10(%rsp), %rbx
jmp 0x5cf75
movb $-0x1b, %al
cmpl $0x5, %ebx
movq 0x10(%rsp), %rbx
jne 0x5cf79
movb %al, (%r12)
xorl %eax, %eax
cmpb $0x0, (%r12,%rax)
je 0x5cf92
incq %rax
cmpq $0x8, %rax
jne 0x5cf7b
movl $0x8, %eax
jmp 0x5cf97
testq %rax, %rax
je 0x5cfac
cmpb $0x20, -0x1(%r12,%rax)
jne 0x5cfae
leaq -0x1(%rax), %rcx
cmpq $0x1, %rax
movq %rcx, %rax
jg 0x5cf97
xorl %eax, %eax
movq %rax, 0x18(%r12)
xorl %ecx, %ecx
cmpb $0x0, 0x8(%r12,%rcx)
je 0x5cfcd
incq %rcx
cmpq $0x3, %rcx
jne 0x5cfb5
movl $0x3, %ecx
jmp 0x5cfd2
testq %rcx, %rcx
je 0x5cfe7
cmpb $0x20, 0x7(%r12,%rcx)
jne 0x5cfe9
leaq -0x1(%rcx), %rdx
cmpq $0x1, %rcx
movq %rdx, %rcx
jg 0x5cfd2
xorl %ecx, %ecx
movq %rcx, 0x20(%r12)
testq %rax, %rax
jle 0x5d008
cmpb $0x0, 0xb(%r12)
je 0x5d008
cmpb $0x2e, (%r12)
jne 0x5d008
movb $0x1, 0xd(%r12)
movq %r13, %rdi
callq 0xf6410
movq %rax, 0x38(%r12)
cmpb $0x0, 0xc(%r12)
je 0x5d03c
cmpq $0x0, 0x20(%r12)
jle 0x5d058
movl (%rbx), %r8d
movl $0x8, %edx
movq %rax, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xf6cdd
jmp 0x5d08c
movq 0x18(%r12), %rdx
testq %rdx, %rdx
jle 0x5d068
movl (%rbx), %r8d
movq %rax, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xf6cdd
jmp 0x5d075
movq 0x18(%r12), %rdx
movl (%rbx), %r8d
movq %rax, %rdi
movq %r12, %rsi
jmp 0x5d09c
movq %rax, %rdi
movl $0x5f, %esi
callq 0xf6542
cmpq $0x0, 0x20(%r12)
jle 0x5d0a3
movq 0x38(%r12), %rdi
movl $0x2e, %esi
callq 0xf6542
movq 0x20(%r12), %rdx
movq 0x38(%r12), %rdi
movl (%rbx), %r8d
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xf6cdd
movq 0x38(%r12), %rdi
callq 0xf70f6
movq %r13, %rdi
leaq 0xdec97(%rip), %rsi     # 0x13bd4e
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x40(%r12), %rdi
callq 0xf67a3
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movq 0x80(%rbx), %rdi
movq 0x38(%r12,%rcx,8), %rsi
callq 0xf72a4
cmpl $0x0, 0xf0(%rsp)
jne 0x5d11c
cmpb $0x1f, 0x14(%rbx)
ja 0x5d11c
movq 0x18(%r13), %rdi
leaq 0x14(%r14), %rsi
callq 0xeebc8
movl %eax, 0x14(%r12)
testl %eax, %eax
je 0x5d11c
movq %r13, %rdi
leaq 0xc572e(%rip), %rsi     # 0x122841
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r13), %rdi
leaq 0x16(%r14), %rsi
callq 0xeebc8
movq %rax, %rbp
movq 0x18(%r13), %rdi
leaq 0x18(%r14), %rsi
callq 0xeebc8
movq %r12, %rbx
addq $0x48, %rbx
movq %rbx, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0xea92a
movl $0x40, %edx
movq %rbx, %rdi
leaq 0x70(%rsp), %rbx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xeaf46
movq %r13, %rdi
leaq 0xec213(%rip), %rsi     # 0x149382
leaq 0xd0ede(%rip), %rdx     # 0x12e054
movq %rbx, %rcx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r13), %rdi
leaq 0x1a(%r14), %rsi
callq 0xeebc8
movq %rax, 0x30(%r12)
movq %r13, %rdi
leaq 0xc56bd(%rip), %rsi     # 0x122859
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r13), %rdi
addq $0x1c, %r14
movq %r14, %rsi
callq 0xeed61
movq %rax, 0x28(%r12)
movq %r13, %rdi
leaq 0xb9539(%rip), %rsi     # 0x1166fe
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
cmpb $0x0, 0xc(%r12)
je 0x5d1e0
movq $0x0, 0x28(%r12)
movq 0x38(%rsp), %rbx
cmpb $-0x1b, %bl
movq 0x28(%rsp), %rbp
je 0x5d26b
cmpl $0x0, 0xf0(%rsp)
je 0x5d2cb
cmpb $0x0, 0xb(%r12)
jne 0x5d25a
cmpb $0x0, 0xd(%r12)
jne 0x5d25a
testb $0x4, 0x10(%r12)
je 0x5d25a
cmpq $0x7, 0x18(%r12)
jne 0x5d25a
cmpq $0x3, 0x20(%r12)
jne 0x5d25a
movl (%r12), %eax
movl $0x44204145, %ecx       # imm = 0x44204145
xorl %ecx, %eax
movl 0x3(%r12), %ecx
movl $0x41544144, %edx       # imm = 0x41544144
xorl %edx, %ecx
orl %eax, %ecx
jne 0x5d25a
movzwl (%r15), %eax
xorl $0x5320, %eax           # imm = 0x5320
movzbl 0x2(%r15), %ecx
xorl $0x46, %ecx
orw %ax, %cx
je 0x5d4f2
movq %r13, %rdi
leaq 0xc5614(%rip), %rsi     # 0x122878
xorl %eax, %eax
callq 0xe87e4
movq 0x20(%rsp), %rdi
callq 0xf6753
movq 0x38(%r12), %rdi
callq 0xf6753
movq 0x40(%r12), %rdi
callq 0xf6753
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rdi
callq 0xf7267
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
testl %ebx, %ebx
je 0x5d507
incq 0x8(%rbp)
movq 0x68(%rsp), %rbx
incq %rbx
cmpq 0x58(%rsp), %rbx
jne 0x5cb2a
jmp 0x5d50b
cmpl $0x0, 0x14(%r12)
je 0x5d372
movq 0x10(%rsp), %rax
cmpq $0x0, 0xa8(%rax)
je 0x5d372
movl $0x70, %esi
movq %r13, %rdi
callq 0xe8b2b
movq %rax, %r14
movq %rbx, %r15
movq 0x10(%rsp), %rbx
movl (%rbx), %eax
movl %eax, 0xc(%r14)
movl $0x1, 0x8(%r14)
movl 0x14(%r12), %eax
movl %eax, 0x10(%r14)
movq %r13, %rdi
leaq 0xc5661(%rip), %rsi     # 0x122984
xorl %eax, %eax
callq 0xe8617
movq %r13, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0xa8(%rbx), %rcx
movq %r15, %rbx
movq 0x18(%rcx), %r9
movq %r13, %rdi
leaq 0xc5656(%rip), %rsi     # 0x1229a5
movq %r14, %rdx
xorl %r8d, %r8d
callq 0xe9aa3
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %r13, %rdi
movq %r14, %rsi
callq 0xe8be2
cmpb $0x0, 0xb(%r12)
movb 0xd(%r12), %al
je 0x5d3c1
testb %al, %al
jne 0x5d26b
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x5d5ac
movq %r13, %rdi
leaq 0x70(%rsp), %rsi
callq 0xe8a1c
cmpl $0xf, 0x50(%rsp)
jl 0x5d3de
movq %r13, %rdi
leaq 0xb6d97(%rip), %rsi     # 0x11414c
xorl %eax, %eax
callq 0xe9295
jmp 0x5d4e1
testb %al, %al
jne 0x5d26b
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x5d5ac
jmp 0x5d26b
movl $0x220, %esi            # imm = 0x220
movq %r13, %rdi
callq 0xe8b2b
movq %rax, 0x18(%rsp)
movq 0x30(%r12), %r15
cmpq $0x2, %r15
jl 0x5d4b9
movq 0x10(%rsp), %rax
cmpq %r15, 0x78(%rax)
jle 0x5d4b9
leaq -0x2(%r15), %rdx
movq 0x10(%rsp), %rbx
imulq 0x28(%rbx), %rdx
addq 0x40(%rbx), %rdx
movq %r13, %rdi
leaq 0xc55c7(%rip), %rsi     # 0x1229f1
xorl %eax, %eax
callq 0xe8617
movq %r13, %rdi
movl $0x1, %esi
callq 0xe8a15
cmpq %r15, 0x78(%rbx)
jle 0x5d4ca
leaq -0x2(%r15), %r14
imulq 0x28(%rbx), %r14
addq 0x40(%rbx), %r14
movq %r13, %rdi
leaq 0xc55a9(%rip), %rsi     # 0x122a08
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0xe8617
movq 0x98(%rbx), %rax
cmpb $0x0, (%rax,%r15)
jne 0x5d4ca
movb $0x1, (%rax,%r15)
movq 0x28(%rbx), %r8
movl $0x0, (%rsp)
movq %r13, %rdi
movq %rbx, %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rcx
movl 0x4c(%rsp), %r9d
callq 0x5cab5
testl %eax, %eax
je 0x5d4ca
movq 0x90(%rbx), %rax
movl (%rax,%r15,4), %r15d
cmpq $0x1, %r15
ja 0x5d43e
jmp 0x5d4ca
movq %r13, %rdi
leaq 0xc5517(%rip), %rsi     # 0x1229da
xorl %eax, %eax
callq 0xe9295
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
movq 0x38(%rsp), %rbx
je 0x5d4e1
movq %r13, %rdi
callq 0xe8be2
movl 0x70(%rsp), %esi
movq %r13, %rdi
callq 0xe8a25
jmp 0x5d26b
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x5d522
jmp 0x5d26b
xorl %eax, %eax
jmp 0x5d510
movl $0x1, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq