	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DiskRead
_DiskRead:                              ## @DiskRead
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movl	%edx, %ebx
	movq	%rsi, %r13
	callq	_FsGetDeviceSpecific
	movq	%rax, %r15
	movq	_DiskReadBufferSize@GOTPCREL(%rip), %r14
	xorl	%edi, %edi
	cmpl	$0, (%r14)
	setg	%dil
	callq	_ASSERT
	movl	(%r15), %ecx
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	leal	(%rbx,%rcx), %eax
	decl	%eax
	cltd
	idivl	%ecx
	movl	%eax, %ebx
	movl	(%r14), %eax
	cltd
	idivl	%ecx
	movq	16(%r15), %rcx
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	addq	8(%r15), %rcx
	movq	%rcx, %r15
	xorl	%edi, %edi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	setg	%dil
	callq	_ASSERT
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	movl	%ebx, %eax
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %r14
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	cmpl	%r12d, %eax
	cmovll	%eax, %r12d
	movl	24(%rbx), %edi
	movq	_DiskReadBuffer@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r15, %rsi
	movl	%r12d, %edx
	movl	%eax, %r13d
	callq	_MachDiskReadLogicalSectors
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movl	(%rbx), %r13d
	imull	%r12d, %r13d
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	cmpl	%r15d, %r13d
	cmovgel	%r15d, %r13d
	movq	_DiskReadBuffer@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_RtlCopyMemory
	movslq	%r13d, %rax
	leaq	(%r14,%rax,4), %r14
	subl	%eax, %r15d
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movslq	%r12d, %rax
	addq	%rax, %r15
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	subl	%r12d, %eax
	jne	LBB0_3
## %bb.6:
	movl	$1, %eax
	jmp	LBB0_7
LBB0_1:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r13, %r14
	jmp	LBB0_8
LBB0_4:
	xorl	%eax, %eax
LBB0_7:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_8:
	subl	%r13d, %r14d
	movl	%r14d, (%r12)
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	subq	8(%rcx), %r15
	movq	%r15, 16(%rcx)
	testl	%eax, %eax
	jne	LBB0_9
## %bb.10:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_ESUCCESS@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DiskReadBufferSize,4,2         ## @DiskReadBufferSize
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_DiskReadBuffer,4,2             ## @DiskReadBuffer
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ESUCCESS,4,2                   ## @ESUCCESS
	.no_dead_strip	_DiskRead
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DiskRead
_DiskRead:                              ; @DiskRead
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x25, x3
	mov	x23, x2
	mov	x20, x1
	bl	_FsGetDeviceSpecific
	mov	x21, x0
Lloh0:
	adrp	x19, _DiskReadBufferSize@GOTPAGE
Lloh1:
	ldr	x19, [x19, _DiskReadBufferSize@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w0, gt
	bl	_ASSERT
	ldr	w8, [x21]
	add	w9, w23, w8
	sub	w9, w9, #1
	ldr	w10, [x19]
	sdiv	w27, w10, w8
	ldp	x10, x11, [x21, #8]
	add	x22, x11, x10
	cmp	w27, #0
	cset	w0, gt
	sdiv	w28, w9, w8
	bl	_ASSERT
	cbz	w28, LBB0_5
; %bb.1:
	str	x25, [sp, #8]                   ; 8-byte Folded Spill
Lloh2:
	adrp	x19, _DiskReadBuffer@GOTPAGE
Lloh3:
	ldr	x19, [x19, _DiskReadBuffer@GOTPAGEOFF]
	mov	x24, x20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w28, w27
	csel	w25, w28, w27, lt
	ldr	w0, [x21, #24]
	ldr	w3, [x19]
	mov	x1, x22
	mov	x2, x25
	bl	_MachDiskReadLogicalSectors
	cbz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x21]
	mul	w8, w8, w25
	cmp	w8, w23
	csel	w26, w8, w23, lt
	ldr	w1, [x19]
	mov	x0, x24
	mov	x2, x26
	bl	_RtlCopyMemory
	add	x24, x24, w26, sxtw #2
	sub	w23, w23, w26
	add	x22, x22, w25, sxtw
	subs	w28, w28, w25
	b.ne	LBB0_2
; %bb.4:
	mov	w8, #1
	b	LBB0_7
LBB0_5:
Lloh4:
	adrp	x8, _TRUE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	mov	x24, x20
	b	LBB0_8
LBB0_6:
	mov	w8, #0
LBB0_7:
	ldr	x25, [sp, #8]                   ; 8-byte Folded Reload
LBB0_8:
	sub	w9, w24, w20
	str	w9, [x25]
	ldr	x9, [x21, #8]
	sub	x9, x22, x9
	str	x9, [x21, #16]
Lloh7:
	adrp	x9, _EIO@GOTPAGE
Lloh8:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh9:
	adrp	x10, _ESUCCESS@GOTPAGE
Lloh10:
	ldr	x10, [x10, _ESUCCESS@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x9, x10, eq
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DiskReadBufferSize,4,2         ; @DiskReadBufferSize
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_DiskReadBuffer,4,2             ; @DiskReadBuffer
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ESUCCESS,4,2                   ; @ESUCCESS
	.no_dead_strip	_DiskRead
.subsections_via_symbols
