	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_minix_find_file
_grub_minix_find_file:                  ## @grub_minix_find_file
	.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	%rsi, %r14
	movq	%rdi, %r13
	movq	%rsi, %rdi
	callq	_grub_strlen
	leal	1(%rax), %edi
	callq	_grub_malloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_grub_strcpy
	cmpb	$47, (%rbx)
	movq	%rbx, %r15
	jne	LBB0_3
## %bb.1:
	cmpb	$0, 1(%rbx)
	je	LBB0_16
## %bb.2:
	movq	%rbx, %r15
	incq	%r15
LBB0_3:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	$47, %esi
	callq	_grub_strchr
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movb	$0, (%rax)
	incq	%r12
	jmp	LBB0_6
LBB0_4:
	xorl	%r12d, %r12d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_6 Depth=1
	addl	(%r13), %r14d
LBB0_24:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	callq	_GRUB_MINIX_INODE_SIZE
	cmpl	%eax, %r14d
	jae	LBB0_25
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	incl	%edi
	callq	_grub_malloc
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_grub_strlen
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	movl	$4, %r8d
	leaq	-52(%rbp), %r9
	callq	_grub_minix_read_file
	testq	%rax, %rax
	js	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	addl	$4, %r14d
	movl	(%r13), %r8d
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	movq	%rbx, %r9
	callq	_grub_minix_read_file
	testq	%rax, %rax
	js	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movslq	(%r13), %rax
	movb	$0, (%rbx,%rax)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_grub_strcmp
	testl	%eax, %eax
	jne	LBB0_23
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	4(%r13), %r14d
	movl	-52(%rbp), %edi
	callq	_grub_le_to_cpu16
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_grub_minix_read_inode
	movq	%r13, %rdi
	callq	_GRUB_MINIX_INODE_MODE
	notl	%eax
	movq	_GRUB_MINIX_IFLNK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_grub_minix_lookup_symlink
	movq	_grub_errno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_9
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	testq	%r12, %r12
	je	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %r15
	movq	%r12, %rdi
	movl	$47, %esi
	callq	_grub_strchr
	testq	%rax, %rax
	je	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %r12
	movb	$0, (%rax)
	incq	%r12
	jmp	LBB0_20
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	xorl	%r12d, %r12d
LBB0_20:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	callq	_GRUB_MINIX_INODE_MODE
	notl	%eax
	movq	_GRUB_MINIX_IFDIR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	callq	_grub_free
	xorl	%r14d, %r14d
	jmp	LBB0_24
LBB0_9:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_grub_free
	movq	%rbx, %rdi
	callq	_grub_free
	jmp	LBB0_26
LBB0_7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_grub_free
	movq	%rbx, %rdi
	callq	_grub_free
	movq	_GRUB_ERR_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_25:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_grub_free
	movq	_GRUB_ERR_FILE_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_grub_error
LBB0_26:
	movq	_grub_errno@GOTPCREL(%rip), %rax
LBB0_27:
	movq	(%rax), %rax
	jmp	LBB0_28
LBB0_15:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_grub_free
LBB0_16:
	movq	%rbx, %rdi
	callq	_grub_free
	xorl	%eax, %eax
LBB0_28:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_grub_free
	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
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_ERR_NONE,8,3              ## @GRUB_ERR_NONE
	.comm	_grub_errno,8,3                 ## @grub_errno
	.comm	_GRUB_MINIX_IFLNK,4,2           ## @GRUB_MINIX_IFLNK
	.comm	_GRUB_MINIX_IFDIR,4,2           ## @GRUB_MINIX_IFDIR
	.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_ERR_FILE_NOT_FOUND,4,2    ## @GRUB_ERR_FILE_NOT_FOUND
L_.str.1:                               ## @.str.1
	.asciz	"file not found"

	.no_dead_strip	_grub_minix_find_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_minix_find_file
_grub_minix_find_file:                  ; @grub_minix_find_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x20, x0
	mov	x0, x1
	bl	_grub_strlen
	add	w0, w0, #1
	bl	_grub_malloc
	mov	x19, x0
	mov	x1, x21
	bl	_grub_strcpy
	ldrb	w8, [x19]
	mov	x23, x19
	cmp	w8, #47
	b.ne	LBB0_2
; %bb.1:
	mov	x23, x19
	ldrb	w8, [x23, #1]!
	cbz	w8, LBB0_19
LBB0_2:
	mov	x0, x23
	mov	w1, #47
	bl	_grub_strchr
	mov	x21, x0
	cbz	x0, LBB0_4
; %bb.3:
	strb	wzr, [x21], #1
LBB0_4:
	mov	w24, #0
Lloh0:
	adrp	x27, _GRUB_MINIX_IFLNK@GOTPAGE
Lloh1:
	ldr	x27, [x27, _GRUB_MINIX_IFLNK@GOTPAGEOFF]
Lloh2:
	adrp	x26, _grub_errno@GOTPAGE
Lloh3:
	ldr	x26, [x26, _grub_errno@GOTPAGEOFF]
Lloh4:
	adrp	x28, _GRUB_MINIX_IFDIR@GOTPAGE
Lloh5:
	ldr	x28, [x28, _GRUB_MINIX_IFDIR@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x20]
	add	w24, w24, w8
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_GRUB_MINIX_INODE_SIZE
	cmp	w24, w0
	b.hs	LBB0_21
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	add	w0, w8, #1
	bl	_grub_malloc
	mov	x22, x0
	mov	x0, x23
	bl	_grub_strlen
	cbz	x0, LBB0_20
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x5, sp, #12
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	x3, x24
	mov	w4, #4
	bl	_grub_minix_read_file
	tbnz	x0, #63, LBB0_18
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	add	w24, w24, #4
	ldr	w4, [x20]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	x3, x24
	mov	x5, x22
	bl	_grub_minix_read_file
	tbnz	x0, #63, LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldrsw	x8, [x20]
	strb	wzr, [x22, x8]
	mov	x0, x23
	mov	x1, x22
	bl	_grub_strcmp
	cbnz	w0, LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w23, [x20, #4]
	ldr	w0, [sp, #12]
	bl	_grub_le_to_cpu16
	mov	x1, x0
	mov	x0, x20
	bl	_grub_minix_read_inode
	mov	x0, x20
	bl	_GRUB_MINIX_INODE_MODE
	ldr	w8, [x27]
	bics	wzr, w8, w0
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_grub_minix_lookup_symlink
	ldr	x8, [x26]
	cbnz	x8, LBB0_18
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	cbz	x21, LBB0_23
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	mov	w1, #47
	bl	_grub_strchr
	mov	x25, x0
	cbz	x0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	strb	wzr, [x25], #1
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_GRUB_MINIX_INODE_MODE
	ldr	w8, [x28]
	bics	wzr, w8, w0
	b.ne	LBB0_26
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x22
	bl	_grub_free
	mov	w24, #0
	mov	x23, x21
	mov	x21, x25
	b	LBB0_6
LBB0_18:
	mov	x0, x19
	bl	_grub_free
	mov	x0, x22
	bl	_grub_free
	b	LBB0_22
LBB0_19:
	mov	x0, x19
	b	LBB0_24
LBB0_20:
	mov	x0, x19
	bl	_grub_free
	mov	x0, x22
	bl	_grub_free
Lloh6:
	adrp	x8, _GRUB_ERR_NONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GRUB_ERR_NONE@GOTPAGEOFF]
Lloh8:
	ldr	x0, [x8]
	b	LBB0_25
LBB0_21:
	mov	x0, x19
	bl	_grub_free
Lloh9:
	adrp	x8, _GRUB_ERR_FILE_NOT_FOUND@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GRUB_ERR_FILE_NOT_FOUND@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_grub_error
LBB0_22:
	ldr	x0, [x26]
	b	LBB0_25
LBB0_23:
	mov	x0, x19
	bl	_grub_free
	mov	x0, x22
LBB0_24:
	bl	_grub_free
	mov	x0, #0
LBB0_25:
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_26:
	mov	x0, x19
	bl	_grub_free
	mov	x0, x22
	bl	_grub_free
Lloh14:
	adrp	x8, _GRUB_ERR_BAD_FILE_TYPE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GRUB_ERR_BAD_FILE_TYPE@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
	b	LBB0_25
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_ERR_NONE,8,3              ; @GRUB_ERR_NONE
	.comm	_grub_errno,8,3                 ; @grub_errno
	.comm	_GRUB_MINIX_IFLNK,4,2           ; @GRUB_MINIX_IFLNK
	.comm	_GRUB_MINIX_IFDIR,4,2           ; @GRUB_MINIX_IFDIR
	.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_ERR_FILE_NOT_FOUND,4,2    ; @GRUB_ERR_FILE_NOT_FOUND
l_.str.1:                               ; @.str.1
	.asciz	"file not found"

	.no_dead_strip	_grub_minix_find_file
.subsections_via_symbols
