	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_ufs_get_file_block
_grub_ufs_get_file_block:               ## @grub_ufs_get_file_block
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_UFS_BLKSZ
	movq	_GRUB_UFS_DIRBLKS@GOTPCREL(%rip), %r15
	cmpl	%ebx, (%r15)
	jbe	LBB0_3
## %bb.1:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.2:
	movq	%r12, %rdi
	movl	%ebx, %esi
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_INODE_DIRBLOCKS                ## TAILCALL
LBB0_3:
	movl	%eax, %r14d
	movl	4(%r12), %esi
	movl	8(%r12), %edi
	callq	_grub_num_to_cpu32
	movl	%eax, %esi
	subl	(%r15), %ebx
	movq	_INODE_BLKSZ@GOTPCREL(%rip), %rcx
	movl	%r14d, %eax
	cltd
	idivl	(%rcx)
	movl	%ebx, %r15d
	subl	%eax, %r15d
	jae	LBB0_5
## %bb.4:
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movslq	%r14d, %rax
	andq	$-4, %rax
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movl	(%r12), %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_INODE_INDIRBLOCKS
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	andl	$-4, %r14d
	movl	%r13d, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	movq	%r15, %r8
	callq	_grub_disk_read
	movl	%ebx, %eax
	movl	(%r15,%rax,4), %eax
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_5:
	movl	%eax, %r13d
	imull	%r13d, %eax
	cmpl	%eax, %r15d
	jae	LBB0_7
## %bb.6:
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movslq	%r14d, %rax
	andq	$-4, %rax
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movl	(%r12), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_INODE_INDIRBLOCKS
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	andl	$-4, %r14d
	movl	-68(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	movq	%rbx, %r8
	callq	_grub_disk_read
	movl	(%r12), %edi
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%r13d
	movl	%edx, %r15d
                                        ## kill: def $eax killed $eax def $rax
	movl	(%rbx,%rax,4), %esi
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	movq	%rbx, %r8
	callq	_grub_disk_read
	movl	(%rbx,%r15,4), %eax
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_7:
	movq	_GRUB_ERR_NOT_IMPLEMENTED_YET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
	xorl	%eax, %eax
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_UFS_DIRBLKS,4,2           ## @GRUB_UFS_DIRBLKS
	.comm	_INODE_BLKSZ,4,2                ## @INODE_BLKSZ
	.comm	_GRUB_ERR_NOT_IMPLEMENTED_YET,4,2 ## @GRUB_ERR_NOT_IMPLEMENTED_YET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ufs does not support triple indirect blocks"

	.no_dead_strip	_grub_ufs_get_file_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_ufs_get_file_block
_grub_ufs_get_file_block:               ; @grub_ufs_get_file_block
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
	mov	x22, 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, #-72]
	bl	_UFS_BLKSZ
Lloh3:
	adrp	x23, _GRUB_UFS_DIRBLKS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GRUB_UFS_DIRBLKS@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, w22
	b.ls	LBB0_3
; %bb.1:
	ldur	x8, [x29, #-72]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.2:
	mov	x0, x19
	mov	x1, x22
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_INODE_DIRBLOCKS
LBB0_3:
	mov	x20, x0
	ldp	w1, w0, [x19, #4]
	bl	_grub_num_to_cpu32
	mov	x21, x0
	ldr	w8, [x23]
Lloh8:
	adrp	x9, _INODE_BLKSZ@GOTPAGE
Lloh9:
	ldr	x9, [x9, _INODE_BLKSZ@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	sdiv	w24, w20, w9
	sub	w26, w22, w8
	subs	w25, w26, w24
	b.hs	LBB0_5
; %bb.4:
	mov	x24, sp
	sxtw	x8, w20
	and	x9, x8, #0xfffffffffffffffc
	add	x8, x9, #15
	and	x8, x8, #0xfffffffffffffff0
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x22, x9, x8
	mov	sp, x22
	ldr	w23, [x19]
	mov	x0, x19
	mov	w1, #0
	bl	_INODE_INDIRBLOCKS
	lsl	w1, w0, w21
	and	w3, w20, #0xfffffffc
	mov	x0, x23
	mov	w2, #0
	mov	x4, x22
	bl	_grub_disk_read
	ldr	w0, [x22, w26, uxtw #2]
	mov	sp, x24
	b	LBB0_8
LBB0_5:
	mul	w8, w24, w24
	cmp	w25, w8
	b.hs	LBB0_7
; %bb.6:
	mov	x26, sp
	mov	x8, x20
	sxtw	x8, w8
	and	x9, x8, #0xfffffffffffffffc
	add	x8, x9, #15
	and	x8, x8, #0xfffffffffffffff0
Lloh13:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh14:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x22, x9, x8
	mov	sp, x22
	ldr	w23, [x19]
	mov	x0, x19
	mov	w1, #1
	bl	_INODE_INDIRBLOCKS
	lsl	w1, w0, w21
	and	w20, w20, #0xfffffffc
	mov	x0, x23
	mov	w2, #0
	mov	x3, x20
	mov	x4, x22
	bl	_grub_disk_read
	ldr	w0, [x19]
	udiv	w19, w25, w24
	ldr	w8, [x22, w19, uxtw #2]
	lsl	w1, w8, w21
	mov	w2, #0
	mov	x3, x20
	mov	x4, x22
	bl	_grub_disk_read
	msub	w8, w19, w24, w25
	ldr	w0, [x22, w8, uxtw #2]
	mov	sp, x26
	b	LBB0_8
LBB0_7:
Lloh15:
	adrp	x8, _GRUB_ERR_NOT_IMPLEMENTED_YET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GRUB_ERR_NOT_IMPLEMENTED_YET@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
	mov	w0, #0
LBB0_8:
	ldur	x8, [x29, #-72]
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.9:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_UFS_DIRBLKS,4,2           ; @GRUB_UFS_DIRBLKS
	.comm	_INODE_BLKSZ,4,2                ; @INODE_BLKSZ
	.comm	_GRUB_ERR_NOT_IMPLEMENTED_YET,4,2 ; @GRUB_ERR_NOT_IMPLEMENTED_YET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ufs does not support triple indirect blocks"

	.no_dead_strip	_grub_ufs_get_file_block
.subsections_via_symbols
