	.file	"extr_udf.c_grub_udf_iterate_dir.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"."
.LC1:
	.string	"invalid fid tag"
.LC2:
	.string	".."
	.text
	.p2align 4
	.type	grub_udf_iterate_dir, @function
grub_udf_iterate_dir:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	mov	r14, rdx
	push	r13
	push	r12
	push	rbx
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, rdi
	mov	edi, 4
	sub	rsp, 104
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	call	grub_malloc@PLT
	test	rax, rax
	je	.L5
	mov	r12, rax
	mov	edx, 4
	mov	rsi, rbx
	mov	rdi, rax
	call	grub_memcpy@PLT
	mov	rcx, r14
	mov	rax, QWORD PTR -96[rbp]
	mov	rdx, r12
	mov	esi, DWORD PTR GRUB_FSHELP_DIR[rip]
	lea	rdi, .LC0[rip]
	xor	r13d, r13d
	call	rax
	lea	rcx, -80[rbp]
	mov	DWORD PTR -108[rbp], eax
	mov	QWORD PTR -88[rbp], rcx
	test	eax, eax
	je	.L4
.L8:
	mov	DWORD PTR -108[rbp], 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L62:
	mov	esi, DWORD PTR GRUB_FSHELP_DIR[rip]
	mov	rax, QWORD PTR -96[rbp]
	mov	rcx, r14
	mov	rdx, r12
	lea	rdi, .LC2[rip]
	call	rax
	test	eax, eax
	jne	.L8
.L9:
	add	r15d, DWORD PTR -76[rbp]
	mov	r13d, r15d
	add	r13d, 3
	and	r13d, -4
.L4:
	mov	edi, DWORD PTR 4[rbx]
	call	U64@PLT
	cmp	r13d, eax
	jge	.L60
	sub	rsp, 8
	push	QWORD PTR -88[rbp]
	xor	esi, esi
	mov	rdi, rbx
	mov	r9d, 20
	mov	r8d, r13d
	xor	ecx, ecx
	xor	edx, edx
	call	grub_udf_read_file@PLT
	pop	rsi
	pop	rdi
	cmp	eax, 20
	jne	.L5
	mov	edi, DWORD PTR -64[rbp]
	call	U16@PLT
	cmp	rax, QWORD PTR GRUB_UDF_TAG_IDENT_FID[rip]
	jne	.L61
	mov	edi, 4
	call	grub_malloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L5
	mov	edi, DWORD PTR [rbx]
	lea	rsi, -68[rbp]
	mov	rdx, rax
	call	grub_udf_read_icb@PLT
	test	rax, rax
	jne	.L5
	mov	edi, DWORD PTR -72[rbp]
	call	U16@PLT
	lea	r15d, 20[r13+rax]
	mov	eax, DWORD PTR -80[rbp]
	mov	esi, eax
	and	esi, DWORD PTR GRUB_UDF_FID_CHAR_PARENT[rip]
	mov	DWORD PTR -104[rbp], esi
	jne	.L62
	movsx	rdx, DWORD PTR -76[rbp]
	mov	rdi, rsp
	mov	r10, rsp
	mov	r9, rdx
	sal	rdx, 2
	lea	rcx, 15[rdx]
	mov	rsi, rcx
	and	rcx, -4096
	sub	rdi, rcx
	and	rsi, -16
	mov	rcx, rdi
	cmp	rsp, rcx
	je	.L11
.L63:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rcx
	jne	.L63
.L11:
	and	esi, 4095
	sub	rsp, rsi
	test	rsi, rsi
	jne	.L64
.L12:
	lea	r13, 3[rsp]
	add	rdx, 11
	mov	rdi, rsp
	mov	rcx, r13
	and	r13, -4
	shr	rcx, 2
	mov	QWORD PTR -120[rbp], rcx
	mov	rcx, rdx
	and	rdx, -4096
	sub	rdi, rdx
	and	rcx, -16
	mov	rdx, rdi
	cmp	rsp, rdx
	je	.L14
.L65:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rdx
	jne	.L65
.L14:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	je	.L15
	or	QWORD PTR -8[rsp+rcx], 0
.L15:
	lea	edx, [r9+r9]
	mov	rsi, rsp
	mov	r11, rsp
	movsx	rdx, edx
	lea	rdx, 15[0+rdx*4]
	mov	rcx, rdx
	and	rdx, -4096
	sub	rsi, rdx
	and	rcx, -16
	mov	rdx, rsi
	cmp	rsp, rdx
	je	.L17
.L66:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rdx
	jne	.L66
.L17:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	je	.L18
	or	QWORD PTR -8[rsp+rcx], 0
.L18:
	test	DWORD PTR GRUB_UDF_FID_CHAR_DIRECTORY[rip], eax
	mov	QWORD PTR -128[rbp], r11
	mov	r8d, r15d
	mov	rdi, rbx
	mov	eax, DWORD PTR GRUB_FSHELP_DIR[rip]
	cmove	eax, DWORD PTR GRUB_FSHELP_REG[rip]
	xor	ecx, ecx
	mov	QWORD PTR -136[rbp], rsp
	sub	rsp, 8
	mov	QWORD PTR -144[rbp], r10
	xor	edx, edx
	xor	esi, esi
	mov	DWORD PTR -112[rbp], eax
	push	r13
	call	grub_udf_read_file@PLT
	cmp	eax, DWORD PTR -76[rbp]
	pop	rdx
	mov	r10, QWORD PTR -144[rbp]
	pop	rcx
	jne	.L21
	mov	rcx, QWORD PTR -120[rbp]
	mov	r11, QWORD PTR -128[rbp]
	mov	edx, DWORD PTR 0[0+rcx*4]
	cmp	edx, 8
	je	.L67
	cmp	edx, 16
	je	.L25
.L28:
	mov	rsp, r10
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	mov	DWORD PTR -108[rbp], 0
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L68
	mov	eax, DWORD PTR -108[rbp]
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L64:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rsi], 0
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L60:
	mov	rdi, r12
	call	grub_free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L61:
	mov	edi, DWORD PTR GRUB_ERR_BAD_FS[rip]
	lea	rsi, .LC1[rip]
	call	grub_error@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L67:
	mov	r9d, eax
	sub	r9d, 1
	je	.L26
	lea	ecx, -2[rax]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edx, DWORD PTR 4[r13+rax*4]
	mov	DWORD PTR [r11+rax*4], edx
	mov	rdx, rax
	add	rax, 1
	cmp	rcx, rdx
	jne	.L24
.L26:
	mov	r13, QWORD PTR -136[rbp]
	mov	edx, r9d
	mov	rsi, r11
	mov	QWORD PTR -104[rbp], r10
	mov	rdi, r13
	call	grub_utf16_to_utf8@PLT
	mov	esi, DWORD PTR -112[rbp]
	mov	rcx, r14
	mov	rdx, r12
	mov	BYTE PTR [rax], 0
	mov	rdi, r13
	mov	rax, QWORD PTR -96[rbp]
	call	rax
	mov	r10, QWORD PTR -104[rbp]
	test	eax, eax
	je	.L28
	mov	DWORD PTR -104[rbp], 1
.L21:
	mov	eax, DWORD PTR -104[rbp]
	mov	rsp, r10
	mov	DWORD PTR -108[rbp], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	sub	eax, 1
	mov	r9d, eax
	shr	r9d, 31
	add	r9d, eax
	sar	r9d
	je	.L26
	lea	eax, -1[r9]
	mov	rcx, r11
	mov	edx, 2
	lea	rsi, 4[r11+rax*4]
	.p2align 4,,10
	.p2align 3
.L27:
	lea	eax, -1[rdx]
	mov	edi, edx
	add	rcx, 4
	add	edx, 2
	mov	eax, DWORD PTR 0[r13+rax*4]
	sal	eax, 8
	or	eax, DWORD PTR 0[r13+rdi*4]
	mov	DWORD PTR -4[rcx], eax
	cmp	rsi, rcx
	jne	.L27
	jmp	.L26
.L68:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	grub_udf_iterate_dir, .-grub_udf_iterate_dir
	.comm	GRUB_UDF_TAG_IDENT_FID,8,8
	.comm	GRUB_UDF_FID_CHAR_PARENT,4,4
	.comm	GRUB_UDF_FID_CHAR_DIRECTORY,4,4
	.comm	GRUB_FSHELP_REG,4,4
	.comm	GRUB_FSHELP_DIR,4,4
	.comm	GRUB_ERR_BAD_FS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_udf.c_grub_udf_iterate_dir.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	".\000"
	.align	2
.LC1:
	.ascii	"invalid fid tag\000"
	.align	2
.LC2:
	.ascii	"..\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	grub_udf_iterate_dir, %function
grub_udf_iterate_dir:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #76
	ldr	r3, .L45
	str	r1, [fp, #-64]
	mov	r6, r0
	mov	r0, #4
	mov	r9, r2
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	grub_malloc
	subs	r5, r0, #0
	beq	.L5
	mov	r2, #4
	mov	r1, r6
	bl	grub_memcpy
	ldr	r3, .L45+4
	mov	r2, r5
	ldr	r1, [r3]
	ldr	r0, .L45+8
	mov	r3, r9
	ldr	ip, [fp, #-64]
	blx	ip
	subs	r3, r0, #0
	str	r3, [fp, #-72]
	bne	.L8
	ldr	r4, [fp, #-72]
	ldr	r10, .L45+12
	ldr	r8, .L45+16
	str	r9, [fp, #-80]
	b	.L4
.L42:
	ldr	r1, .L45+4
	mov	r2, r5
	ldr	r3, [fp, #-80]
	ldr	r1, [r1]
	ldr	r0, .L45+20
	ldr	ip, [fp, #-64]
	blx	ip
	cmp	r0, #0
	bne	.L8
.L9:
	ldr	r0, [fp, #-56]
	add	r4, r4, r0
	add	r4, r4, #3
	bic	r4, r4, #3
.L4:
	ldr	r0, [r6, #4]
	bl	U64
	cmp	r4, r0
	bge	.L40
	mov	r3, #0
	mov	r2, #20
	sub	r1, fp, #60
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	mov	r1, r3
	mov	r2, r3
	mov	r0, r6
	str	r4, [sp]
	bl	grub_udf_read_file
	cmp	r0, #20
	bne	.L5
	ldr	r0, [fp, #-44]
	bl	U16
	ldr	r3, [r10]
	cmp	r0, r3
	bne	.L41
	mov	r0, #4
	bl	grub_malloc
	subs	r5, r0, #0
	beq	.L5
	mov	r2, r5
	ldr	r0, [r6]
	sub	r1, fp, #48
	bl	grub_udf_read_icb
	cmp	r0, #0
	bne	.L5
	ldr	r0, [fp, #-52]
	bl	U16
	ldr	r3, [fp, #-60]
	ldr	r2, [r8]
	add	r4, r4, #20
	ands	r2, r3, r2
	str	r2, [fp, #-68]
	add	r4, r4, r0
	bne	.L42
	ldr	r1, [fp, #-56]
	mov	r7, sp
	lsl	r2, r1, #2
	add	r0, r2, #7
	bic	r0, r0, #7
	sub	sp, sp, r0
	ldr	r0, .L45+24
	bic	r2, r2, #7
	ldr	r0, [r0]
	add	r9, sp, #16
	sub	sp, sp, r2
	tst	r3, r0
	mov	r3, sp
	sub	r3, r3, r1, lsl #3
	add	r2, sp, #16
	mov	sp, r3
	add	r3, sp, #16
	str	r3, [fp, #-88]
	ldrne	r3, .L45+4
	ldreq	r3, .L45+28
	str	r2, [fp, #-76]
	ldr	r3, [r3]
	mov	r0, r6
	str	r3, [fp, #-84]
	mov	r3, #0
	stmib	sp, {r1, r9}
	mov	r2, r3
	mov	r1, r3
	str	r4, [sp]
	bl	grub_udf_read_file
	ldr	r3, [fp, #-56]
	cmp	r0, r3
	bne	.L37
	ldr	r3, [r9]
	cmp	r3, #8
	beq	.L43
	cmp	r3, #16
	beq	.L16
.L19:
	mov	sp, r7
	b	.L9
.L5:
	mov	r3, #0
	str	r3, [fp, #-72]
.L1:
	ldr	r3, .L45
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L44
	ldr	r0, [fp, #-72]
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	mov	r3, #1
	str	r3, [fp, #-72]
	b	.L1
.L16:
	sub	r2, r0, #1
	add	r2, r2, r2, lsr #31
	asrs	r2, r2, #1
	beq	.L17
	mov	r3, #0
	ldr	r1, [fp, #-76]
	add	ip, r9, #4
	sub	r0, r1, #4
.L18:
	ldr	lr, [ip, r3, lsl #3]
	add	r3, r3, #1
	ldr	r1, [r9, r3, lsl #3]
	cmp	r3, r2
	orr	r1, r1, lr, lsl #8
	str	r1, [r0, #4]!
	bne	.L18
.L17:
	ldr	r9, [fp, #-88]
	ldr	r1, [fp, #-76]
	mov	r0, r9
	bl	grub_utf16_to_utf8
	mov	r2, #0
	mov	r3, r0
	ldr	r1, [fp, #-84]
	strb	r2, [r3]
	mov	r0, r9
	mov	r2, r5
	ldr	r3, [fp, #-80]
	ldr	ip, [fp, #-64]
	blx	ip
	cmp	r0, #0
	beq	.L19
	mov	r3, #1
	mov	r2, r7
	str	r3, [fp, #-68]
.L12:
	ldr	r3, [fp, #-68]
	mov	sp, r2
	str	r3, [fp, #-72]
	b	.L1
.L43:
	subs	r2, r0, #1
	beq	.L17
	mov	r3, #0
	ldr	r1, [fp, #-76]
	sub	r1, r1, #4
.L15:
	ldr	r0, [r9, #4]!
	add	r3, r3, #1
	cmp	r2, r3
	str	r0, [r1, #4]!
	bne	.L15
	b	.L17
.L40:
	mov	r0, r5
	bl	grub_free
	b	.L1
.L41:
	ldr	r3, .L45+32
	ldr	r1, .L45+36
	ldr	r0, [r3]
	bl	grub_error
	b	.L1
.L37:
	mov	r2, r7
	b	.L12
.L44:
	bl	__stack_chk_fail
.L46:
	.align	2
.L45:
	.word	.LC3
	.word	GRUB_FSHELP_DIR
	.word	.LC0
	.word	GRUB_UDF_TAG_IDENT_FID
	.word	GRUB_UDF_FID_CHAR_PARENT
	.word	.LC2
	.word	GRUB_UDF_FID_CHAR_DIRECTORY
	.word	GRUB_FSHELP_REG
	.word	GRUB_ERR_BAD_FS
	.word	.LC1
	.size	grub_udf_iterate_dir, .-grub_udf_iterate_dir
	.comm	GRUB_UDF_TAG_IDENT_FID,4,4
	.comm	GRUB_UDF_FID_CHAR_PARENT,4,4
	.comm	GRUB_UDF_FID_CHAR_DIRECTORY,4,4
	.comm	GRUB_FSHELP_REG,4,4
	.comm	GRUB_FSHELP_DIR,4,4
	.comm	GRUB_ERR_BAD_FS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
