	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ide_ata_error
_ide_ata_error:                         ## @ide_ata_error
	.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, %r12
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	movq	_ATA_BUSY@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_1
LBB0_3:
	movq	_ERROR_RESET@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	orl	%eax, (%r12)
LBB0_15:
	movq	_ATA_DRQ@GOTPCREL(%rip), %r13
	testl	%ebx, (%r13)
	je	LBB0_19
## %bb.16:
	movq	%r12, %rdi
	callq	_rq_data_dir
	movq	_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.17:
	movq	_IDE_HFLAG_ERROR_STOPS_FIFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r15)
	jne	LBB0_19
## %bb.18:
	movl	4(%r14), %ecx
	testl	%ecx, %ecx
	movl	$1, %edx
	cmovnel	%ecx, %edx
	movq	_SECTOR_SIZE@GOTPCREL(%rip), %rcx
	imull	(%rcx), %edx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_ide_pad_transfer
LBB0_19:
	movl	(%r12), %eax
	movq	_ERROR_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_21
## %bb.20:
	movq	%r12, %rdi
	callq	_blk_noretry_request
	testq	%rax, %rax
	je	LBB0_22
LBB0_21:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_ide_kill_rq
LBB0_29:
	movq	_ide_stopped@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_ATA_DF@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.2:
	movq	_IDE_DFLAG_NOWERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_3
LBB0_4:
	movq	_ATA_ERR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_15
## %bb.5:
	movq	_ATA_ABORTED@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jne	LBB0_8
## %bb.6:
	movq	_IDE_DFLAG_LBA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_15
## %bb.7:
	movq	8(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	movq	_ATA_CMD_INIT_DEV_PARAMS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_15
	jmp	LBB0_29
LBB0_22:
	movq	8(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	movl	(%r13), %ecx
	movq	_ATA_BUSY@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_23
## %bb.24:
	movq	_ERROR_RESET@GOTPCREL(%rip), %rcx
	movl	(%r12), %eax
	orl	(%rcx), %eax
	movl	%eax, (%r12)
	jmp	LBB0_25
LBB0_8:
	movq	_BAD_CRC@GOTPCREL(%rip), %rax
	movl	%ecx, %edx
	notl	%edx
	testl	%edx, (%rax)
	jne	LBB0_10
## %bb.9:
	incl	12(%r14)
	jmp	LBB0_15
LBB0_23:
	movl	(%r12), %eax
LBB0_25:
	movq	_ERROR_RESET@GOTPCREL(%rip), %rdx
	movl	%eax, %ecx
	notl	%ecx
	testl	%ecx, (%rdx)
	jne	LBB0_26
## %bb.30:
	incl	%eax
	movl	%eax, (%r12)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ide_do_reset                   ## TAILCALL
LBB0_26:
	movq	_ERROR_RECAL@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_28
## %bb.27:
	movq	_IDE_SFLAG_RECALIBRATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%r14)
LBB0_28:
	incl	%eax
	movl	%eax, (%r12)
	jmp	LBB0_29
LBB0_10:
	movq	_ATA_BBK@GOTPCREL(%rip), %rax
	movq	_ATA_UNC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	testl	%ecx, %edx
	je	LBB0_12
## %bb.11:
	movq	_ERROR_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	jmp	LBB0_15
LBB0_12:
	movq	_ATA_TRK0NF@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_15
## %bb.13:
	movq	_ERROR_RECAL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_BUSY,4,2                   ## @ATA_BUSY
	.comm	_ATA_DF,4,2                     ## @ATA_DF
	.comm	_IDE_DFLAG_NOWERR,4,2           ## @IDE_DFLAG_NOWERR
	.comm	_ERROR_RESET,4,2                ## @ERROR_RESET
	.comm	_ATA_ERR,4,2                    ## @ATA_ERR
	.comm	_ATA_ABORTED,4,2                ## @ATA_ABORTED
	.comm	_IDE_DFLAG_LBA,4,2              ## @IDE_DFLAG_LBA
	.comm	_ATA_CMD_INIT_DEV_PARAMS,4,2    ## @ATA_CMD_INIT_DEV_PARAMS
	.comm	_ide_stopped,4,2                ## @ide_stopped
	.comm	_BAD_CRC,4,2                    ## @BAD_CRC
	.comm	_ATA_BBK,4,2                    ## @ATA_BBK
	.comm	_ATA_UNC,4,2                    ## @ATA_UNC
	.comm	_ERROR_MAX,4,2                  ## @ERROR_MAX
	.comm	_ATA_TRK0NF,4,2                 ## @ATA_TRK0NF
	.comm	_ERROR_RECAL,4,2                ## @ERROR_RECAL
	.comm	_ATA_DRQ,4,2                    ## @ATA_DRQ
	.comm	_READ,8,3                       ## @READ
	.comm	_IDE_HFLAG_ERROR_STOPS_FIFO,4,2 ## @IDE_HFLAG_ERROR_STOPS_FIFO
	.comm	_SECTOR_SIZE,4,2                ## @SECTOR_SIZE
	.comm	_IDE_SFLAG_RECALIBRATE,4,2      ## @IDE_SFLAG_RECALIBRATE
	.no_dead_strip	_ide_ata_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ide_ata_error
_ide_ata_error:                         ; @ide_ata_error
	.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	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0, #16]
Lloh0:
	adrp	x23, _ATA_BUSY@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ATA_BUSY@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x24, _ERROR_MAX@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ERROR_MAX@GOTPAGEOFF]
	tst	w8, w2
	b.eq	LBB0_12
LBB0_1:
Lloh4:
	adrp	x8, _ERROR_RESET@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ERROR_RESET@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
LBB0_3:
	str	w8, [x19]
LBB0_4:
Lloh6:
	adrp	x25, _ATA_DRQ@GOTPAGE
Lloh7:
	ldr	x25, [x25, _ATA_DRQ@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w22
	b.eq	LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_rq_data_dir
Lloh8:
	adrp	x8, _READ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _READ@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.6:
	ldr	w8, [x21]
Lloh11:
	adrp	x9, _IDE_HFLAG_ERROR_STOPS_FIFO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IDE_HFLAG_ERROR_STOPS_FIFO@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.7:
	mov	x1, x0
	ldr	w8, [x20, #4]
	cmp	w8, #0
	csinc	w8, w8, wzr, ne
Lloh14:
	adrp	x9, _SECTOR_SIZE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SECTOR_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	mul	w2, w8, w9
	mov	x0, x20
	bl	_ide_pad_transfer
LBB0_8:
	ldr	w8, [x19]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ge	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_blk_noretry_request
	cbz	x0, LBB0_18
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	bl	_ide_kill_rq
LBB0_11:
Lloh17:
	adrp	x8, _ide_stopped@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ide_stopped@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	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
LBB0_12:
Lloh20:
	adrp	x8, _ATA_DF@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ATA_DF@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_14
; %bb.13:
	ldr	w8, [x20]
Lloh23:
	adrp	x9, _IDE_DFLAG_NOWERR@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IDE_DFLAG_NOWERR@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
LBB0_14:
Lloh26:
	adrp	x8, _ATA_ERR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ATA_ERR@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_4
; %bb.15:
Lloh29:
	adrp	x8, _ATA_ABORTED@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ATA_ABORTED@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmp	w8, w3
	b.ne	LBB0_20
; %bb.16:
	ldr	w8, [x20]
Lloh32:
	adrp	x9, _IDE_DFLAG_LBA@GOTPAGE
Lloh33:
	ldr	x9, [x9, _IDE_DFLAG_LBA@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.17:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	mov	x0, x21
	blr	x8
Lloh35:
	adrp	x8, _ATA_CMD_INIT_DEV_PARAMS@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ATA_CMD_INIT_DEV_PARAMS@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
	b	LBB0_11
LBB0_18:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	mov	x0, x21
	blr	x8
	ldr	w8, [x23]
	ldr	w9, [x25]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_22
; %bb.19:
Lloh38:
	adrp	x8, _ERROR_RESET@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ERROR_RESET@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_23
LBB0_20:
Lloh41:
	adrp	x8, _BAD_CRC@GOTPAGE
Lloh42:
	ldr	x8, [x8, _BAD_CRC@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	bics	wzr, w8, w3
	b.ne	LBB0_28
; %bb.21:
	ldr	w8, [x20, #12]
	add	w8, w8, #1
	str	w8, [x20, #12]
	b	LBB0_4
LBB0_22:
	ldr	w8, [x19]
LBB0_23:
Lloh44:
	adrp	x9, _ERROR_RESET@GOTPAGE
Lloh45:
	ldr	x9, [x9, _ERROR_RESET@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	bics	wzr, w9, w8
	b.ne	LBB0_25
; %bb.24:
	add	w8, w8, #1
	str	w8, [x19]
	mov	x0, x20
	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
	b	_ide_do_reset
LBB0_25:
Lloh47:
	adrp	x9, _ERROR_RECAL@GOTPAGE
Lloh48:
	ldr	x9, [x9, _ERROR_RECAL@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	bics	wzr, w9, w8
	b.ne	LBB0_27
; %bb.26:
Lloh50:
	adrp	x9, _IDE_SFLAG_RECALIBRATE@GOTPAGE
Lloh51:
	ldr	x9, [x9, _IDE_SFLAG_RECALIBRATE@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	ldr	w10, [x20, #8]
	orr	w9, w10, w9
	str	w9, [x20, #8]
LBB0_27:
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_11
LBB0_28:
Lloh53:
	adrp	x8, _ATA_BBK@GOTPAGE
Lloh54:
	ldr	x8, [x8, _ATA_BBK@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
Lloh56:
	adrp	x9, _ATA_UNC@GOTPAGE
Lloh57:
	ldr	x9, [x9, _ATA_UNC@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w3
	b.eq	LBB0_30
; %bb.29:
	ldr	w8, [x24]
	b	LBB0_3
LBB0_30:
Lloh59:
	adrp	x8, _ATA_TRK0NF@GOTPAGE
Lloh60:
	ldr	x8, [x8, _ATA_TRK0NF@GOTPAGEOFF]
Lloh61:
	ldr	w8, [x8]
	tst	w8, w3
	b.eq	LBB0_4
; %bb.31:
Lloh62:
	adrp	x8, _ERROR_RECAL@GOTPAGE
Lloh63:
	ldr	x8, [x8, _ERROR_RECAL@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh62, Lloh63
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_BUSY,4,2                   ; @ATA_BUSY
	.comm	_ATA_DF,4,2                     ; @ATA_DF
	.comm	_IDE_DFLAG_NOWERR,4,2           ; @IDE_DFLAG_NOWERR
	.comm	_ERROR_RESET,4,2                ; @ERROR_RESET
	.comm	_ATA_ERR,4,2                    ; @ATA_ERR
	.comm	_ATA_ABORTED,4,2                ; @ATA_ABORTED
	.comm	_IDE_DFLAG_LBA,4,2              ; @IDE_DFLAG_LBA
	.comm	_ATA_CMD_INIT_DEV_PARAMS,4,2    ; @ATA_CMD_INIT_DEV_PARAMS
	.comm	_ide_stopped,4,2                ; @ide_stopped
	.comm	_BAD_CRC,4,2                    ; @BAD_CRC
	.comm	_ATA_BBK,4,2                    ; @ATA_BBK
	.comm	_ATA_UNC,4,2                    ; @ATA_UNC
	.comm	_ERROR_MAX,4,2                  ; @ERROR_MAX
	.comm	_ATA_TRK0NF,4,2                 ; @ATA_TRK0NF
	.comm	_ERROR_RECAL,4,2                ; @ERROR_RECAL
	.comm	_ATA_DRQ,4,2                    ; @ATA_DRQ
	.comm	_READ,8,3                       ; @READ
	.comm	_IDE_HFLAG_ERROR_STOPS_FIFO,4,2 ; @IDE_HFLAG_ERROR_STOPS_FIFO
	.comm	_SECTOR_SIZE,4,2                ; @SECTOR_SIZE
	.comm	_IDE_SFLAG_RECALIBRATE,4,2      ; @IDE_SFLAG_RECALIBRATE
	.no_dead_strip	_ide_ata_error
.subsections_via_symbols
