	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_fat_label
_grub_fat_label:                        ## @grub_fat_label
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	(%rdi), %r15d
	movq	_my_mod@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_grub_dl_ref
	movl	%r15d, %edi
	callq	_grub_fat_mount
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_GRUB_FAT_ATTR_DIRECTORY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
## %bb.3:
	movq	$0, (%r14)
	movq	_grub_fat_label_hook@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movq	%rbx, %rsi
	movq	%r14, %rcx
	callq	_grub_fat_iterate_dir
LBB0_4:
	movl	(%r12), %edi
	callq	_grub_dl_unref
	movq	%rbx, %rdi
	callq	_grub_free
	movq	_grub_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_2:
	movq	_GRUB_ERR_BAD_FILE_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_my_mod,4,2                     ## @my_mod
	.comm	_GRUB_FAT_ATTR_DIRECTORY,4,2    ## @GRUB_FAT_ATTR_DIRECTORY
	.comm	_GRUB_ERR_BAD_FILE_TYPE,4,2     ## @GRUB_ERR_BAD_FILE_TYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not a directory"

	.comm	_grub_fat_label_hook,4,2        ## @grub_fat_label_hook
	.comm	_grub_errno,4,2                 ## @grub_errno
	.no_dead_strip	_grub_fat_label
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_fat_label
_grub_fat_label:                        ; @grub_fat_label
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldr	w21, [x0]
Lloh0:
	adrp	x22, _my_mod@GOTPAGE
Lloh1:
	ldr	x22, [x22, _my_mod@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_grub_dl_ref
	mov	x0, x21
	bl	_grub_fat_mount
	mov	x20, x0
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _GRUB_FAT_ATTR_DIRECTORY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GRUB_FAT_ATTR_DIRECTORY@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	str	xzr, [x19]
Lloh5:
	adrp	x8, _grub_fat_label_hook@GOTPAGE
Lloh6:
	ldr	x8, [x8, _grub_fat_label_hook@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	bl	_grub_fat_iterate_dir
LBB0_3:
	ldr	w0, [x22]
	bl	_grub_dl_unref
	mov	x0, x20
	bl	_grub_free
Lloh8:
	adrp	x8, _grub_errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _grub_errno@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _GRUB_ERR_BAD_FILE_TYPE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GRUB_ERR_BAD_FILE_TYPE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_my_mod,4,2                     ; @my_mod
	.comm	_GRUB_FAT_ATTR_DIRECTORY,4,2    ; @GRUB_FAT_ATTR_DIRECTORY
	.comm	_GRUB_ERR_BAD_FILE_TYPE,4,2     ; @GRUB_ERR_BAD_FILE_TYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not a directory"

	.comm	_grub_fat_label_hook,4,2        ; @grub_fat_label_hook
	.comm	_grub_errno,4,2                 ; @grub_errno
	.no_dead_strip	_grub_fat_label
.subsections_via_symbols
