	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_minix_open
_grub_minix_open:                       ## @grub_minix_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	16(%rdi), %rax
	movl	(%rax), %edi
	callq	_grub_minix_mount
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_GRUB_MINIX_ROOT_INODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_grub_minix_read_inode
	movq	_grub_errno@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_4
LBB0_3:
	movq	%rbx, %rdi
	callq	_grub_free
	jmp	LBB0_9
LBB0_1:
	movq	_grub_errno@GOTPCREL(%rip), %r12
	jmp	LBB0_9
LBB0_4:
	testq	%r15, %r15
	je	LBB0_6
## %bb.5:
	cmpb	$47, (%r15)
	jne	LBB0_6
## %bb.7:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_grub_minix_find_file
	movq	_grub_errno@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	jne	LBB0_3
## %bb.8:
	movq	%rbx, 8(%r14)
	movq	%rbx, %rdi
	callq	_GRUB_MINIX_INODE_SIZE
	movl	%eax, (%r14)
	movq	_GRUB_ERR_NONE@GOTPCREL(%rip), %r12
	jmp	LBB0_9
LBB0_6:
	movq	_GRUB_ERR_BAD_FILENAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
LBB0_9:
	movq	(%r12), %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_grub_errno,8,3                 ## @grub_errno
	.comm	_GRUB_MINIX_ROOT_INODE,4,2      ## @GRUB_MINIX_ROOT_INODE
	.comm	_GRUB_ERR_BAD_FILENAME,4,2      ## @GRUB_ERR_BAD_FILENAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad filename"

	.comm	_GRUB_ERR_NONE,8,3              ## @GRUB_ERR_NONE
	.no_dead_strip	_grub_minix_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_minix_open
_grub_minix_open:                       ; @grub_minix_open
	.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	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w0, [x8]
	bl	_grub_minix_mount
Lloh0:
	adrp	x22, _grub_errno@GOTPAGE
Lloh1:
	ldr	x22, [x22, _grub_errno@GOTPAGEOFF]
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
Lloh2:
	adrp	x8, _GRUB_MINIX_ROOT_INODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GRUB_MINIX_ROOT_INODE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_grub_minix_read_inode
	ldr	x8, [x22]
	cbz	x8, LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_grub_free
	b	LBB0_8
LBB0_3:
	cbz	x21, LBB0_7
; %bb.4:
	ldrb	w8, [x21]
	cmp	w8, #47
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x20
	mov	x1, x21
	bl	_grub_minix_find_file
	ldr	x8, [x22]
	cbnz	x8, LBB0_2
; %bb.6:
	str	x20, [x19, #8]
	mov	x0, x20
	bl	_GRUB_MINIX_INODE_SIZE
	str	w0, [x19]
Lloh5:
	adrp	x22, _GRUB_ERR_NONE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _GRUB_ERR_NONE@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh7:
	adrp	x8, _GRUB_ERR_BAD_FILENAME@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GRUB_ERR_BAD_FILENAME@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
LBB0_8:
Lloh12:
	adrp	x22, _grub_errno@GOTPAGE
Lloh13:
	ldr	x22, [x22, _grub_errno@GOTPAGEOFF]
LBB0_9:
	ldr	x0, [x22]
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_grub_errno,8,3                 ; @grub_errno
	.comm	_GRUB_MINIX_ROOT_INODE,4,2      ; @GRUB_MINIX_ROOT_INODE
	.comm	_GRUB_ERR_BAD_FILENAME,4,2      ; @GRUB_ERR_BAD_FILENAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad filename"

	.comm	_GRUB_ERR_NONE,8,3              ; @GRUB_ERR_NONE
	.no_dead_strip	_grub_minix_open
.subsections_via_symbols
