	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_hfs_open
_grub_hfs_open:                         ## @grub_hfs_open
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	$0, -48(%rbp)
	movq	_my_mod@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_grub_dl_ref
	movq	24(%r14), %rax
	movl	(%rax), %edi
	callq	_grub_hfs_mount
	movq	%rax, %rbx
	leaq	-64(%rbp), %rdx
	movq	%rax, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_grub_hfs_find_dir
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_grub_free
	jmp	LBB0_2
LBB0_3:
	movq	-64(%rbp), %rax
	movq	_GRUB_HFS_FILETYPE_FILE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movl	16(%rbx), %edi
	movl	-48(%rbp), %esi
	movl	$4, %edx
	callq	_grub_memcpy
	movl	-52(%rbp), %edi
	callq	_grub_be_to_cpu32
	movq	%rax, 16(%r14)
	movl	-52(%rbp), %edi
	callq	_grub_be_to_cpu32
	movq	%rax, 8(%rbx)
	movl	-56(%rbp), %edi
	callq	_grub_be_to_cpu32
	movq	%rax, (%rbx)
	movq	$0, 8(%r14)
	movq	%rbx, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	callq	_grub_free
	movq	_GRUB_ERR_BAD_FILE_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
LBB0_2:
	movl	(%r12), %edi
	callq	_grub_dl_unref
	movq	_grub_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_my_mod,4,2                     ## @my_mod
	.comm	_grub_errno,4,2                 ## @grub_errno
	.comm	_GRUB_HFS_FILETYPE_FILE,8,3     ## @GRUB_HFS_FILETYPE_FILE
	.comm	_GRUB_ERR_BAD_FILE_TYPE,4,2     ## @GRUB_ERR_BAD_FILE_TYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not a file"

	.no_dead_strip	_grub_hfs_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_hfs_open
_grub_hfs_open:                         ; @grub_hfs_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x19, x0
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp, #24]
Lloh0:
	adrp	x22, _my_mod@GOTPAGE
Lloh1:
	ldr	x22, [x22, _my_mod@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_grub_dl_ref
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	bl	_grub_hfs_mount
	mov	x20, x0
	add	x2, sp, #8
	mov	x1, x21
	mov	w3, #0
	bl	_grub_hfs_find_dir
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_grub_free
	b	LBB0_5
LBB0_2:
	ldr	x8, [sp, #8]
Lloh2:
	adrp	x9, _GRUB_HFS_FILETYPE_FILE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GRUB_HFS_FILETYPE_FILE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x20, #16]
	ldr	w1, [sp, #24]
	mov	w2, #4
	bl	_grub_memcpy
	ldr	w0, [sp, #20]
	bl	_grub_be_to_cpu32
	str	x0, [x19, #16]
	ldr	w0, [sp, #20]
	bl	_grub_be_to_cpu32
	str	x0, [x20, #8]
	ldr	w0, [sp, #16]
	bl	_grub_be_to_cpu32
	mov	x8, x0
	mov	w0, #0
	str	x8, [x20]
	stp	x20, xzr, [x19]
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	bl	_grub_free
Lloh5:
	adrp	x8, _GRUB_ERR_BAD_FILE_TYPE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GRUB_ERR_BAD_FILE_TYPE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
LBB0_5:
	ldr	w0, [x22]
	bl	_grub_dl_unref
Lloh10:
	adrp	x8, _grub_errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _grub_errno@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_my_mod,4,2                     ; @my_mod
	.comm	_grub_errno,4,2                 ; @grub_errno
	.comm	_GRUB_HFS_FILETYPE_FILE,8,3     ; @GRUB_HFS_FILETYPE_FILE
	.comm	_GRUB_ERR_BAD_FILE_TYPE,4,2     ; @GRUB_ERR_BAD_FILE_TYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not a file"

	.no_dead_strip	_grub_hfs_open
.subsections_via_symbols
