	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_sfs_iterate_dir
_grub_sfs_iterate_dir:                  ## @grub_sfs_iterate_dir
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rbx
	movl	(%rdi), %r14d
	movl	(%rbx), %edi
	callq	_grub_malloc
	movq	%rax, %rdi
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	testl	%r14d, %r14d
	je	LBB0_16
## %bb.2:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rdi), %edi
	callq	_grub_be_to_cpu32
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_16
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	(%rbx), %ecx
	movl	4(%rbx), %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	callq	_grub_disk_read
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	_grub_errno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_16
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rdi), %r13
	subq	%rdi, %r13
	movslq	%r13d, %r12
	leaq	24(%r12), %rax
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	%edi, -56(%rbp)                 ## 4-byte Spill
	xorl	%ecx, %ecx
	cmpl	%eax, %edi
	sete	%cl
	movl	8(%r12,%rcx,4), %edi
	callq	_grub_be_to_cpu32
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	4(%r12), %edi
	callq	_grub_be_to_cpu32
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rsp)
	movq	%r15, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	callq	_grub_sfs_create_node
	testq	%rax, %rax
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jne	LBB0_13
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=2
	addl	%ebx, %r13d
	addl	%r14d, %r13d
	addl	$25, %r13d
	andl	$-2, %r13d
	movslq	%r13d, %r12
	leaq	24(%r12), %rax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%rbx), %rcx
	cmpq	%rcx, %rax
	jae	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	16(%rdi,%r12), %r15
	movq	%r15, %rdi
	callq	_grub_strlen
	movl	%eax, %ebx
	cltq
	leaq	(%r15,%rax), %rdi
	incq	%rdi
	callq	_grub_strlen
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_grub_strlen
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	addq	%rdi, %r12
	movl	(%r12), %edx
	movq	_GRUB_SFS_TYPE_DELETED@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	jne	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	_GRUB_SFS_TYPE_SYMLINK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	%edx, %ecx
	movq	_GRUB_FSHELP_DIR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edi
	movq	_GRUB_SFS_TYPE_DIR@GOTPCREL(%rip), %rsi
	andl	(%rsi), %edx
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	_GRUB_FSHELP_REG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	testl	%ecx, %ecx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=2
	movq	_GRUB_FSHELP_SYMLINK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	jmp	LBB0_12
LBB0_16:
	callq	_grub_free
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_13:
	callq	_grub_free
	movl	$1, %eax
LBB0_17:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_grub_errno,8,3                 ## @grub_errno
	.comm	_GRUB_SFS_TYPE_DELETED,4,2      ## @GRUB_SFS_TYPE_DELETED
	.comm	_GRUB_SFS_TYPE_SYMLINK,4,2      ## @GRUB_SFS_TYPE_SYMLINK
	.comm	_GRUB_FSHELP_SYMLINK,4,2        ## @GRUB_FSHELP_SYMLINK
	.comm	_GRUB_SFS_TYPE_DIR,4,2          ## @GRUB_SFS_TYPE_DIR
	.comm	_GRUB_FSHELP_DIR,4,2            ## @GRUB_FSHELP_DIR
	.comm	_GRUB_FSHELP_REG,4,2            ## @GRUB_FSHELP_REG
	.no_dead_strip	_grub_sfs_iterate_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_sfs_iterate_dir
_grub_sfs_iterate_dir:                  ; @grub_sfs_iterate_dir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	stp	x1, x2, [sp]                    ; 16-byte Folded Spill
	ldr	x21, [x0, #8]
	ldr	w23, [x0]
	ldr	w0, [x21]
	bl	_grub_malloc
	mov	x22, x0
	cmp	x0, #0
	ccmp	w23, #0, #4, ne
	b.ne	LBB0_2
LBB0_1:
	mov	x0, x22
	bl	_grub_free
	mov	w0, #0
	b	LBB0_12
LBB0_2:
Lloh0:
	adrp	x28, _GRUB_SFS_TYPE_DELETED@GOTPAGE
Lloh1:
	ldr	x28, [x28, _GRUB_SFS_TYPE_DELETED@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x22]
	bl	_grub_be_to_cpu32
	mov	x23, x0
	cbz	w0, LBB0_1
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldp	w3, w0, [x21]
	mov	x1, x23
	mov	w2, #0
	mov	x4, x22
	bl	_grub_disk_read
Lloh2:
	adrp	x8, _grub_errno@GOTPAGE
Lloh3:
	ldr	x8, [x8, _grub_errno@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbnz	x8, LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x22, #8]
	sub	x19, x8, x22
	sxtw	x8, w19
	add	x9, x8, #24
	ldrsw	x10, [x21]
	cmp	x9, x10
	b.hs	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	w8, w19, w23
	add	w8, w8, w24
	add	w8, w8, #25
	and	w19, w8, #0xfffffffe
	sxtw	x8, w19
	add	x9, x8, #24
	ldrsw	x10, [x21]
	cmp	x9, x10
	b.hs	LBB0_3
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x20, x22, x8
	ldr	x25, [x20, #16]
	mov	x0, x25
	bl	_grub_strlen
	mov	x23, x0
	add	x8, x25, w0, sxtw
	add	x0, x8, #1
	bl	_grub_strlen
	mov	x24, x0
	mov	x0, x25
	bl	_grub_strlen
	cbz	w0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	w8, [x20]
	ldr	w9, [x28]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
Lloh5:
	adrp	x9, _GRUB_SFS_TYPE_SYMLINK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GRUB_SFS_TYPE_SYMLINK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _GRUB_SFS_TYPE_DIR@GOTPAGE
Lloh9:
	ldr	x10, [x10, _GRUB_SFS_TYPE_DIR@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x11, _GRUB_FSHELP_REG@GOTPAGE
Lloh12:
	ldr	x11, [x11, _GRUB_FSHELP_REG@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
Lloh14:
	adrp	x12, _GRUB_FSHELP_DIR@GOTPAGE
Lloh15:
	ldr	x12, [x12, _GRUB_FSHELP_DIR@GOTPAGEOFF]
Lloh16:
	ldr	w12, [x12]
	tst	w10, w8
	csel	w10, w11, w12, eq
Lloh17:
	adrp	x11, _GRUB_FSHELP_SYMLINK@GOTPAGE
Lloh18:
	ldr	x11, [x11, _GRUB_FSHELP_SYMLINK@GOTPAGEOFF]
Lloh19:
	ldr	w11, [x11]
	tst	w9, w8
	csel	w26, w10, w11, eq
	add	x8, x20, #4
	cmp	w26, w12
	mov	w9, #4
	mov	w10, #8
	csel	x9, x10, x9, eq
	ldr	w0, [x8, x9]
	bl	_grub_be_to_cpu32
	mov	x27, x0
	ldr	w0, [x20, #4]
	bl	_grub_be_to_cpu32
	mov	x2, x0
	mov	x0, x25
	mov	x1, x27
	mov	x3, x26
	mov	x4, x21
	ldp	x5, x6, [sp]                    ; 16-byte Folded Reload
	bl	_grub_sfs_create_node
	cbz	x0, LBB0_7
; %bb.11:
	mov	x0, x22
	bl	_grub_free
	mov	w0, #1
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_grub_errno,8,3                 ; @grub_errno
	.comm	_GRUB_SFS_TYPE_DELETED,4,2      ; @GRUB_SFS_TYPE_DELETED
	.comm	_GRUB_SFS_TYPE_SYMLINK,4,2      ; @GRUB_SFS_TYPE_SYMLINK
	.comm	_GRUB_FSHELP_SYMLINK,4,2        ; @GRUB_FSHELP_SYMLINK
	.comm	_GRUB_SFS_TYPE_DIR,4,2          ; @GRUB_SFS_TYPE_DIR
	.comm	_GRUB_FSHELP_DIR,4,2            ; @GRUB_FSHELP_DIR
	.comm	_GRUB_FSHELP_REG,4,2            ; @GRUB_FSHELP_REG
	.no_dead_strip	_grub_sfs_iterate_dir
.subsections_via_symbols
