	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_ufs_lookup_symlink
_grub_ufs_lookup_symlink:               ## @grub_ufs_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -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, -48(%rbp)
	callq	_INODE_SIZE
	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_UFS_MAX_SYMLNK_CNT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	callq	_INODE_NBLOCKS
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	16(%rbx), %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_INODE_DIRBLOCKS
	movl	%eax, %r13d
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_grub_num_to_cpu32
	movl	%eax, %ecx
	shll	%cl, %r13d
	movq	%rbx, %rdi
	callq	_INODE_SIZE
	movl	%r12d, %edi
	movl	%r13d, %esi
	xorl	%edx, %edx
	movq	%rax, %rcx
	movq	%r14, %r8
	callq	_grub_disk_read
	movq	%rbx, %rdi
	callq	_INODE_SIZE
	movb	$0, (%r14,%rax)
	cmpb	$47, (%r14)
	jne	LBB0_8
LBB0_7:
	movq	_GRUB_UFS_INODE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_8:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_grub_ufs_read_inode
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_grub_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_13
LBB0_1:
	movq	_GRUB_ERR_SYMLINK_LOOP@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.2:
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_grub_error                     ## TAILCALL
LBB0_4:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_INODE
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_grub_strcpy
	cmpb	$47, (%r14)
	je	LBB0_7
	jmp	LBB0_8
LBB0_10:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_grub_ufs_find_file
	movq	_grub_errno@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.12:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_grub_error
	movq	(%rbx), %rax
	jmp	LBB0_13
LBB0_11:
	xorl	%eax, %eax
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_15
## %bb.14:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_UFS_MAX_SYMLNK_CNT,8,3    ## @GRUB_UFS_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_UFS_INODE,4,2             ## @GRUB_UFS_INODE
	.comm	_grub_errno,8,3                 ## @grub_errno
L_.str.1:                               ## @.str.1
	.asciz	"cannot follow symlink `%s'"

	.no_dead_strip	_grub_ufs_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_ufs_lookup_symlink
_grub_ufs_lookup_symlink:               ; @grub_ufs_lookup_symlink
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	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, #-56]
	bl	_INODE_SIZE
	mov	x9, x0
Lloh3:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh4:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x0, #15
	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_UFS_MAX_SYMLNK_CNT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GRUB_UFS_MAX_SYMLNK_CNT@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_INODE_NBLOCKS
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w22, [x19, #16]
	mov	x0, x19
	mov	w1, #0
	bl	_INODE_DIRBLOCKS
	mov	x23, x0
	ldp	w1, w0, [x19, #8]
	bl	_grub_num_to_cpu32
	lsl	w23, w23, w0
	mov	x0, x19
	bl	_INODE_SIZE
	mov	x3, x0
	mov	x0, x22
	mov	x1, x23
	mov	w2, #0
	mov	x4, x20
	bl	_grub_disk_read
	mov	x0, x19
	bl	_INODE_SIZE
	strb	wzr, [x20, x0]
	b	LBB0_6
LBB0_3:
Lloh8:
	adrp	x8, _GRUB_ERR_SYMLINK_LOOP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GRUB_ERR_SYMLINK_LOOP@GOTPAGEOFF]
Lloh10:
	ldrsw	x0, [x8]
	ldur	x8, [x29, #-56]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.4:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_grub_error
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	bl	_INODE
	mov	x1, x0
	mov	x0, x20
	bl	_grub_strcpy
LBB0_6:
	ldrb	w8, [x20]
Lloh16:
	adrp	x9, _GRUB_UFS_INODE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _GRUB_UFS_INODE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, #47
	csel	w1, w9, w21, eq
	mov	x0, x19
	mov	w2, #0
	bl	_grub_ufs_read_inode
	cbz	x0, LBB0_8
; %bb.7:
Lloh19:
	adrp	x8, _grub_errno@GOTPAGE
Lloh20:
	ldr	x8, [x8, _grub_errno@GOTPAGEOFF]
Lloh21:
	ldr	x0, [x8]
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	bl	_grub_ufs_find_file
Lloh22:
	adrp	x19, _grub_errno@GOTPAGE
Lloh23:
	ldr	x19, [x19, _grub_errno@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_10
; %bb.9:
	str	x20, [sp, #-16]!
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_grub_error
	add	sp, sp, #16
	ldr	x0, [x19]
LBB0_10:
	ldur	x8, [x29, #-56]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_UFS_MAX_SYMLNK_CNT,8,3    ; @GRUB_UFS_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_UFS_INODE,4,2             ; @GRUB_UFS_INODE
	.comm	_grub_errno,8,3                 ; @grub_errno
l_.str.1:                               ; @.str.1
	.asciz	"cannot follow symlink `%s'"

	.no_dead_strip	_grub_ufs_lookup_symlink
.subsections_via_symbols
