	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_minix_lookup_symlink
_grub_minix_lookup_symlink:             ## @grub_minix_lookup_symlink
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_GRUB_MINIX_INODE_SIZE
	incq	%rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	(%rbx), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, (%rbx)
	movq	_GRUB_MINIX_MAX_SYMLNK_CNT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	callq	_GRUB_MINIX_INODE_SIZE
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%rax, %r8
	movq	%r14, %r9
	callq	_grub_minix_read_file
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	_GRUB_MINIX_INODE_SIZE
	movb	$0, (%r14,%rax)
	cmpb	$47, (%r14)
	jne	LBB0_7
## %bb.6:
	movq	_GRUB_MINIX_ROOT_INODE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_7:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_grub_minix_read_inode
	testq	%rax, %rax
	je	LBB0_8
LBB0_4:
	movq	_grub_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_13
## %bb.12:
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_GRUB_ERR_SYMLINK_LOOP@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_13
## %bb.2:
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_grub_error                     ## TAILCALL
LBB0_8:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_grub_minix_find_file
	movq	_grub_errno@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_grub_error
	movq	(%rbx), %rax
	jmp	LBB0_11
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_MINIX_MAX_SYMLNK_CNT,8,3  ## @GRUB_MINIX_MAX_SYMLNK_CNT
	.comm	_GRUB_ERR_SYMLINK_LOOP,4,2      ## @GRUB_ERR_SYMLINK_LOOP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"too deep nesting of symlinks"

	.comm	_grub_errno,8,3                 ## @grub_errno
	.comm	_GRUB_MINIX_ROOT_INODE,4,2      ## @GRUB_MINIX_ROOT_INODE
L_.str.1:                               ## @.str.1
	.asciz	"cannot follow symlink `%s'"

	.no_dead_strip	_grub_minix_lookup_symlink
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_minix_lookup_symlink
_grub_minix_lookup_symlink:             ; @grub_minix_lookup_symlink
	.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
	sub	sp, sp, #16
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_GRUB_MINIX_INODE_SIZE
	add	x9, x0, #1
Lloh3:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh4:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x0, #16
	and	x9, x9, #0xfffffffffffffff0
	sub	x20, x8, x9
	mov	sp, x20
	ldr	x8, [x19]
	add	x9, x8, #1
	str	x9, [x19]
Lloh5:
	adrp	x9, _GRUB_MINIX_MAX_SYMLNK_CNT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GRUB_MINIX_MAX_SYMLNK_CNT@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_GRUB_MINIX_INODE_SIZE
	mov	x4, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	x5, x20
	bl	_grub_minix_read_file
	tbnz	x0, #63, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_GRUB_MINIX_INODE_SIZE
	strb	wzr, [x20, x0]
	ldrb	w8, [x20]
Lloh8:
	adrp	x9, _GRUB_MINIX_ROOT_INODE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GRUB_MINIX_ROOT_INODE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, #47
	csel	w1, w9, w21, eq
	mov	x0, x19
	bl	_grub_minix_read_inode
	cbz	x0, LBB0_8
LBB0_3:
Lloh11:
	adrp	x8, _grub_errno@GOTPAGE
Lloh12:
	ldr	x8, [x8, _grub_errno@GOTPAGEOFF]
Lloh13:
	ldr	x0, [x8]
LBB0_4:
	ldur	x8, [x29, #-40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.5:
	sub	sp, x29, #32
	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
LBB0_6:
Lloh17:
	adrp	x8, _GRUB_ERR_SYMLINK_LOOP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GRUB_ERR_SYMLINK_LOOP@GOTPAGEOFF]
Lloh19:
	ldrsw	x0, [x8]
	ldur	x8, [x29, #-40]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.7:
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	sub	sp, x29, #32
	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
	b	_grub_error
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	bl	_grub_minix_find_file
Lloh25:
	adrp	x19, _grub_errno@GOTPAGE
Lloh26:
	ldr	x19, [x19, _grub_errno@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_4
; %bb.9:
	str	x20, [sp, #-16]!
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_grub_error
	add	sp, sp, #16
	ldr	x0, [x19]
	b	LBB0_4
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_MINIX_MAX_SYMLNK_CNT,8,3  ; @GRUB_MINIX_MAX_SYMLNK_CNT
	.comm	_GRUB_ERR_SYMLINK_LOOP,4,2      ; @GRUB_ERR_SYMLINK_LOOP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"too deep nesting of symlinks"

	.comm	_grub_errno,8,3                 ; @grub_errno
	.comm	_GRUB_MINIX_ROOT_INODE,4,2      ; @GRUB_MINIX_ROOT_INODE
l_.str.1:                               ; @.str.1
	.asciz	"cannot follow symlink `%s'"

	.no_dead_strip	_grub_minix_lookup_symlink
.subsections_via_symbols
