	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_hfs_dir
_grub_hfs_dir:                          ## @grub_hfs_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	_my_mod@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_grub_dl_ref
	movl	(%rbx), %edi
	callq	_grub_hfs_mount
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	leaq	-64(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_grub_hfs_find_dir
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	movq	-64(%rbp), %rax
	movq	_GRUB_HFS_FILETYPE_DIR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movq	%r15, -80(%rbp)
	movq	%r14, -72(%rbp)
	movl	(%rbx), %esi
	movl	-44(%rbp), %edx
	movq	_grub_hfs_dir_hook@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-80(%rbp), %r8
	movq	%rbx, %rdi
	callq	_grub_hfs_iterate_dir
	jmp	LBB0_5
LBB0_3:
	movq	_GRUB_ERR_BAD_FILE_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
LBB0_5:
	movq	%rbx, %rdi
	callq	_grub_free
	movl	(%r13), %edi
	callq	_grub_dl_unref
	movq	_grub_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$40, %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_HFS_FILETYPE_DIR,8,3      ## @GRUB_HFS_FILETYPE_DIR
	.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_hfs_dir_hook,4,2          ## @grub_hfs_dir_hook
	.comm	_grub_errno,4,2                 ## @grub_errno
	.no_dead_strip	_grub_hfs_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_hfs_dir
_grub_hfs_dir:                          ; @grub_hfs_dir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	stp	xzr, xzr, [sp, #24]
Lloh0:
	adrp	x23, _my_mod@GOTPAGE
Lloh1:
	ldr	x23, [x23, _my_mod@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_grub_dl_ref
	ldr	w0, [x19]
	bl	_grub_hfs_mount
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.1:
	add	x2, sp, #24
	add	x3, sp, #44
	mov	x0, x19
	mov	x1, x22
	bl	_grub_hfs_find_dir
	cbnz	x0, LBB0_5
; %bb.2:
	ldr	x8, [sp, #24]
Lloh2:
	adrp	x9, _GRUB_HFS_FILETYPE_DIR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GRUB_HFS_FILETYPE_DIR@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	stp	x21, x20, [sp, #8]
	ldr	w1, [x19]
	ldr	w2, [sp, #44]
Lloh5:
	adrp	x8, _grub_hfs_dir_hook@GOTPAGE
Lloh6:
	ldr	x8, [x8, _grub_hfs_dir_hook@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	add	x4, sp, #8
	mov	x0, x19
	bl	_grub_hfs_iterate_dir
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _GRUB_ERR_BAD_FILE_TYPE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GRUB_ERR_BAD_FILE_TYPE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
LBB0_5:
	mov	x0, x19
	bl	_grub_free
	ldr	w0, [x23]
	bl	_grub_dl_unref
Lloh13:
	adrp	x8, _grub_errno@GOTPAGE
Lloh14:
	ldr	x8, [x8, _grub_errno@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_my_mod,4,2                     ; @my_mod
	.comm	_GRUB_HFS_FILETYPE_DIR,8,3      ; @GRUB_HFS_FILETYPE_DIR
	.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_hfs_dir_hook,4,2          ; @grub_hfs_dir_hook
	.comm	_grub_errno,4,2                 ; @grub_errno
	.no_dead_strip	_grub_hfs_dir
.subsections_via_symbols
