// File: /workspace/github_c_makefile_star2_O1/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 $0xa8, %rsp
movl %r9d, %r14d
movq %r8, %rbx
movq %rcx, 0x50(%rsp)
movq %rdx, %r15
movq %rsi, 0x10(%rsp)
movq %rdi, %r13
leaq 0x1f(%r8), %rdx
testq %r8, %r8
cmovnsq %r8, %rdx
sarq $0x5, %rdx
leaq 0xe6255(%rip), %rsi     # 0x142f28
movq %rdx, 0x48(%rsp)
xorl %eax, %eax
callq 0xe9226
movl $0x1, %eax
cmpq $0x20, %rbx
jl 0x5d6d9
leaq 0x18(%r15), %rax
movq %rax, 0x30(%rsp)
movq %r14, 0x40(%rsp)
leal 0x1(%r14), %eax
movl %eax, 0x3c(%rsp)
xorl %eax, %eax
movq %r15, 0x28(%rsp)
movq %rax, 0x58(%rsp)
movq %rax, %rbx
shlq $0x5, %rbx
movq 0x50(%rsp), %rbp
leaq (%rbx,%rbp), %r14
movl $0x58, %esi
movq %r13, %rdi
callq 0xe969b
movq %rax, %r12
movq %r13, %rdi
leaq 0xe6493(%rip), %rsi     # 0x1431cd
movq %r14, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%r13), %rdi
movl $0x8, %ecx
movq %r12, %rsi
movq %r14, %rdx
callq 0xeeee8
movq 0x18(%r13), %rdi
leaq 0x8(%r12), %r15
leaq (%rbx,%rbp), %rdx
addq $0x8, %rdx
movl $0x3, %ecx
movq %r15, %rsi
callq 0xeeee8
movzbl (%r12), %ebp
testl %ebp, %ebp
je 0x5ce29
movq %rbp, 0x8(%rsp)
movq 0x18(%r13), %rdi
leaq 0xb(%r14), %rsi
callq 0xef0d5
movzbl %al, %eax
movl %eax, 0x10(%r12)
movq %r13, %rdi
callq 0xf6870
movq %rax, %rbx
movl 0x10(%r12), %esi
movq %r13, %rdi
movq %rax, %rdx
movl $0x1, %ecx
callq 0xeb03c
movl 0x10(%r12), %ebp
movq %rbx, 0x20(%rsp)
movq %rbx, %rdi
callq 0xf7557
movq %r13, %rdi
leaq 0xe6606(%rip), %rsi     # 0x1433ec
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movl 0x10(%r12), %eax
movl %eax, %ecx
andl $0x3f, %ecx
cmpl $0xf, %ecx
jne 0x5ce46
movq 0x8(%rsp), %rbp
cmpl $0xe5, %ebp
movq 0x28(%rsp), %rbx
movq %r13, %rdi
jne 0x5ce6e
leaq 0xc5870(%rip), %rsi     # 0x12268d
xorl %eax, %eax
callq 0xe9226
jmp 0x5cf88
movq %r13, %rdi
leaq 0xc57d0(%rip), %rsi     # 0x122603
xorl %eax, %eax
callq 0xe9226
xorl %edi, %edi
movq 0x28(%rsp), %rbx
jmp 0x5cf90
shrl $0x3, %eax
andl $0x3, %eax
leaq 0xc5365(%rip), %rcx     # 0x1221b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq 0x28(%rsp), %rbx
movq 0x8(%rsp), %rbp
jmpq *%rax
movb $0x1, 0xc(%r12)
jmp 0x5ceb0
leaq 0xc582d(%rip), %rsi     # 0x1226a2
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
movl %ebp, %r15d
andl $-0x41, %r15d
leal -0x15(%r15), %eax
cmpb $-0x15, %al
ja 0x5cfae
movq %r13, %rdi
leaq 0xc581a(%rip), %rsi     # 0x1226b5
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9b27
jmp 0x5cf88
movb $0x1, 0xb(%r12)
cmpb $0x0, (%rbx)
je 0x5d0f8
cmpb $0x1, 0x2(%rbx)
jne 0x5d0f5
cmpq $0x0, 0x40(%r12)
jne 0x5d0f5
xorl %eax, %eax
xorl %ecx, %ecx
rorb %al
addb (%r12,%rcx), %al
incq %rcx
cmpq $0x8, %rcx
jne 0x5ced3
movq $-0x3, %rcx
rorb %al
addb 0x3(%r15,%rcx), %al
incq %rcx
jne 0x5cee9
movzbl %al, %ebp
movq %r13, %rdi
leaq 0xc5827(%rip), %rsi     # 0x122729
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
cmpb 0x3(%rbx), %bpl
movq 0x8(%rsp), %rbp
jne 0x5d0f5
movzbl 0x1(%rbx), %eax
cmpq $0x14, %rax
ja 0x5d0f5
testb %al, %al
je 0x5d0ab
leaq (%rax,%rax,2), %rcx
leaq (%rax,%rcx,4), %rax
xorl %ebp, %ebp
movzbl 0x18(%rbx,%rbp,2), %ecx
cmpl $0xff, %ecx
je 0x5cf57
testl %ecx, %ecx
jne 0x5cf5e
cmpb $0x0, 0x19(%rbx,%rbp,2)
je 0x5cf69
cmpb $-0x1, %cl
jne 0x5cf5e
cmpb $-0x1, 0x19(%rbx,%rbp,2)
je 0x5cf69
incq %rbp
cmpq %rbp, %rax
jne 0x5cf3a
movq %rax, %rbp
addq %rbp, %rbp
jmp 0x5d0ad
movq %r13, %rdi
leaq 0xc569c(%rip), %rsi     # 0x122617
xorl %eax, %eax
callq 0xe9b27
movb $0x1, 0xd(%r12)
movb $0x0, (%rbx)
movq 0x20(%rsp), %rdi
callq 0xf6bb0
movq 0x38(%r12), %rdi
callq 0xf6bb0
movq 0x40(%r12), %rdi
callq 0xf6bb0
jmp 0x5d685
testb $0x40, %bpl
jne 0x5cfd4
cmpb $0x0, (%rbx)
je 0x5cfc5
leal 0x1(%r15), %eax
movzbl 0x2(%rbx), %ecx
cmpl %ecx, %eax
je 0x5cfec
movq %r13, %rdi
leaq 0xc5704(%rip), %rsi     # 0x1226d3
jmp 0x5ce1d
movl $0x208, %edx            # imm = 0x208
movq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x18140
movb %r15b, 0x1(%rbx)
movb $0x1, (%rbx)
movb %r15b, 0x2(%rbx)
leaq (%r15,%r15,4), %rax
leaq (%rax,%rax,4), %rbx
addq %r15, %rbx
movq 0x18(%r13), %rdi
movq 0x30(%rsp), %r15
leaq (%r15,%rbx), %rsi
addq $-0x1a, %rsi
leaq 0x1(%r14), %rdx
movl $0xa, %ecx
callq 0xeeee8
movq 0x18(%r13), %rdi
leaq 0xd(%r14), %rsi
callq 0xef0d5
movl %eax, %ebp
movq 0x18(%r13), %rdi
leaq (%r15,%rbx), %rsi
addq $-0x10, %rsi
leaq 0xe(%r14), %rdx
movl $0xc, %ecx
callq 0xeeee8
movq 0x18(%r13), %rdi
leaq (%r15,%rbx), %rsi
addq $-0x4, %rsi
movq 0x28(%rsp), %rbx
addq $0x1c, %r14
movl $0x4, %ecx
movq %r14, %rdx
callq 0xeeee8
movzbl %bpl, %ebp
movq %r13, %rdi
leaq 0xc5673(%rip), %rsi     # 0x1226e6
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
testb $0x40, 0x8(%rsp)
jne 0x5d09d
cmpb 0x3(%rbx), %bpl
je 0x5d09d
movq %r13, %rdi
leaq 0xc5678(%rip), %rsi     # 0x12270b
xorl %eax, %eax
callq 0xe9226
movb $0x0, (%rbx)
movb %bpl, 0x3(%rbx)
movq 0x8(%rsp), %rbp
jmp 0x5cf8b
xorl %ebp, %ebp
movq %r13, %rdi
callq 0xf6870
movq %rax, 0x40(%r12)
movq %rax, %rdi
movq 0x30(%rsp), %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
movl $0x3, %r8d
callq 0xf7131
movq 0x40(%r12), %rdi
callq 0xf7557
movq %r13, %rdi
leaq 0xc566a(%rip), %rsi     # 0x122750
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x8(%rsp), %rbp
movb $0x0, (%rbx)
cmpq $0xe5, %rbp
jne 0x5d11b
movq %r13, %rdi
leaq 0xc5524(%rip), %rsi     # 0x12262f
xorl %eax, %eax
callq 0xe9226
movb $0x3f, %al
movq 0x10(%rsp), %rbx
jmp 0x5d127
movb $-0x1b, %al
cmpl $0x5, %ebp
movq 0x10(%rsp), %rbx
jne 0x5d12b
movb %al, (%r12)
xorl %eax, %eax
cmpb $0x0, (%r12,%rax)
je 0x5d142
incq %rax
cmpq $0x8, %rax
jne 0x5d12d
movl $0x8, %eax
testq %rax, %rax
je 0x5d15c
cmpb $0x20, -0x1(%r12,%rax)
jne 0x5d15e
leaq -0x1(%rax), %rcx
cmpq $0x1, %rax
movq %rcx, %rax
jg 0x5d147
xorl %eax, %eax
movq %rax, 0x18(%r12)
xorl %ecx, %ecx
cmpb $0x0, 0x8(%r12,%rcx)
je 0x5d17b
incq %rcx
cmpq $0x3, %rcx
jne 0x5d165
movl $0x3, %ecx
testq %rcx, %rcx
je 0x5d195
cmpb $0x20, 0x7(%r12,%rcx)
jne 0x5d197
leaq -0x1(%rcx), %rdx
cmpq $0x1, %rcx
movq %rdx, %rcx
jg 0x5d180
xorl %ecx, %ecx
movq %rcx, 0x20(%r12)
testq %rax, %rax
jle 0x5d1b6
cmpb $0x0, 0xb(%r12)
je 0x5d1b6
cmpb $0x2e, (%r12)
jne 0x5d1b6
movb $0x1, 0xd(%r12)
movq %r13, %rdi
callq 0xf6870
movq %rax, 0x38(%r12)
cmpb $0x0, 0xc(%r12)
je 0x5d1ea
cmpq $0x0, 0x20(%r12)
jle 0x5d206
movl (%rbx), %r8d
movl $0x8, %edx
movq %rax, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xf7131
jmp 0x5d23a
movq 0x18(%r12), %rdx
testq %rdx, %rdx
jle 0x5d216
movl (%rbx), %r8d
movq %rax, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xf7131
jmp 0x5d223
movq 0x18(%r12), %rdx
movl (%rbx), %r8d
movq %rax, %rdi
movq %r12, %rsi
jmp 0x5d24a
movq %rax, %rdi
movl $0x5f, %esi
callq 0xf69a2
cmpq $0x0, 0x20(%r12)
jle 0x5d251
movq 0x38(%r12), %rdi
movl $0x2e, %esi
callq 0xf69a2
movq 0x20(%r12), %rdx
movq 0x38(%r12), %rdi
movl (%rbx), %r8d
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xf7131
movq 0x38(%r12), %rdi
callq 0xf7557
movq %r13, %rdi
leaq 0xde76f(%rip), %rsi     # 0x13b9d4
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x40(%r12), %rdi
callq 0xf6c00
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movq 0x80(%rbx), %rdi
movq 0x38(%r12,%rcx,8), %rsi
callq 0xf7705
cmpl $0x0, 0xe0(%rsp)
jne 0x5d2ca
cmpb $0x1f, 0x14(%rbx)
ja 0x5d2ca
movq 0x18(%r13), %rdi
leaq 0x14(%r14), %rsi
callq 0xef1ca
movl %eax, 0x14(%r12)
testl %eax, %eax
je 0x5d2ca
movq %r13, %rdi
leaq 0xc5378(%rip), %rsi     # 0x122639
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r13), %rdi
leaq 0x16(%r14), %rsi
callq 0xef1ca
movq %rax, %rbp
movq 0x18(%r13), %rdi
leaq 0x18(%r14), %rsi
callq 0xef1ca
movq %r12, %rbx
addq $0x48, %rbx
movq %rbx, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0xeae33
movl $0x40, %edx
movq %rbx, %rdi
leaq 0x60(%rsp), %rbx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xeb4f8
movq %r13, %rdi
leaq 0xebacd(%rip), %rsi     # 0x148dea
leaq 0xd0a38(%rip), %rdx     # 0x12dd5c
movq %rbx, %rcx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r13), %rdi
leaq 0x1a(%r14), %rsi
callq 0xef1ca
movq %rax, 0x30(%r12)
movq %r13, %rdi
leaq 0xc5307(%rip), %rsi     # 0x122651
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r13), %rdi
addq $0x1c, %r14
movq %r14, %rsi
callq 0xef37e
movq %rax, 0x28(%r12)
movq %r13, %rdi
leaq 0xb92db(%rip), %rsi     # 0x11664e
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
cmpb $0x0, 0xc(%r12)
je 0x5d38e
movq $0x0, 0x28(%r12)
movq 0x8(%rsp), %rbp
cmpb $-0x1b, %bpl
movq 0x28(%rsp), %rbx
je 0x5d656
cmpl $0x0, 0xe0(%rsp)
je 0x5d41f
cmpb $0x0, 0xb(%r12)
jne 0x5d409
cmpb $0x0, 0xd(%r12)
jne 0x5d409
testb $0x4, 0x10(%r12)
je 0x5d409
cmpq $0x7, 0x18(%r12)
jne 0x5d409
cmpq $0x3, 0x20(%r12)
jne 0x5d409
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 0x5d409
movzwl (%r15), %eax
xorl $0x5320, %eax           # imm = 0x5320
movzbl 0x2(%r15), %ecx
xorl $0x46, %ecx
orw %ax, %cx
je 0x5d6be
movq %r13, %rdi
leaq 0xc525d(%rip), %rsi     # 0x122670
xorl %eax, %eax
callq 0xe93cf
jmp 0x5d656
cmpl $0x0, 0x14(%r12)
je 0x5d4c1
movq 0x10(%rsp), %rax
cmpq $0x0, 0xa8(%rax)
je 0x5d4c1
movl $0x70, %esi
movq %r13, %rdi
callq 0xe969b
movq %rax, %r14
movq 0x10(%rsp), %r15
movl (%r15), %eax
movl %eax, 0xc(%r14)
movl $0x1, 0x8(%r14)
movl 0x14(%r12), %eax
movl %eax, 0x10(%r14)
movq %r13, %rdi
leaq 0xc5307(%rip), %rsi     # 0x12277c
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0xa8(%r15), %rcx
movq 0x18(%rcx), %r9
movq %r13, %rdi
leaq 0xc52ff(%rip), %rsi     # 0x12279d
movq %r14, %rdx
xorl %r8d, %r8d
callq 0xea5fa
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %r13, %rdi
movq %r14, %rsi
callq 0xe9752
movb 0xb(%r12), %al
testb %al, %al
je 0x5d509
cmpb $0x0, 0xd(%r12)
jne 0x5d656
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x5d775
movq %r13, %rdi
leaq 0x60(%rsp), %rsi
callq 0xe958c
cmpl $0xe, 0x40(%rsp)
jle 0x5d51a
leaq 0xb6b9b(%rip), %rsi     # 0x11409c
xorl %r14d, %r14d
jmp 0x5d630
cmpb $0x0, 0xd(%r12)
je 0x5d541
testb %al, %al
jne 0x5d4ca
jmp 0x5d656
movl $0x220, %esi            # imm = 0x220
movq %r13, %rdi
callq 0xe969b
movq %rax, %r14
movq 0x30(%r12), %r15
cmpq $0x2, %r15
jge 0x5d556
leaq 0xc5296(%rip), %rsi     # 0x1227d2
jmp 0x5d630
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x5d775
jmp 0x5d656
movq %r14, 0x18(%rsp)
movq 0x10(%rsp), %r14
cmpq %r15, 0x78(%r14)
jle 0x5d624
leaq -0x2(%r15), %rdx
imulq 0x28(%r14), %rdx
addq 0x40(%r14), %rdx
movq %r13, %rdi
leaq 0xc5268(%rip), %rsi     # 0x1227e9
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
movl $0x1, %esi
callq 0xe9585
cmpq %r15, 0x78(%r14)
jle 0x5d6b4
leaq -0x2(%r15), %rbp
imulq 0x28(%r14), %rbp
addq 0x40(%r14), %rbp
movq %r13, %rdi
leaq 0xc524a(%rip), %rsi     # 0x122800
movq %r15, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0xe9226
movq 0x98(%r14), %rax
cmpb $0x0, (%rax,%r15)
jne 0x5d6af
movb $0x1, (%rax,%r15)
movq 0x28(%r14), %r8
movl $0x0, (%rsp)
movq %r13, %rdi
movq %r14, %rsi
movq 0x18(%rsp), %rdx
movq %rbp, %rcx
movl 0x3c(%rsp), %r9d
callq 0x5cc96
testl %eax, %eax
je 0x5d6af
movq 0x90(%r14), %rax
movl (%rax,%r15,4), %r15d
cmpq $0x2, %r15
movq 0x8(%rsp), %rbp
jae 0x5d595
jmp 0x5d6b4
leaq 0xc51a7(%rip), %rsi     # 0x1227d2
movq 0x18(%rsp), %r14
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9df7
testq %r14, %r14
je 0x5d64a
movq %r13, %rdi
movq %r14, %rsi
callq 0xe9752
movl 0x60(%rsp), %esi
movq %r13, %rdi
callq 0xe9595
movq 0x20(%rsp), %rdi
callq 0xf6bb0
movq 0x38(%r12), %rdi
callq 0xf6bb0
movq 0x40(%r12), %rdi
callq 0xf6bb0
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rdi
callq 0xf76c8
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
testl %ebp, %ebp
je 0x5d6d0
incq 0x8(%rbx)
movq 0x58(%rsp), %rax
incq %rax
cmpq 0x48(%rsp), %rax
jne 0x5cd0b
jmp 0x5d6d4
movq 0x8(%rsp), %rbp
movq 0x18(%rsp), %r14
jmp 0x5d63a
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x5d6eb
jmp 0x5d656
xorl %eax, %eax
jmp 0x5d6d9
movl $0x1, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq