	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_fbfs_read
_grub_fbfs_read:                        ## @grub_fbfs_read
	.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	%edx, %ebx
	movq	%rsi, %r13
	movq	32(%rdi), %rax
	movq	40(%rdi), %rcx
	movq	(%rcx), %r15
	movq	%rax, (%r15)
	movl	24(%rdi), %eax
	movl	%eax, 8(%r15)
	movq	16(%rdi), %rax
	movq	16(%rax), %rcx
	movq	(%rcx), %r12
	cmpq	(%rax), %r12
	jge	LBB0_1
## %bb.2:
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.4:
	movslq	(%rdi), %rcx
	imulq	$-2139062143, %rcx, %rsi        ## imm = 0x80808081
	shrq	$32, %rsi
	addl	%ecx, %esi
	movl	%esi, %edx
	shrl	$31, %edx
	sarl	$8, %esi
	addl	%edx, %esi
	movl	%esi, %edi
	shll	$9, %edi
	movl	%esi, %edx
	subl	%edi, %edx
	addl	%esi, %edx
	addl	%ecx, %edx
	subl	8(%rax), %r12d
	addl	%esi, %r12d
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%rdx,%r14), %eax
	movl	$510, %ebx                      ## imm = 0x1FE
	subl	%edx, %ebx
	cmpl	$511, %eax                      ## imm = 0x1FF
	cmovll	%r14d, %ebx
	movq	%r15, %rdi
	movl	%r12d, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%ebx, %ecx
	movq	%r13, %r8
	callq	_grub_disk_read
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%r12d
	movslq	%ebx, %rax
	addq	%r13, %rax
	testq	%r13, %r13
	cmovneq	%rax, %r13
	xorl	%edx, %edx
	subl	%ebx, %r14d
	jne	LBB0_5
## %bb.8:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_9
LBB0_1:
	subq	8(%rax), %r12
	movq	(%rdi), %rdx
	movl	8(%rdi), %r9d
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %ecx
	movq	%r13, %r8
	callq	_grub_disk_read_ex
	movq	$0, (%r15)
	xorl	%ecx, %ecx
	negq	%rax
	sbbl	%ecx, %ecx
	orl	%ecx, %ebx
	jmp	LBB0_10
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_6:
	movl	$-1, %ebx
LBB0_9:
	movq	$0, (%r15)
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_grub_fbfs_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_fbfs_read
_grub_fbfs_read:                        ; @grub_fbfs_read
	.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
	mov	x19, x2
	mov	x21, x1
	ldp	x9, x8, [x0, #32]
	ldr	x20, [x8]
	str	x9, [x20]
	ldr	w8, [x0, #24]
	str	w8, [x20, #8]
	ldr	x8, [x0, #16]
	ldr	x9, [x8, #16]
	ldr	x9, [x9]
	ldr	x10, [x8]
	cmp	x9, x10
	b.ge	LBB0_5
; %bb.1:
	cbz	w19, LBB0_7
; %bb.2:
	ldr	w10, [x0]
	mov	w11, #32897
	movk	w11, #32896, lsl #16
	smull	x11, w10, w11
	lsr	x11, x11, #32
	add	w11, w11, w10
	asr	w12, w11, #8
	add	w11, w12, w11, lsr #31
	mov	w24, #510
	msub	w2, w11, w24, w10
	ldr	w8, [x8, #8]
	sub	w8, w9, w8
	add	w22, w11, w8
	mov	x25, x19
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w2, w25
	sub	w9, w24, w2
	cmp	w8, #510
	csel	w23, w9, w25, gt
	mov	x0, x20
	mov	x1, x22
	mov	x3, x23
	mov	x4, x21
	bl	_grub_disk_read
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w2, #0
	add	w22, w22, #1
	add	x8, x21, w23, sxtw
	cmp	x21, #0
	csel	x21, xzr, x8, eq
	subs	w25, w25, w23
	b.ne	LBB0_3
	b	LBB0_7
LBB0_5:
	ldr	x8, [x8, #8]
	sub	x1, x9, x8
	ldr	x2, [x0]
	ldr	w5, [x0, #8]
	mov	x0, x20
	mov	x3, x19
	mov	x4, x21
	bl	_grub_disk_read_ex
	str	xzr, [x20]
	cmp	x0, #0
	csinv	w19, w19, wzr, eq
	b	LBB0_8
LBB0_6:
	mov	w19, #-1
LBB0_7:
	str	xzr, [x20]
LBB0_8:
	mov	x0, x19
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_grub_fbfs_read
.subsections_via_symbols
