	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_jfs_lookup_symlink
_grub_jfs_lookup_symlink:               ## @grub_jfs_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)
	movl	16(%rdi), %edi
	callq	_grub_le_to_cpu64
	movl	%eax, %r12d
	leal	1(%r12), %eax
	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_JFS_MAX_SYMLNK_CNT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
## %bb.3:
	leaq	8(%rbx), %r13
	cmpl	$128, %r12d
	jg	LBB0_8
## %bb.4:
	movq	(%r13), %rsi
	movq	%r14, %rdi
	movl	$128, %edx
	callq	_grub_strncpy
	jmp	LBB0_5
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_13
## %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_8:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	%r12d, %r8d
	movq	%r14, %r9
	callq	_grub_jfs_read_file
	testq	%rax, %rax
	js	LBB0_9
LBB0_5:
	movslq	%r12d, %rax
	movb	$0, (%r14,%rax)
	cmpb	$47, (%r14)
	movl	$2, %eax
	cmovel	%eax, %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movq	%r13, %rdx
	callq	_grub_jfs_read_inode
	testq	%rax, %rax
	je	LBB0_6
LBB0_9:
	movq	_grub_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_11
LBB0_6:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_grub_jfs_find_file
	movq	_grub_errno@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_grub_error
	movq	(%rbx), %rax
	jmp	LBB0_11
LBB0_7:
	xorl	%eax, %eax
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_13
## %bb.12:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_JFS_MAX_SYMLNK_CNT,8,3    ## @GRUB_JFS_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
L_.str.1:                               ## @.str.1
	.asciz	"cannot follow symlink `%s'"

	.no_dead_strip	_grub_jfs_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_jfs_lookup_symlink
_grub_jfs_lookup_symlink:               ; @grub_jfs_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]
	ldr	w0, [x0, #16]
	bl	_grub_le_to_cpu64
	mov	x22, x0
	add	w8, w0, #1
	mov	x9, x8
Lloh3:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh4:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x8, [x19]
	add	x9, x8, #1
	str	x9, [x19]
Lloh5:
	adrp	x9, _GRUB_JFS_MAX_SYMLNK_CNT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GRUB_JFS_MAX_SYMLNK_CNT@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.1:
	add	x23, x19, #8
	cmp	w22, #128
	b.gt	LBB0_5
; %bb.2:
	ldr	x1, [x23]
	mov	x0, x20
	mov	w2, #128
	bl	_grub_strncpy
	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	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	x4, x22
	mov	x5, x20
	bl	_grub_jfs_read_file
	tbnz	x0, #63, LBB0_7
LBB0_6:
	strb	wzr, [x20, w22, sxtw]
	ldrb	w8, [x20]
	mov	w9, #2
	cmp	w8, #47
	csel	w1, w9, w21, eq
	mov	x0, x19
	mov	x2, x23
	bl	_grub_jfs_read_inode
	cbz	x0, LBB0_8
LBB0_7:
Lloh16:
	adrp	x8, _grub_errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _grub_errno@GOTPAGEOFF]
Lloh18:
	ldr	x0, [x8]
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	bl	_grub_jfs_find_file
Lloh19:
	adrp	x19, _grub_errno@GOTPAGE
Lloh20:
	ldr	x19, [x19, _grub_errno@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_10
; %bb.9:
	str	x20, [sp, #-16]!
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_grub_error
	add	sp, sp, #16
	ldr	x0, [x19]
LBB0_10:
	ldur	x8, [x29, #-56]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	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 AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_JFS_MAX_SYMLNK_CNT,8,3    ; @GRUB_JFS_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
l_.str.1:                               ; @.str.1
	.asciz	"cannot follow symlink `%s'"

	.no_dead_strip	_grub_jfs_lookup_symlink
.subsections_via_symbols
