	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function XboxDiskPolledRead
_XboxDiskPolledRead:                    ## @XboxDiskPolledRead
	.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
	movl	%r9d, %ebx
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, -72(%rbp)                 ## 4-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movl	%edi, %r15d
	movq	40(%rbp), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	_IDE_MAX_BUSY_RETRIES@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	callq	_IDEReadStatus
	movl	%eax, %r14d
	movq	_IDE_SR_BUSY@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_StallExecutionProcessor
	incl	%r13d
	cmpl	(%r12), %r13d
	jl	LBB0_1
LBB0_3:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_TRACE
	leal	(%r13,%r13), %eax
	leal	(%rax,%rax,4), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	cmpl	(%r12), %r13d
	jge	LBB0_6
## %bb.4:
	movq	_IDE_DH_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%rbp), %r14d
	orl	%r14d, %esi
	movl	%r15d, %edi
	callq	_IDEWriteDriveHead
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_StallExecutionProcessor
	movq	_IDE_DC_nIEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_IDEWriteDriveControl
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_StallExecutionProcessor
	movq	_IDE_DH_DRV1@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	testl	%r14d, (%rax)
	movq	_IDE_DH_LBA@GOTPCREL(%rip), %rax
	setne	%sil
	testl	%r14d, (%rax)
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	je	LBB0_7
## %bb.5:
	movl	%r14d, %eax
	andl	$15, %eax
	shll	$24, %eax
	movl	16(%rbp), %ecx
	shll	$16, %ecx
	movl	%ebx, %edx
	shll	$8, %edx
	addl	-56(%rbp), %edx                 ## 4-byte Folded Reload
	addl	%ecx, %edx
	addl	%eax, %edx
	leaq	L_.str.3(%rip), %rdi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %ecx
	movl	32(%rbp), %r13d
	movl	%r13d, %r8d
	xorl	%eax, %eax
	callq	_TRACE
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	callq	_WARN
	jmp	LBB0_26
LBB0_7:
	movl	%r14d, %r8d
	andl	$15, %r8d
	leaq	L_.str.4(%rip), %rdi
	movl	16(%rbp), %edx
	movl	%ebx, %ecx
	movl	-56(%rbp), %r9d                 ## 4-byte Reload
	xorl	%eax, %eax
	movl	32(%rbp), %r13d
	pushq	%r13
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	pushq	%rbx
	callq	_TRACE
	addq	$16, %rsp
LBB0_8:
	movl	%r15d, %edi
	movl	-72(%rbp), %esi                 ## 4-byte Reload
	callq	_IDEWritePrecomp
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_IDEWriteSectorCount
	movl	%r15d, %edi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	callq	_IDEWriteSectorNum
	movl	%r15d, %edi
	movl	16(%rbp), %esi
	callq	_IDEWriteCylinderHigh
	movl	%r15d, %edi
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	callq	_IDEWriteCylinderLow
	movq	_IDE_DH_FIXED@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_IDEWriteDriveHead
	movl	%r15d, %edi
	movl	%r13d, %esi
	callq	_IDEWriteCommand
	movl	$50, %edi
	callq	_StallExecutionProcessor
	movq	_IDE_MAX_POLL_RETRIES@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	callq	_IDEReadStatus
	movq	_IDE_SR_BUSY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_24
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	$10, %edi
	callq	_StallExecutionProcessor
	incl	%ebx
	movl	(%r14), %eax
	cmpl	%eax, %ebx
	jl	LBB0_9
LBB0_11:
	cmpl	%eax, %ebx
	jge	LBB0_25
LBB0_12:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_18 Depth 2
	movl	%r13d, %r14d
	movq	_IDE_SECTOR_BUF_SZ@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	_FALSE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%r15d, %edi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_IDEReadBlock
	movslq	(%r13), %rax
	movslq	%ebx, %rbx
	addq	%rax, %rbx
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	%rsp, %rbx
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rsi
	movl	(%r13), %edx
	movl	%r15d, %edi
	callq	_IDEReadBlock
	movq	%rbx, %rsp
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	leal	1(%r14), %r13d
	cmpl	$0, (%r12)
	jle	LBB0_13
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r15d, %edi
	callq	_IDEReadStatus
	movq	_IDE_SR_BUSY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=2
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_18
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	_IDE_SR_ERR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_25
## %bb.21:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_IDE_SR_DRQ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_29
## %bb.22:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	-64(%rbp), %r13d                ## 4-byte Folded Reload
	jl	LBB0_13
## %bb.23:                              ##   in Loop: Header=BB0_13 Depth=1
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
LBB0_24:
	movq	_IDE_SR_ERR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_32
LBB0_25:
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	callq	_IDEWriteDriveControl
	movl	$50, %edi
	callq	_StallExecutionProcessor
	movl	%r15d, %edi
	callq	_IDEReadStatus
LBB0_26:
	movq	_FALSE@GOTPCREL(%rip), %rax
LBB0_27:
	movq	(%rax), %rax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_34
## %bb.28:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	%eax, %r14d
	jl	LBB0_31
## %bb.30:
	subl	%eax, %r13d
	leaq	L_.str.6(%rip), %rdi
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_TRACE
LBB0_31:
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	callq	_IDEWriteDriveControl
	movl	$50, %edi
	callq	_StallExecutionProcessor
	movl	%r15d, %edi
	callq	_IDEReadStatus
	movq	_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_32:
	movq	_IDE_SR_DRQ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_25
## %bb.33:
	movl	(%r14), %eax
	cmpl	%eax, %ebx
	jl	LBB0_12
	jmp	LBB0_25
LBB0_34:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_IDE_MAX_BUSY_RETRIES,4,2       ## @IDE_MAX_BUSY_RETRIES
	.comm	_IDE_SR_BUSY,4,2                ## @IDE_SR_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"status=0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"waited %d usecs for busy to clear\n"

L_.str.2:                               ## @.str.2
	.asciz	"Drive is BUSY for too long\n"

	.comm	_IDE_DH_FIXED,4,2               ## @IDE_DH_FIXED
	.comm	_IDE_DC_nIEN,4,2                ## @IDE_DC_nIEN
	.comm	_IDE_DH_LBA,4,2                 ## @IDE_DH_LBA
L_.str.3:                               ## @.str.3
	.asciz	"READ:DRV=%d:LBA=1:BLK=%d:SC=0x%x:CM=0x%x\n"

	.comm	_IDE_DH_DRV1,4,2                ## @IDE_DH_DRV1
L_.str.4:                               ## @.str.4
	.asciz	"READ:DRV=%d:LBA=0:CH=0x%x:CL=0x%x:HD=0x%x:SN=0x%x:SC=0x%x:CM=0x%x\n"

	.comm	_IDE_MAX_POLL_RETRIES,4,2       ## @IDE_MAX_POLL_RETRIES
	.comm	_IDE_SR_ERR,4,2                 ## @IDE_SR_ERR
	.comm	_IDE_SR_DRQ,4,2                 ## @IDE_SR_DRQ
	.comm	_IDE_SECTOR_BUF_SZ,4,2          ## @IDE_SECTOR_BUF_SZ
L_.str.5:                               ## @.str.5
	.asciz	"Buffer size exceeded!\n"

	.comm	_TRUE,8,3                       ## @TRUE
L_.str.6:                               ## @.str.6
	.asciz	"Read %lu sectors of junk!\n"

	.no_dead_strip	_XboxDiskPolledRead
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function XboxDiskPolledRead
_XboxDiskPolledRead:                    ; @XboxDiskPolledRead
	.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, #64
	mov	x23, x7
	stp	x6, x5, [x29, #-120]            ; 16-byte Folded Spill
	mov	x28, x4
	stur	x3, [x29, #-96]                 ; 8-byte Folded Spill
	stur	w2, [x29, #-124]                ; 4-byte Folded Spill
	stur	w1, [x29, #-100]                ; 4-byte Folded Spill
	mov	x19, x0
	mov	w27, #0
	ldr	x22, [x29, #24]
	ldr	w21, [x29, #16]
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _FALSE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FALSE@GOTPAGEOFF]
	stur	x8, [x29, #-88]
Lloh5:
	ldr	x25, [x9]
Lloh6:
	adrp	x24, _IDE_SR_BUSY@GOTPAGE
Lloh7:
	ldr	x24, [x24, _IDE_SR_BUSY@GOTPAGEOFF]
Lloh8:
	adrp	x26, _IDE_MAX_BUSY_RETRIES@GOTPAGE
Lloh9:
	ldr	x26, [x26, _IDE_MAX_BUSY_RETRIES@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_IDEReadStatus
	mov	x20, x0
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #10
	bl	_StallExecutionProcessor
	add	w27, w27, #1
	ldr	w8, [x26]
	cmp	w27, w8
	b.lt	LBB0_1
LBB0_3:
	str	x20, [sp, #-16]!
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	add	sp, sp, #16
	add	w8, w27, w27, lsl #2
	lsl	w8, w8, #1
	str	x8, [sp, #-16]!
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
	add	sp, sp, #16
	ldr	w8, [x26]
	cmp	w27, w8
	b.ge	LBB0_6
; %bb.4:
	mov	x20, x21
Lloh14:
	adrp	x8, _IDE_DH_FIXED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IDE_DH_FIXED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	orr	w1, w8, w23
	mov	x0, x19
	bl	_IDEWriteDriveHead
	mov	w0, #500
	bl	_StallExecutionProcessor
Lloh17:
	adrp	x8, _IDE_DC_nIEN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IDE_DC_nIEN@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldur	w0, [x29, #-100]                ; 4-byte Folded Reload
	bl	_IDEWriteDriveControl
	mov	w0, #500
	bl	_StallExecutionProcessor
Lloh20:
	adrp	x8, _IDE_DH_LBA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IDE_DH_LBA@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x8]
Lloh23:
	adrp	x8, _IDE_DH_DRV1@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IDE_DH_DRV1@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w23
	cset	w8, ne
	and	w9, w9, w23
	stur	x28, [x29, #-136]               ; 8-byte Folded Spill
	cbz	w9, LBB0_7
; %bb.5:
	ubfiz	w9, w23, #24, #4
	ldur	x21, [x29, #-112]               ; 8-byte Folded Reload
	add	w10, w28, w21, lsl #8
	ldur	x28, [x29, #-120]               ; 8-byte Folded Reload
	add	w10, w10, w28, lsl #16
	add	w9, w10, w9
	sub	sp, sp, #32
	str	x20, [sp, #24]
	ldur	x27, [x29, #-96]                ; 8-byte Folded Reload
	stp	x9, x27, [sp, #8]
	str	x8, [sp]
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_TRACE
	add	sp, sp, #32
	b	LBB0_8
LBB0_6:
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_WARN
	b	LBB0_28
LBB0_7:
	and	w9, w23, #0xf
	mov	x10, x20
	sub	sp, sp, #64
	str	x10, [sp, #48]
	ldur	x27, [x29, #-96]                ; 8-byte Folded Reload
	mov	x10, x27
	stp	x28, x10, [sp, #32]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	ldur	x28, [x29, #-120]               ; 8-byte Folded Reload
	stp	x8, x28, [sp]
Lloh30:
	adrp	x0, l_.str.4@PAGE
Lloh31:
	add	x0, x0, l_.str.4@PAGEOFF
	ldur	x21, [x29, #-112]               ; 8-byte Folded Reload
	stp	x21, x9, [sp, #16]
	bl	_TRACE
	add	sp, sp, #64
LBB0_8:
	mov	x0, x19
	ldur	w1, [x29, #-124]                ; 4-byte Folded Reload
	bl	_IDEWritePrecomp
	mov	x0, x19
	mov	x1, x27
	bl	_IDEWriteSectorCount
	mov	x0, x19
	ldur	x1, [x29, #-136]                ; 8-byte Folded Reload
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_IDEWriteSectorNum
	mov	x0, x19
	mov	x1, x28
	bl	_IDEWriteCylinderHigh
	mov	x0, x19
	mov	x1, x21
	bl	_IDEWriteCylinderLow
Lloh32:
	adrp	x8, _IDE_DH_FIXED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _IDE_DH_FIXED@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	orr	w1, w8, w23
	mov	x0, x19
	bl	_IDEWriteDriveHead
	mov	x0, x19
	mov	x1, x20
	bl	_IDEWriteCommand
	mov	w0, #50
	bl	_StallExecutionProcessor
Lloh35:
	adrp	x23, _IDE_MAX_POLL_RETRIES@GOTPAGE
Lloh36:
	ldr	x23, [x23, _IDE_MAX_POLL_RETRIES@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.9:
	mov	w20, #0
Lloh37:
	adrp	x28, _FALSE@GOTPAGE
Lloh38:
	ldr	x28, [x28, _FALSE@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_IDEReadStatus
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_26
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w0, #10
	bl	_StallExecutionProcessor
	add	w20, w20, #1
	ldr	w8, [x23]
	cmp	w20, w8
	b.lt	LBB0_10
; %bb.12:
	cmp	w20, w8
	b.ge	LBB0_27
	b	LBB0_14
LBB0_13:
	mov	w20, #0
Lloh39:
	adrp	x28, _FALSE@GOTPAGE
Lloh40:
	ldr	x28, [x28, _FALSE@GOTPAGEOFF]
	cmp	w20, w8
	b.ge	LBB0_27
LBB0_14:
	mov	w23, #0
Lloh41:
	adrp	x20, _IDE_SECTOR_BUF_SZ@GOTPAGE
Lloh42:
	ldr	x20, [x20, _IDE_SECTOR_BUF_SZ@GOTPAGEOFF]
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
	mov	x27, x23
	ldr	x8, [x28]
	ldr	w2, [x20]
	cmp	x25, x8
	b.ne	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x19
	mov	x1, x22
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_IDEReadBlock
	ldrsw	x8, [x20]
	add	x22, x8, w22, sxtw
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x21, sp
	lsl	x8, x2, #2
	mov	x9, x8
Lloh43:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh44:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x1, x9, x8
	mov	sp, x1
	ldr	w2, [x20]
	mov	x0, x19
	bl	_IDEReadBlock
	mov	sp, x21
LBB0_18:                                ;   in Loop: Header=BB0_15 Depth=1
	add	w23, w27, #1
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	w21, #0
LBB0_20:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	bl	_IDEReadStatus
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	add	w21, w21, #1
	ldr	w8, [x26]
	cmp	w21, w8
	b.lt	LBB0_20
	b	LBB0_15
LBB0_22:                                ;   in Loop: Header=BB0_15 Depth=1
Lloh45:
	adrp	x8, _IDE_SR_ERR@GOTPAGE
Lloh46:
	ldr	x8, [x8, _IDE_SR_ERR@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_27
; %bb.23:                               ;   in Loop: Header=BB0_15 Depth=1
Lloh48:
	adrp	x8, _IDE_SR_DRQ@GOTPAGE
Lloh49:
	ldr	x8, [x8, _IDE_SR_DRQ@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_31
; %bb.24:                               ;   in Loop: Header=BB0_15 Depth=1
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	cmp	w23, w8
	b.lt	LBB0_15
; %bb.25:                               ;   in Loop: Header=BB0_15 Depth=1
Lloh51:
	adrp	x0, l_.str.5@PAGE
Lloh52:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_TRACE
Lloh53:
	adrp	x8, _TRUE@GOTPAGE
Lloh54:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh55:
	ldr	x25, [x8]
	b	LBB0_15
LBB0_26:
Lloh56:
	adrp	x8, _IDE_SR_ERR@GOTPAGE
Lloh57:
	ldr	x8, [x8, _IDE_SR_ERR@GOTPAGEOFF]
Lloh58:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_34
LBB0_27:
	ldur	w0, [x29, #-100]                ; 4-byte Folded Reload
	mov	w1, #0
	bl	_IDEWriteDriveControl
	mov	w0, #50
	bl	_StallExecutionProcessor
	mov	x0, x19
	bl	_IDEReadStatus
LBB0_28:
Lloh59:
	adrp	x8, _FALSE@GOTPAGE
Lloh60:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_29:
	ldr	x0, [x8]
	ldur	x8, [x29, #-88]
Lloh61:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh62:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh63:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_36
; %bb.30:
	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_31:
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	cmp	w27, w8
	b.lt	LBB0_33
; %bb.32:
	sub	w8, w23, w8
	str	x8, [sp, #-16]!
Lloh64:
	adrp	x0, l_.str.6@PAGE
Lloh65:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_TRACE
	add	sp, sp, #16
LBB0_33:
	ldur	w0, [x29, #-100]                ; 4-byte Folded Reload
	mov	w1, #0
	bl	_IDEWriteDriveControl
	mov	w0, #50
	bl	_StallExecutionProcessor
	mov	x0, x19
	bl	_IDEReadStatus
Lloh66:
	adrp	x8, _TRUE@GOTPAGE
Lloh67:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_29
LBB0_34:
Lloh68:
	adrp	x8, _IDE_SR_DRQ@GOTPAGE
Lloh69:
	ldr	x8, [x8, _IDE_SR_DRQ@GOTPAGEOFF]
Lloh70:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_27
; %bb.35:
	ldr	w8, [x23]
	cmp	w20, w8
	b.lt	LBB0_14
	b	LBB0_27
LBB0_36:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_IDE_MAX_BUSY_RETRIES,4,2       ; @IDE_MAX_BUSY_RETRIES
	.comm	_IDE_SR_BUSY,4,2                ; @IDE_SR_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"status=0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"waited %d usecs for busy to clear\n"

l_.str.2:                               ; @.str.2
	.asciz	"Drive is BUSY for too long\n"

	.comm	_IDE_DH_FIXED,4,2               ; @IDE_DH_FIXED
	.comm	_IDE_DC_nIEN,4,2                ; @IDE_DC_nIEN
	.comm	_IDE_DH_LBA,4,2                 ; @IDE_DH_LBA
l_.str.3:                               ; @.str.3
	.asciz	"READ:DRV=%d:LBA=1:BLK=%d:SC=0x%x:CM=0x%x\n"

	.comm	_IDE_DH_DRV1,4,2                ; @IDE_DH_DRV1
l_.str.4:                               ; @.str.4
	.asciz	"READ:DRV=%d:LBA=0:CH=0x%x:CL=0x%x:HD=0x%x:SN=0x%x:SC=0x%x:CM=0x%x\n"

	.comm	_IDE_MAX_POLL_RETRIES,4,2       ; @IDE_MAX_POLL_RETRIES
	.comm	_IDE_SR_ERR,4,2                 ; @IDE_SR_ERR
	.comm	_IDE_SR_DRQ,4,2                 ; @IDE_SR_DRQ
	.comm	_IDE_SECTOR_BUF_SZ,4,2          ; @IDE_SECTOR_BUF_SZ
l_.str.5:                               ; @.str.5
	.asciz	"Buffer size exceeded!\n"

	.comm	_TRUE,8,3                       ; @TRUE
l_.str.6:                               ; @.str.6
	.asciz	"Read %lu sectors of junk!\n"

	.no_dead_strip	_XboxDiskPolledRead
.subsections_via_symbols
