	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ide_atapi_error
_ide_atapi_error:                       ## @ide_atapi_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movq	_ATA_BUSY@GOTPCREL(%rip), %r12
	testl	%edx, (%r12)
	je	LBB0_1
LBB0_3:
	movq	_ERROR_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
LBB0_4:
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	movq	_ATA_DRQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%r12), %ecx
	testl	%eax, %ecx
	je	LBB0_6
## %bb.5:
	movq	(%rbx), %rax
	movq	_ATA_CMD_IDLEIMMEDIATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	callq	*8(%rax)
LBB0_6:
	movl	(%r15), %eax
	movq	_ERROR_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_7
## %bb.8:
	movq	_ERROR_RESET@GOTPCREL(%rip), %rcx
	movl	%eax, %edx
	notl	%edx
	andl	(%rcx), %edx
	incl	%eax
	movl	%eax, (%r15)
	testl	%edx, %edx
	jne	LBB0_9
## %bb.10:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ide_do_reset                   ## TAILCALL
LBB0_7:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ide_kill_rq
LBB0_9:
	movq	_ide_stopped@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_ATA_DF@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_4
## %bb.2:
	movq	_IDE_DFLAG_NOWERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	jne	LBB0_4
	jmp	LBB0_3
	.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_DRQ,4,2                    ## @ATA_DRQ
	.comm	_ATA_CMD_IDLEIMMEDIATE,4,2      ## @ATA_CMD_IDLEIMMEDIATE
	.comm	_ERROR_MAX,4,2                  ## @ERROR_MAX
	.comm	_ide_stopped,4,2                ## @ide_stopped
	.no_dead_strip	_ide_atapi_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ide_atapi_error
_ide_atapi_error:                       ; @ide_atapi_error
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x23, _ATA_BUSY@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ATA_BUSY@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x22, _ERROR_RESET@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ERROR_RESET@GOTPAGEOFF]
	tst	w8, w2
	b.eq	LBB0_9
LBB0_1:
	ldr	w8, [x22]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_2:
	ldr	x8, [x21]
	ldr	x8, [x8]
	mov	x0, x21
	blr	x8
	ldr	w8, [x23]
Lloh4:
	adrp	x9, _ATA_DRQ@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ATA_DRQ@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
Lloh7:
	adrp	x9, _ATA_CMD_IDLEIMMEDIATE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ATA_CMD_IDLEIMMEDIATE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x9]
	mov	x0, x21
	blr	x8
LBB0_4:
	ldr	w8, [x20]
Lloh10:
	adrp	x9, _ERROR_MAX@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ERROR_MAX@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_7
; %bb.5:
	ldr	w9, [x22]
	add	w10, w8, #1
	str	w10, [x20]
	bics	wzr, w9, w8
	b.ne	LBB0_8
; %bb.6:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ide_do_reset
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_ide_kill_rq
LBB0_8:
Lloh13:
	adrp	x8, _ide_stopped@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ide_stopped@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh16:
	adrp	x8, _ATA_DF@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ATA_DF@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_2
; %bb.10:
	ldr	w8, [x19]
Lloh19:
	adrp	x9, _IDE_DFLAG_NOWERR@GOTPAGE
Lloh20:
	ldr	x9, [x9, _IDE_DFLAG_NOWERR@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
	b	LBB0_1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.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_DRQ,4,2                    ; @ATA_DRQ
	.comm	_ATA_CMD_IDLEIMMEDIATE,4,2      ; @ATA_CMD_IDLEIMMEDIATE
	.comm	_ERROR_MAX,4,2                  ; @ERROR_MAX
	.comm	_ide_stopped,4,2                ; @ide_stopped
	.no_dead_strip	_ide_atapi_error
.subsections_via_symbols
