	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_afs_read_block
_grub_afs_read_block:                   ## @grub_afs_read_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r12
	addq	$4, %r12
	movl	20(%rdi), %edi
	callq	_grub_afs_to_cpu64
	cmpq	%r13, %rax
	jle	LBB0_6
## %bb.1:
	movq	_GRUB_AFS_DIRECT_BLOCK_COUNT@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_16
## %bb.2:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rax
	movl	(%rax,%rbx), %edi
	callq	_grub_afs_to_cpu16
	cmpq	%rax, %r13
	jl	LBB0_17
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%r15), %rax
	movl	(%rax,%rbx), %edi
	callq	_grub_afs_to_cpu16
	subq	%rax, %r13
	incq	%r12
	movslq	(%r14), %rax
	addq	$4, %rbx
	cmpq	%rax, %r12
	jl	LBB0_3
LBB0_16:
	xorl	%r13d, %r13d
	jmp	LBB0_23
LBB0_6:
	movl	12(%r15), %edi
	callq	_grub_afs_to_cpu64
	movq	%rax, %rbx
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movl	(%r12), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%eax, %r14d
	sarl	$2, %r14d
	leaq	(,%r14,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	cmpq	%r13, %rbx
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	jle	LBB0_14
## %bb.7:
	leaq	16(%r15), %rsi
	movq	%r12, %rdi
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	callq	_grub_afs_run_to_num
	movl	%eax, %ebx
	movl	20(%r15), %edi
	callq	_grub_afs_to_cpu64
	cmpl	$0, 16(%r15)
	jle	LBB0_19
## %bb.8:
	subq	%rax, %r13
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	andl	$-4, %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	cmpl	$2, %r14d
	movl	$1, %eax
	cmovgel	%r14d, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	incl	%r14d
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	incl	%ebx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmpl	(%rax), %r14d
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	jge	LBB0_19
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movq	(%r15), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	movq	_GRUB_DISK_SECTOR_BITS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %esi
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	imull	%ebx, %esi
	xorl	%edx, %edx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %r8
	callq	_grub_disk_read
	testq	%rax, %rax
	jne	LBB0_19
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	cmpl	$4, -52(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rbx), %edi
	callq	_grub_afs_to_cpu16
	cmpq	%rax, %r13
	jl	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	(%rbx), %edi
	callq	_grub_afs_to_cpu16
	subq	%rax, %r13
	addq	$4, %rbx
	decq	%r12
	jne	LBB0_12
	jmp	LBB0_9
LBB0_14:
	movl	12(%r15), %edi
	callq	_grub_afs_to_cpu64
	subl	%eax, %r13d
	movq	_GRUB_AFS_BLOCKS_PER_DI_RUN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	movl	%edx, -104(%rbp)                ## 4-byte Spill
	movl	%ecx, %edx
	imull	%r14d, %edx
	movl	%edx, -96(%rbp)                 ## 4-byte Spill
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	imull	%ecx, %edx
	movl	%edx, -88(%rbp)                 ## 4-byte Spill
	movl	%edx, %ecx
	imull	%r14d, %ecx
	cltd
	idivl	%r14d
	movl	%edx, -100(%rbp)                ## 4-byte Spill
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %ebx
	movq	(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	leaq	8(%r15), %rsi
	movq	%r12, %rdi
	callq	_grub_afs_run_to_num
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	(%r12), %esi
	movq	_GRUB_DISK_SECTOR_BITS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %esi
	addl	%eax, %ebx
	imull	%ebx, %esi
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	andl	$-4, %ebx
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	xorl	%edx, %edx
	movl	%ebx, %ecx
	movq	-112(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %r8
	callq	_grub_disk_read
	testq	%rax, %rax
	je	LBB0_20
## %bb.15:
	xorl	%r13d, %r13d
	jmp	LBB0_22
LBB0_17:
	addq	24(%r15), %rbx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_grub_afs_run_to_num
	cltq
	addq	%rax, %r13
	jmp	LBB0_23
LBB0_18:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_grub_afs_run_to_num
	cltq
	addq	%rax, %r13
	jmp	LBB0_22
LBB0_19:
	movq	-80(%rbp), %rsp                 ## 8-byte Reload
	xorl	%r13d, %r13d
	jmp	LBB0_23
LBB0_20:
	movl	%r13d, %eax
	cltd
	idivl	-88(%rbp)                       ## 4-byte Folded Reload
	cltd
	idivl	%r14d
	movl	%edx, %ecx
	movl	%r13d, %eax
	cltd
	idivl	-96(%rbp)                       ## 4-byte Folded Reload
	cltd
	idivl	-56(%rbp)                       ## 4-byte Folded Reload
	movq	%r12, %r14
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movq	(%r15), %rax
	movl	(%rax), %r15d
	movslq	%ecx, %rax
	leaq	(%r12,%rax,4), %rsi
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_grub_afs_run_to_num
	addl	%eax, %ebx
	movl	(%r12), %esi
	movq	_GRUB_DISK_SECTOR_BITS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %esi
	imull	%ebx, %esi
	movq	%r14, %rbx
	xorl	%r13d, %r13d
	movl	%r15d, %edi
	xorl	%edx, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movq	%rbx, %r8
	callq	_grub_disk_read
	testq	%rax, %rax
	jne	LBB0_22
## %bb.21:
	movslq	-100(%rbp), %rax                ## 4-byte Folded Reload
	leaq	(%rbx,%rax,4), %rsi
	movq	%r12, %rdi
	callq	_grub_afs_run_to_num
	addl	-104(%rbp), %eax                ## 4-byte Folded Reload
	movslq	%eax, %r13
LBB0_22:
	movq	-80(%rbp), %rsp                 ## 8-byte Reload
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.24:
	movq	%r13, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_AFS_DIRECT_BLOCK_COUNT,4,2 ## @GRUB_AFS_DIRECT_BLOCK_COUNT
	.comm	_GRUB_DISK_SECTOR_BITS,4,2      ## @GRUB_DISK_SECTOR_BITS
	.comm	_GRUB_AFS_BLOCKS_PER_DI_RUN,4,2 ## @GRUB_AFS_BLOCKS_PER_DI_RUN
	.no_dead_strip	_grub_afs_read_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_afs_read_block
_grub_afs_read_block:                   ; @grub_afs_read_block
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #32
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x8, [x0]
	add	x19, x8, #4
	ldr	w0, [x0, #20]
	bl	_grub_afs_to_cpu64
	cmp	x0, x22
	b.le	LBB0_6
; %bb.1:
Lloh3:
	adrp	x21, _GRUB_AFS_DIRECT_BLOCK_COUNT@GOTPAGE
Lloh4:
	ldr	x21, [x21, _GRUB_AFS_DIRECT_BLOCK_COUNT@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x23, #0
	mov	x24, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	ldr	w0, [x8, x23]
	bl	_grub_afs_to_cpu16
	cmp	x22, x0
	b.lt	LBB0_17
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #24]
	ldr	w0, [x8, x23]
	bl	_grub_afs_to_cpu16
	sub	x22, x22, x0
	add	x24, x24, #1
	ldrsw	x8, [x21]
	add	x23, x23, #4
	cmp	x24, x8
	b.lt	LBB0_3
LBB0_5:
	mov	x0, #0
	b	LBB0_22
LBB0_6:
	ldr	w0, [x20, #12]
	bl	_grub_afs_to_cpu64
	mov	x8, sp
	stur	x8, [x29, #-96]                 ; 8-byte Folded Spill
	ldr	w27, [x19]
	asr	w25, w27, #2
	lsl	x8, x25, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	cmp	x0, x22
	b.le	LBB0_14
; %bb.7:
	add	x23, x20, #16
	mov	x0, x19
	mov	x1, x23
	bl	_grub_afs_run_to_num
	mov	x24, x0
	ldr	w0, [x20, #20]
	bl	_grub_afs_to_cpu64
	ldr	w8, [x20, #16]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.8:
	mov	w26, #0
	sub	x28, x22, x0
	and	w8, w27, #0xfffffffc
	stur	w8, [x29, #-100]                ; 4-byte Folded Spill
	cmp	w25, #1
	csinc	w8, w25, wzr, gt
	stur	x8, [x29, #-112]                ; 8-byte Folded Spill
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w26, w26, #1
	add	w24, w24, #1
	ldr	w8, [x23]
	cmp	w26, w8
	b.ge	LBB0_19
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	ldr	x8, [x20]
	ldr	w0, [x8]
	ldr	w8, [x19]
Lloh7:
	adrp	x9, _GRUB_DISK_SECTOR_BITS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _GRUB_DISK_SECTOR_BITS@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	asr	w8, w8, w9
	mul	w1, w8, w24
	mov	w2, #0
	ldur	w3, [x29, #-100]                ; 4-byte Folded Reload
	mov	x4, x21
	bl	_grub_disk_read
	cbnz	x0, LBB0_19
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldur	x22, [x29, #-112]               ; 8-byte Folded Reload
	mov	x25, x21
	cmp	w27, #4
	b.lt	LBB0_9
LBB0_12:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x25]
	bl	_grub_afs_to_cpu16
	cmp	x28, x0
	b.lt	LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	w0, [x25], #4
	bl	_grub_afs_to_cpu16
	sub	x28, x28, x0
	subs	x22, x22, #1
	b.ne	LBB0_12
	b	LBB0_9
LBB0_14:
	ldr	w0, [x20, #12]
	bl	_grub_afs_to_cpu64
	sub	w9, w22, w0
Lloh10:
	adrp	x8, _GRUB_AFS_BLOCKS_PER_DI_RUN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GRUB_AFS_BLOCKS_PER_DI_RUN@GOTPAGEOFF]
Lloh12:
	ldr	w26, [x8]
	mul	w28, w26, w25
	mul	w24, w28, w26
	mul	w8, w24, w25
	stur	w9, [x29, #-100]                ; 4-byte Folded Spill
	sdiv	w22, w9, w8
	ldr	x8, [x20]
	ldr	w23, [x8]
	add	x1, x20, #8
	mov	x0, x19
	bl	_grub_afs_run_to_num
	add	w8, w0, w22
	ldr	w9, [x19]
Lloh13:
	adrp	x10, _GRUB_DISK_SECTOR_BITS@GOTPAGE
Lloh14:
	ldr	x10, [x10, _GRUB_DISK_SECTOR_BITS@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	asr	w9, w9, w10
	mul	w1, w9, w8
	and	w22, w27, #0xfffffffc
	mov	x0, x23
	mov	w2, #0
	mov	x3, x22
	mov	x4, x21
	bl	_grub_disk_read
	cbnz	x0, LBB0_16
; %bb.15:
	ldur	w9, [x29, #-100]                ; 4-byte Folded Reload
	sdiv	w8, w9, w24
	mov	x24, x9
	sdiv	w9, w8, w25
	msub	w8, w9, w25, w8
	sdiv	w9, w24, w28
	sdiv	w10, w9, w26
	msub	w23, w10, w26, w9
	ldr	x9, [x20]
	ldr	w20, [x9]
	add	x1, x21, w8, sxtw #2
	mov	x0, x19
	bl	_grub_afs_run_to_num
	add	w8, w0, w23
	ldr	w9, [x19]
Lloh16:
	adrp	x10, _GRUB_DISK_SECTOR_BITS@GOTPAGE
Lloh17:
	ldr	x10, [x10, _GRUB_DISK_SECTOR_BITS@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	asr	w9, w9, w10
	mul	w1, w9, w8
	mov	x0, x20
	mov	w2, #0
	mov	x3, x22
	mov	x4, x21
	bl	_grub_disk_read
	cbz	x0, LBB0_20
LBB0_16:
	mov	x0, #0
	b	LBB0_21
LBB0_17:
	ldr	x8, [x20, #24]
	add	x1, x8, x23
	mov	x0, x19
	bl	_grub_afs_run_to_num
	add	x0, x22, w0, sxtw
	b	LBB0_22
LBB0_18:
	mov	x0, x19
	mov	x1, x25
	bl	_grub_afs_run_to_num
	add	x0, x28, w0, sxtw
	b	LBB0_21
LBB0_19:
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	mov	sp, x8
	mov	x0, #0
	b	LBB0_22
LBB0_20:
	sdiv	w8, w24, w26
	msub	w20, w8, w26, w24
	sdiv	w9, w8, w25
	msub	w8, w9, w25, w8
	add	x1, x21, w8, sxtw #2
	mov	x0, x19
	bl	_grub_afs_run_to_num
	add	w8, w0, w20
	sxtw	x0, w8
LBB0_21:
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	mov	sp, x8
LBB0_22:
	ldur	x8, [x29, #-88]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_AFS_DIRECT_BLOCK_COUNT,4,2 ; @GRUB_AFS_DIRECT_BLOCK_COUNT
	.comm	_GRUB_DISK_SECTOR_BITS,4,2      ; @GRUB_DISK_SECTOR_BITS
	.comm	_GRUB_AFS_BLOCKS_PER_DI_RUN,4,2 ; @GRUB_AFS_BLOCKS_PER_DI_RUN
	.no_dead_strip	_grub_afs_read_block
.subsections_via_symbols
