	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_minix_read_file
_grub_minix_read_file:                  ## @grub_minix_read_file
	.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	%r9, %r13
	movq	%r8, %r14
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movslq	%ecx, %rbx
	leaq	(%rbx,%r8), %r15
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_GRUB_MINIX_INODE_SIZE
	movq	%r15, %rcx
	cmpq	%rax, %r15
	jle	LBB0_2
## %bb.1:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_GRUB_MINIX_INODE_SIZE
	movq	%rax, %rcx
	movq	%rax, %r14
	subq	%rbx, %r14
LBB0_2:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	_GRUB_MINIX_BSIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%rcx), %rax
	decq	%rax
	movq	%rax, %rcx
	orq	%r14, %rcx
	shrq	$32, %rcx
	je	LBB0_3
## %bb.4:
	cqto
	idivq	%r14
	jmp	LBB0_5
LBB0_3:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r14d
                                        ## kill: def $eax killed $eax def $rax
LBB0_5:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	orq	%r14, %rax
	shrq	$32, %rax
	je	LBB0_6
## %bb.7:
	movq	%rbx, %rax
	cqto
	idivq	%r14
	movq	%rax, %r15
	cmpl	-56(%rbp), %r15d                ## 4-byte Folded Reload
	jl	LBB0_9
	jmp	LBB0_25
LBB0_6:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	xorl	%edx, %edx
	divl	%r14d
	movl	%eax, %r15d
	cmpl	-56(%rbp), %r15d                ## 4-byte Folded Reload
	jge	LBB0_25
LBB0_9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	negl	%eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rax
	orq	%r14, %rax
	shrq	$32, %rax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rbx, %rax
	cqto
	idivq	%r14
	movq	%rdx, %r12
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	xorl	%edx, %edx
	divl	%r14d
	movl	%edx, %r12d
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_grub_minix_get_file_block
	movl	%eax, %esi
	movl	$-1, -60(%rbp)                  ## 4-byte Folded Spill
	movq	_grub_errno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_26
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addl	%r15d, %eax
	cmpl	$-1, %eax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_GRUB_MINIX_BSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_GRUB_MINIX_BSIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_10 Depth=1
	cqto
	idivq	%rcx
	jmp	LBB0_19
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_19:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%ecx, %r14d
	testl	%edx, %edx
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%edx, %r14d
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r13, %rbx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cltd
	idivl	%ecx
	cmpl	%eax, %r15d
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_10 Depth=1
	xorl	%r12d, %r12d
LBB0_23:                                ##   in Loop: Header=BB0_10 Depth=1
	subl	%r12d, %r14d
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rdi
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	%rax, (%rdi)
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	%rax, 8(%rdi)
	movq	_GRUB_MINIX_LOG2_ZONESZ@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	shll	%cl, %esi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	movq	%rbx, %r8
	callq	_grub_disk_read
	movq	(%r13), %rax
	movq	$0, (%rax)
	movq	_grub_errno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_GRUB_MINIX_BSIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movslq	%r12d, %rax
	movq	%r14, %rcx
	subq	%rax, %rcx
	addq	%rcx, %rbx
	incl	%r15d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	addl	%r15d, %eax
	movq	%rbx, %r13
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_10
LBB0_25:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
LBB0_26:
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_MINIX_BSIZE,8,3           ## @GRUB_MINIX_BSIZE
	.comm	_grub_errno,8,3                 ## @grub_errno
	.comm	_GRUB_MINIX_LOG2_ZONESZ,4,2     ## @GRUB_MINIX_LOG2_ZONESZ
	.no_dead_strip	_grub_minix_read_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_minix_read_file
_grub_minix_read_file:                  ; @grub_minix_read_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x20, x5
	mov	x19, x4
                                        ; kill: def $w3 killed $w3 def $x3
	stp	x1, x2, [sp, #8]                ; 16-byte Folded Spill
	mov	x24, x0
	str	x3, [sp, #24]                   ; 8-byte Folded Spill
	sxtw	x28, w3
	add	x25, x28, x4
	bl	_GRUB_MINIX_INODE_SIZE
	cmp	x25, x0
	b.le	LBB0_2
; %bb.1:
	mov	x0, x24
	bl	_GRUB_MINIX_INODE_SIZE
	mov	x25, x0
	sub	x19, x0, x28
LBB0_2:
	str	x19, [sp]                       ; 8-byte Folded Spill
Lloh0:
	adrp	x19, _GRUB_MINIX_BSIZE@GOTPAGE
Lloh1:
	ldr	x19, [x19, _GRUB_MINIX_BSIZE@GOTPAGEOFF]
	ldr	x21, [x19]
	add	x8, x21, x25
	sub	x8, x8, #1
	sdiv	x8, x8, x21
	sdiv	x26, x28, x21
	cmp	w26, w8
	b.ge	LBB0_10
; %bb.3:
	neg	w22, w8
Lloh2:
	adrp	x23, _grub_errno@GOTPAGE
Lloh3:
	ldr	x23, [x23, _grub_errno@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	mov	x1, x26
	bl	_grub_minix_get_file_block
	ldr	x8, [x23]
	cbnz	x8, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w8, w22, w26
	cmn	w8, #1
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	mov	x9, x21
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19]
	sdiv	x9, x25, x8
	msub	w9, w9, w8, w25
	cmp	w9, #0
	csel	w9, w8, w9, eq
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	sdiv	x10, x28, x21
	msub	w10, w10, w21, w28
	ldr	x11, [sp, #24]                  ; 8-byte Folded Reload
	sdiv	w8, w11, w8
	cmp	w26, w8
	csel	w27, w10, wzr, eq
	sub	w3, w9, w27
	ldr	x8, [x24]
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	stp	x10, x9, [x8]
Lloh4:
	adrp	x9, _GRUB_MINIX_LOG2_ZONESZ@GOTPAGE
Lloh5:
	ldr	x9, [x9, _GRUB_MINIX_LOG2_ZONESZ@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	lsl	w1, w0, w9
	mov	x0, x8
	mov	x2, x27
	mov	x4, x20
	bl	_grub_disk_read
	ldr	x8, [x24]
	str	xzr, [x8]
	ldr	x8, [x23]
	cbnz	x8, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x21, [x19]
	sub	x8, x21, w27, sxtw
	add	x20, x20, x8
	add	w26, w26, #1
	cmn	w22, w26
	b.ne	LBB0_4
LBB0_10:
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	b	LBB0_12
LBB0_11:
	mov	w0, #-1
LBB0_12:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_MINIX_BSIZE,8,3           ; @GRUB_MINIX_BSIZE
	.comm	_grub_errno,8,3                 ; @grub_errno
	.comm	_GRUB_MINIX_LOG2_ZONESZ,4,2     ; @GRUB_MINIX_LOG2_ZONESZ
	.no_dead_strip	_grub_minix_read_file
.subsections_via_symbols
