	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_affs_iterate_dir
_grub_affs_iterate_dir:                 ## @grub_affs_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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	movq	%rsi, -136(%rbp)
	movq	%rdx, -96(%rbp)
	movq	$0, -128(%rbp)
	movq	%r14, -104(%rbp)
	leaq	-80(%rbp), %rax
	movq	%rax, -112(%rbp)
	movl	(%r14), %edi
	shll	$2, %edi
	callq	_grub_malloc
	movq	%rax, -120(%rbp)
	movl	$1, %r15d
	testq	%rax, %rax
	je	LBB0_24
## %bb.1:
	movq	%rax, %r13
	movl	(%r14), %ecx
	movl	8(%r14), %edi
	movq	8(%rbx), %rsi
	movq	_GRUB_AFFS_HASHTABLE_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	shll	$2, %ecx
	movq	%r13, %r8
	callq	_grub_disk_read
	movq	_grub_errno@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_3
## %bb.2:
	xorl	%edi, %edi
LBB0_22:
	callq	_grub_free
LBB0_23:
	movq	%r13, %rdi
	callq	_grub_free
	xorl	%r15d, %r15d
	jmp	LBB0_24
LBB0_3:
	movq	(%rbx), %rdx
	movq	8(%rbx), %rsi
	movq	_GRUB_FSHELP_DIR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rdi
	leaq	-136(%rbp), %r8
	callq	_grub_affs_create_node
	testq	%rax, %rax
	jne	LBB0_24
## %bb.4:
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	jne	LBB0_6
## %bb.5:
	movq	8(%rbx), %rsi
LBB0_6:
	movq	(%rbx), %rdx
	movq	_GRUB_FSHELP_DIR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rdi
	leaq	-136(%rbp), %r8
	callq	_grub_affs_create_node
	testq	%rax, %rax
	je	LBB0_7
LBB0_24:
	movl	%r15d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	cmpl	$0, (%r14)
	jle	LBB0_23
## %bb.8:
	xorl	%ecx, %ecx
	jmp	LBB0_9
LBB0_20:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movslq	(%r14), %rax
	cmpq	%rax, %rcx
	jge	LBB0_23
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	(%r13,%rcx,4), %edi
	testl	%edi, %edi
	je	LBB0_20
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	callq	_grub_be_to_cpu32
	testq	%rax, %rax
	je	LBB0_20
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %rbx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	8(%r14), %edi
	movslq	4(%r14), %rax
	leaq	(%rbx,%rax), %rsi
	decq	%rsi
	movq	_GRUB_DISK_SECTOR_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rdx
	imulq	%rax, %rdx
	movq	_GRUB_AFFS_FILE_LOCATION@GOTPCREL(%rip), %rax
	subq	(%rax), %rdx
	movl	$32, %ecx
	leaq	-80(%rbp), %r8
	callq	_grub_disk_read
	cmpq	$0, (%r12)
	jne	LBB0_21
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	-80(%rbp), %rax
	movq	-72(%rbp), %rcx
	movb	$0, (%rax,%rcx)
	movl	-56(%rbp), %edi
	callq	_grub_be_to_cpu32
	movq	_GRUB_FSHELP_REG@GOTPCREL(%rip), %rcx
	movq	_GRUB_AFFS_FILETYPE_DIR@GOTPCREL(%rip), %rdx
	cmpl	%eax, (%rdx)
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	-56(%rbp), %edi
	callq	_grub_be_to_cpu32
	movq	_GRUB_FSHELP_DIR@GOTPCREL(%rip), %rcx
	movq	_GRUB_AFFS_FILETYPE_REG@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	-56(%rbp), %edi
	callq	_grub_be_to_cpu32
	movq	_GRUB_FSHELP_UNKNOWN@GOTPCREL(%rip), %rcx
	movq	_GRUB_AFFS_FILETYPE_SYMLINK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	_GRUB_FSHELP_SYMLINK@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=2
	movl	(%rcx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	-80(%rbp), %r15
	movl	-60(%rbp), %edi
	callq	_grub_be_to_cpu32
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	leaq	-136(%rbp), %r8
	callq	_grub_affs_create_node
	testq	%rax, %rax
	jne	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	-64(%rbp), %edi
	callq	_grub_be_to_cpu32
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_12
	jmp	LBB0_20
LBB0_21:
	movq	-128(%rbp), %rdi
	jmp	LBB0_22
LBB0_18:
	movl	$1, %r15d
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_AFFS_HASHTABLE_OFFSET,8,3 ## @GRUB_AFFS_HASHTABLE_OFFSET
	.comm	_grub_errno,8,3                 ## @grub_errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

	.comm	_GRUB_FSHELP_DIR,4,2            ## @GRUB_FSHELP_DIR
L_.str.1:                               ## @.str.1
	.asciz	".."

	.comm	_GRUB_DISK_SECTOR_SIZE,4,2      ## @GRUB_DISK_SECTOR_SIZE
	.comm	_GRUB_AFFS_FILE_LOCATION,8,3    ## @GRUB_AFFS_FILE_LOCATION
	.comm	_GRUB_AFFS_FILETYPE_DIR,4,2     ## @GRUB_AFFS_FILETYPE_DIR
	.comm	_GRUB_FSHELP_REG,4,2            ## @GRUB_FSHELP_REG
	.comm	_GRUB_AFFS_FILETYPE_REG,8,3     ## @GRUB_AFFS_FILETYPE_REG
	.comm	_GRUB_AFFS_FILETYPE_SYMLINK,8,3 ## @GRUB_AFFS_FILETYPE_SYMLINK
	.comm	_GRUB_FSHELP_SYMLINK,4,2        ## @GRUB_FSHELP_SYMLINK
	.comm	_GRUB_FSHELP_UNKNOWN,4,2        ## @GRUB_FSHELP_UNKNOWN
	.no_dead_strip	_grub_affs_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_affs_iterate_dir
_grub_affs_iterate_dir:                 ; @grub_affs_iterate_dir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	mov	x20, x0
	ldr	x23, [x0, #24]
	stp	x23, x2, [sp, #32]
	stp	x1, xzr, [sp]
	add	x8, sp, #48
	str	x8, [sp, #24]
	ldr	w8, [x23]
	lsl	w0, w8, #2
	bl	_grub_malloc
	str	x0, [sp, #16]
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	w0, [x23, #8]
	ldr	x1, [x20, #8]
Lloh0:
	adrp	x8, _GRUB_AFFS_HASHTABLE_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GRUB_AFFS_HASHTABLE_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	x2, [x8]
	ldr	w8, [x23]
	lsl	w3, w8, #2
	mov	x4, x19
	bl	_grub_disk_read
Lloh3:
	adrp	x24, _grub_errno@GOTPAGE
Lloh4:
	ldr	x24, [x24, _grub_errno@GOTPAGEOFF]
	ldr	x8, [x24]
	cbz	x8, LBB0_5
; %bb.2:
	mov	x0, #0
LBB0_3:
	bl	_grub_free
LBB0_4:
	mov	x0, x19
	bl	_grub_free
	mov	w0, #0
	b	LBB0_10
LBB0_5:
	ldp	x2, x1, [x20]
Lloh5:
	adrp	x21, _GRUB_FSHELP_DIR@GOTPAGE
Lloh6:
	ldr	x21, [x21, _GRUB_FSHELP_DIR@GOTPAGEOFF]
	ldr	w3, [x21]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x4, sp
	bl	_grub_affs_create_node
	cbnz	x0, LBB0_9
; %bb.6:
	ldr	x1, [x20, #16]
	cbnz	x1, LBB0_8
; %bb.7:
	ldr	x1, [x20, #8]
LBB0_8:
	ldr	x2, [x20]
	ldr	w3, [x21]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x4, sp
	bl	_grub_affs_create_node
	cbz	x0, LBB0_11
LBB0_9:
	mov	w0, #1
LBB0_10:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_11:
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.12:
	mov	x25, #0
Lloh11:
	adrp	x26, _GRUB_DISK_SECTOR_SIZE@GOTPAGE
Lloh12:
	ldr	x26, [x26, _GRUB_DISK_SECTOR_SIZE@GOTPAGEOFF]
Lloh13:
	adrp	x27, _GRUB_AFFS_FILE_LOCATION@GOTPAGE
Lloh14:
	ldr	x27, [x27, _GRUB_AFFS_FILE_LOCATION@GOTPAGEOFF]
Lloh15:
	adrp	x28, _GRUB_FSHELP_REG@GOTPAGE
Lloh16:
	ldr	x28, [x28, _GRUB_FSHELP_REG@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x23]
	cmp	x25, x8
	b.ge	LBB0_4
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
	ldr	w0, [x19, x25, lsl #2]
	cbz	w0, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	bl	_grub_be_to_cpu32
	cbz	x0, LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x20, x0
LBB0_17:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	w8, w0, [x23, #4]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	x9, x20, x8
	sub	x1, x9, #1
	ldrsw	x9, [x26]
	ldr	x10, [x27]
	neg	x10, x10
	madd	x2, x9, x8, x10
	add	x4, sp, #48
	mov	w3, #32
	bl	_grub_disk_read
	ldr	x8, [x24]
	cbnz	x8, LBB0_23
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=2
	ldp	x8, x9, [sp, #48]
	strb	wzr, [x8, x9]
	ldr	w0, [sp, #72]
	bl	_grub_be_to_cpu32
Lloh17:
	adrp	x8, _GRUB_AFFS_FILETYPE_DIR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GRUB_AFFS_FILETYPE_DIR@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x8]
	mov	x8, x28
	cmp	w9, w0
	b.eq	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=2
	ldr	w0, [sp, #72]
	bl	_grub_be_to_cpu32
Lloh20:
	adrp	x8, _GRUB_AFFS_FILETYPE_REG@GOTPAGE
Lloh21:
	ldr	x8, [x8, _GRUB_AFFS_FILETYPE_REG@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x8]
Lloh23:
	adrp	x8, _GRUB_FSHELP_DIR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _GRUB_FSHELP_DIR@GOTPAGEOFF]
	cmp	x0, x9
	b.eq	LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=2
	ldr	w0, [sp, #72]
	bl	_grub_be_to_cpu32
Lloh25:
	adrp	x8, _GRUB_AFFS_FILETYPE_SYMLINK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _GRUB_AFFS_FILETYPE_SYMLINK@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	cmp	x0, x8
Lloh28:
	adrp	x8, _GRUB_FSHELP_UNKNOWN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GRUB_FSHELP_UNKNOWN@GOTPAGEOFF]
Lloh30:
	adrp	x9, _GRUB_FSHELP_SYMLINK@GOTPAGE
Lloh31:
	ldr	x9, [x9, _GRUB_FSHELP_SYMLINK@GOTPAGEOFF]
	csel	x8, x9, x8, eq
LBB0_21:                                ;   in Loop: Header=BB0_17 Depth=2
	ldr	w21, [x8]
	ldr	x22, [sp, #48]
	ldr	w0, [sp, #68]
	bl	_grub_be_to_cpu32
	mov	x2, x0
	mov	x4, sp
	mov	x0, x22
	mov	x1, x20
	mov	x3, x21
	bl	_grub_affs_create_node
	cbnz	x0, LBB0_9
; %bb.22:                               ;   in Loop: Header=BB0_17 Depth=2
	ldr	w0, [sp, #64]
	bl	_grub_be_to_cpu32
	mov	x20, x0
	cbnz	x0, LBB0_17
	b	LBB0_13
LBB0_23:
	ldr	x0, [sp, #8]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_AFFS_HASHTABLE_OFFSET,8,3 ; @GRUB_AFFS_HASHTABLE_OFFSET
	.comm	_grub_errno,8,3                 ; @grub_errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

	.comm	_GRUB_FSHELP_DIR,4,2            ; @GRUB_FSHELP_DIR
l_.str.1:                               ; @.str.1
	.asciz	".."

	.comm	_GRUB_DISK_SECTOR_SIZE,4,2      ; @GRUB_DISK_SECTOR_SIZE
	.comm	_GRUB_AFFS_FILE_LOCATION,8,3    ; @GRUB_AFFS_FILE_LOCATION
	.comm	_GRUB_AFFS_FILETYPE_DIR,4,2     ; @GRUB_AFFS_FILETYPE_DIR
	.comm	_GRUB_FSHELP_REG,4,2            ; @GRUB_FSHELP_REG
	.comm	_GRUB_AFFS_FILETYPE_REG,8,3     ; @GRUB_AFFS_FILETYPE_REG
	.comm	_GRUB_AFFS_FILETYPE_SYMLINK,8,3 ; @GRUB_AFFS_FILETYPE_SYMLINK
	.comm	_GRUB_FSHELP_SYMLINK,4,2        ; @GRUB_FSHELP_SYMLINK
	.comm	_GRUB_FSHELP_UNKNOWN,4,2        ; @GRUB_FSHELP_UNKNOWN
	.no_dead_strip	_grub_affs_iterate_dir
.subsections_via_symbols
