	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_fat_dir
_grub_fat_dir:                          ## @grub_fat_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movl	(%rdi), %r13d
	movq	_my_mod@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_grub_dl_ref
	movl	%r13d, %edi
	callq	_grub_fat_mount
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_grub_strlen
	movl	%eax, %ebx
	leal	2(%rbx), %edi
	callq	_grub_malloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_grub_memcpy
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movslq	%ebx, %rax
	addq	%rcx, %rax
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.3:
	decl	%ebx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpb	$47, (%rdx,%rbx)
	je	LBB0_5
## %bb.4:
	movb	$47, (%rax)
	incq	%rax
LBB0_5:
	movb	$0, (%rax)
	movq	_grub_errno@GOTPCREL(%rip), %rbx
	movq	_GRUB_ERR_NONE@GOTPCREL(%rip), %r14
	movq	%rcx, %rax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	movq	%r12, %rsi
	movq	%rax, %rdx
	movq	%r15, %rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	callq	_grub_fat_find_dir
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r14), %rcx
	cmpq	%rcx, (%rbx)
	je	LBB0_6
LBB0_8:
	movq	_my_mod@GOTPCREL(%rip), %r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_10:
	xorl	%edi, %edi
LBB0_11:
	callq	_grub_free
	movq	%r12, %rdi
	callq	_grub_free
	movl	(%r14), %edi
	callq	_grub_dl_unref
	movq	_grub_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_my_mod,4,2                     ## @my_mod
	.comm	_grub_errno,8,3                 ## @grub_errno
	.comm	_GRUB_ERR_NONE,8,3              ## @GRUB_ERR_NONE
	.no_dead_strip	_grub_fat_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_fat_dir
_grub_fat_dir:                          ; @grub_fat_dir
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x3
	mov	x21, x2
	mov	x24, x1
	ldr	w22, [x0]
Lloh0:
	adrp	x26, _my_mod@GOTPAGE
Lloh1:
	ldr	x26, [x26, _my_mod@GOTPAGEOFF]
	ldr	w0, [x26]
	bl	_grub_dl_ref
	mov	x0, x22
	bl	_grub_fat_mount
	mov	x19, x0
Lloh2:
	adrp	x27, _grub_errno@GOTPAGE
Lloh3:
	ldr	x27, [x27, _grub_errno@GOTPAGEOFF]
	cbz	x0, LBB0_8
; %bb.1:
	mov	x0, x24
	bl	_grub_strlen
	mov	x25, x0
	add	w0, w0, #2
	bl	_grub_malloc
	mov	x23, x0
	cbz	x0, LBB0_9
; %bb.2:
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	bl	_grub_memcpy
	add	x8, x23, w25, sxtw
	subs	w9, w25, #1
	b.lt	LBB0_5
; %bb.3:
	ldrb	w9, [x24, w9, uxtw]
	cmp	w9, #47
	b.eq	LBB0_5
; %bb.4:
	mov	w9, #47
	strb	w9, [x8], #1
LBB0_5:
	strb	wzr, [x8]
Lloh4:
	adrp	x24, _GRUB_ERR_NONE@GOTPAGE
Lloh5:
	ldr	x24, [x24, _GRUB_ERR_NONE@GOTPAGEOFF]
	mov	x2, x23
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x19
	mov	x3, x21
	mov	x4, x20
	bl	_grub_fat_find_dir
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x2, x0
	ldr	x8, [x27]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_6
	b	LBB0_9
LBB0_8:
	mov	x23, #0
LBB0_9:
	mov	x0, x23
	bl	_grub_free
	mov	x0, x19
	bl	_grub_free
	ldr	w0, [x26]
	bl	_grub_dl_unref
	ldr	x0, [x27]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_my_mod,4,2                     ; @my_mod
	.comm	_grub_errno,8,3                 ; @grub_errno
	.comm	_GRUB_ERR_NONE,8,3              ; @GRUB_ERR_NONE
	.no_dead_strip	_grub_fat_dir
.subsections_via_symbols
