	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_eh_link_autopsy
_ata_eh_link_autopsy:                   ## @ata_eh_link_autopsy
	.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
	movq	%rdi, %r12
	movq	48(%rdi), %r14
	leaq	L_.str(%rip), %rdi
	callq	_DPRINTK
	movq	_ATA_EHI_NO_AUTOPSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r12)
	jne	LBB0_47
## %bb.1:
	movq	_SCR_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	callq	_sata_scr_read
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	je	LBB0_5
## %bb.4:
	movq	_ATA_ALL_DEVICES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 40(%r12)
	movq	_ATA_EH_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%r12)
	movq	_AC_ERR_OTHER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r12)
	jmp	LBB0_5
LBB0_2:
	movl	-48(%rbp), %eax
	orl	%eax, 44(%r12)
	movq	%r12, %rdi
	callq	_ata_eh_analyze_serror
LBB0_5:
	movq	%r12, %rdi
	callq	_ata_eh_analyze_ncq_error
	movl	16(%r12), %r15d
	movq	_AC_ERR_OTHER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%r15d, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, 16(%r12)
	movl	%eax, %r15d
LBB0_7:
	movq	_ATA_MAX_QUEUE@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.9:
	xorl	%ebx, %ebx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_10
LBB0_21:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%r13), %rcx
	movq	%rcx, 32(%r12)
	orl	%r15d, %eax
LBB0_22:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%ecx, %ecx
LBB0_25:                                ##   in Loop: Header=BB0_10 Depth=1
	orl	%ecx, -44(%rbp)                 ## 4-byte Folded Spill
	movl	%eax, %r15d
LBB0_26:                                ##   in Loop: Header=BB0_10 Depth=1
	incl	%ebx
	movq	_ATA_MAX_QUEUE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_27
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	___ata_qc_from_tag
	movq	%rax, %r13
	movq	_ATA_QCFLAG_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_26
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%r13), %rdi
	callq	_ata_dev_phys_link
	cmpq	%r12, %rax
	jne	LBB0_26
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	16(%r12), %eax
	orl	%eax, 4(%r13)
	movq	%r13, %rsi
	addq	$16, %rsi
	movq	%r13, %rdi
	callq	_ata_eh_analyze_tf
	orl	%eax, 12(%r12)
	movl	4(%r13), %eax
	movq	_AC_ERR_ATA_BUS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_AC_ERR_MEDIA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_AC_ERR_DEV@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_AC_ERR_INVALID@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 4(%r13)
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_AC_ERR_OTHER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %ecx
	notl	%ecx
	andl	%eax, %ecx
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%ecx, 4(%r13)
	movl	%ecx, %eax
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	(%r13), %ecx
	movq	_ATA_QCFLAG_SENSE_VALID@GOTPCREL(%rip), %rsi
	testl	%ecx, (%rsi)
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_AC_ERR_DEV@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	notl	%edx
	andl	%edx, %eax
	movl	%eax, 4(%r13)
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_ATA_QCFLAG_IO@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_AC_ERR_INVALID@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_AC_ERR_DEV@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	je	LBB0_21
LBB0_23:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_ATA_QCFLAG_RETRY@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, (%r13)
	movq	_ATA_QCFLAG_IO@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	movq	8(%r13), %rdx
	movq	%rdx, 32(%r12)
	orl	%r15d, %eax
	testl	%ecx, %ecx
	je	LBB0_22
## %bb.24:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_ATA_EFLAG_IS_IO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_25
LBB0_8:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_27:
	movq	_ATA_PFLAG_FROZEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ATA_EH_RESET@GOTPCREL(%rip), %rax
	testl	%ecx, (%r14)
	jne	LBB0_33
## %bb.28:
	movq	_AC_ERR_HSM@GOTPCREL(%rip), %rcx
	movq	_AC_ERR_TIMEOUT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%r15d, %edx
	jne	LBB0_33
## %bb.29:
	movq	_ATA_EFLAG_IS_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ATA_EH_REVALIDATE@GOTPCREL(%rip), %rax
	testl	%ecx, -44(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_31
## %bb.30:
	testl	%r15d, %r15d
	je	LBB0_31
LBB0_33:
	movl	(%rax), %eax
	orl	%eax, 12(%r12)
LBB0_34:
	movq	32(%r12), %rax
	testq	%rax, %rax
	je	LBB0_36
## %bb.35:
	movq	_ATA_EH_PERDEV_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	12(%r12), %edx
	movq	24(%r12), %rsi
	movq	(%rax), %rax
	orl	%edx, (%rsi,%rax,4)
	movl	(%rcx), %eax
	notl	%eax
	andl	%eax, 12(%r12)
LBB0_36:
	movq	_AC_ERR_TIMEOUT@GOTPCREL(%rip), %rbx
	testl	%r15d, (%rbx)
	je	LBB0_39
## %bb.37:
	movq	%r12, %rdi
	callq	_ata_is_host_link
	testl	%eax, %eax
	jne	LBB0_39
## %bb.38:
	movl	(%rbx), %eax
	orl	%eax, 4(%r14)
LBB0_39:
	movq	32(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_40
LBB0_43:
	movq	_ATA_DFLAG_DUBIOUS_XFER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	8(%rdi), %esi
	je	LBB0_45
## %bb.44:
	movq	_ATA_EFLAG_DUBIOUS_XFER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_45:
	orl	-44(%rbp), %esi                 ## 4-byte Folded Reload
	movl	%r15d, %edx
	callq	_ata_eh_speed_down
	orl	%eax, 12(%r12)
	jmp	LBB0_46
LBB0_40:
	movq	%r12, %rdi
	callq	_ata_link_max_devices
	cmpl	$1, %eax
	jne	LBB0_46
## %bb.41:
	movq	(%r12), %rdi
	callq	_ata_dev_enabled
	testq	%rax, %rax
	je	LBB0_46
## %bb.42:
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	jne	LBB0_43
LBB0_46:
	leaq	L_.str.1(%rip), %rdi
	callq	_DPRINTK
LBB0_47:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	testl	%ecx, -44(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_34
## %bb.32:
	movq	_AC_ERR_DEV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	testl	%ecx, %r15d
	jne	LBB0_33
	jmp	LBB0_34
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ENTER\n"

	.comm	_ATA_EHI_NO_AUTOPSY,4,2         ## @ATA_EHI_NO_AUTOPSY
	.comm	_SCR_ERROR,4,2                  ## @SCR_ERROR
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_ATA_ALL_DEVICES,4,2            ## @ATA_ALL_DEVICES
	.comm	_ATA_EH_RESET,4,2               ## @ATA_EH_RESET
	.comm	_AC_ERR_OTHER,4,2               ## @AC_ERR_OTHER
	.comm	_ATA_MAX_QUEUE,4,2              ## @ATA_MAX_QUEUE
	.comm	_ATA_QCFLAG_FAILED,4,2          ## @ATA_QCFLAG_FAILED
	.comm	_AC_ERR_ATA_BUS,4,2             ## @AC_ERR_ATA_BUS
	.comm	_AC_ERR_DEV,4,2                 ## @AC_ERR_DEV
	.comm	_AC_ERR_MEDIA,4,2               ## @AC_ERR_MEDIA
	.comm	_AC_ERR_INVALID,4,2             ## @AC_ERR_INVALID
	.comm	_ATA_QCFLAG_SENSE_VALID,4,2     ## @ATA_QCFLAG_SENSE_VALID
	.comm	_ATA_QCFLAG_IO,4,2              ## @ATA_QCFLAG_IO
	.comm	_ATA_QCFLAG_RETRY,4,2           ## @ATA_QCFLAG_RETRY
	.comm	_ATA_EFLAG_IS_IO,4,2            ## @ATA_EFLAG_IS_IO
	.comm	_ATA_PFLAG_FROZEN,4,2           ## @ATA_PFLAG_FROZEN
	.comm	_AC_ERR_HSM,4,2                 ## @AC_ERR_HSM
	.comm	_AC_ERR_TIMEOUT,4,2             ## @AC_ERR_TIMEOUT
	.comm	_ATA_EH_REVALIDATE,4,2          ## @ATA_EH_REVALIDATE
	.comm	_ATA_EH_PERDEV_MASK,4,2         ## @ATA_EH_PERDEV_MASK
	.comm	_ATA_DFLAG_DUBIOUS_XFER,4,2     ## @ATA_DFLAG_DUBIOUS_XFER
	.comm	_ATA_EFLAG_DUBIOUS_XFER,4,2     ## @ATA_EFLAG_DUBIOUS_XFER
L_.str.1:                               ## @.str.1
	.asciz	"EXIT\n"

	.no_dead_strip	_ata_eh_link_autopsy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_eh_link_autopsy
_ata_eh_link_autopsy:                   ; @ata_eh_link_autopsy
	.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	x19, x0
	ldr	x20, [x0, #48]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTK
	ldr	w8, [x19, #8]
Lloh2:
	adrp	x9, _ATA_EHI_NO_AUTOPSY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ATA_EHI_NO_AUTOPSY@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_43
; %bb.1:
Lloh5:
	adrp	x8, _SCR_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SCR_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_sata_scr_read
	cbz	w0, LBB0_4
; %bb.2:
Lloh8:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_5
; %bb.3:
Lloh11:
	adrp	x8, _ATA_ALL_DEVICES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATA_ALL_DEVICES@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x19, #40]
	orr	w8, w9, w8
	str	w8, [x19, #40]
Lloh14:
	adrp	x8, _ATA_EH_RESET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ATA_EH_RESET@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldp	w9, w10, [x19, #12]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _AC_ERR_OTHER@GOTPAGE
Lloh18:
	ldr	x9, [x9, _AC_ERR_OTHER@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w9, w10, w9
	stp	w8, w9, [x19, #12]
	b	LBB0_5
LBB0_4:
	ldr	w8, [sp, #12]
	ldr	w9, [x19, #44]
	orr	w8, w9, w8
	str	w8, [x19, #44]
	mov	x0, x19
	bl	_ata_eh_analyze_serror
LBB0_5:
	mov	x0, x19
	bl	_ata_eh_analyze_ncq_error
	ldr	w8, [x19, #16]
Lloh20:
	adrp	x9, _AC_ERR_OTHER@GOTPAGE
Lloh21:
	ldr	x9, [x9, _AC_ERR_OTHER@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	bics	w21, w8, w9
	b.eq	LBB0_7
; %bb.6:
	str	w21, [x19, #16]
	b	LBB0_8
LBB0_7:
	mov	x21, x8
LBB0_8:
Lloh23:
	adrp	x26, _ATA_MAX_QUEUE@GOTPAGE
Lloh24:
	ldr	x26, [x26, _ATA_MAX_QUEUE@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_27
; %bb.9:
	mov	w22, #0
	mov	w24, #0
Lloh25:
	adrp	x27, _ATA_QCFLAG_FAILED@GOTPAGE
Lloh26:
	ldr	x27, [x27, _ATA_QCFLAG_FAILED@GOTPAGEOFF]
Lloh27:
	adrp	x28, _ATA_QCFLAG_IO@GOTPAGE
Lloh28:
	ldr	x28, [x28, _ATA_QCFLAG_IO@GOTPAGEOFF]
Lloh29:
	adrp	x25, _AC_ERR_DEV@GOTPAGE
Lloh30:
	ldr	x25, [x25, _AC_ERR_DEV@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x9, [x23, #8]
	str	x9, [x19, #32]
	orr	w21, w8, w21
LBB0_11:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	w8, #0
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	orr	w24, w8, w24
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	w22, w22, #1
	ldr	w8, [x26]
	cmp	w22, w8
	b.ge	LBB0_28
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	___ata_qc_from_tag
	ldr	w8, [x0]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x23, x0
	ldr	x0, [x0, #8]
	bl	_ata_dev_phys_link
	cmp	x0, x19
	b.ne	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x19, #16]
	ldr	w9, [x23, #4]
	orr	w8, w9, w8
	str	w8, [x23, #4]
	add	x1, x23, #16
	mov	x0, x23
	bl	_ata_eh_analyze_tf
	ldr	w8, [x19, #12]
	orr	w8, w8, w0
	str	w8, [x19, #12]
	ldr	w8, [x23, #4]
Lloh31:
	adrp	x9, _AC_ERR_ATA_BUS@GOTPAGE
Lloh32:
	ldr	x9, [x9, _AC_ERR_ATA_BUS@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w9, [x25]
Lloh34:
	adrp	x10, _AC_ERR_MEDIA@GOTPAGE
Lloh35:
	ldr	x10, [x10, _AC_ERR_MEDIA@GOTPAGEOFF]
Lloh36:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh37:
	adrp	x10, _AC_ERR_INVALID@GOTPAGE
Lloh38:
	ldr	x10, [x10, _AC_ERR_INVALID@GOTPAGEOFF]
Lloh39:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bic	w8, w8, w9
	str	w8, [x23, #4]
LBB0_18:                                ;   in Loop: Header=BB0_14 Depth=1
Lloh40:
	adrp	x9, _AC_ERR_OTHER@GOTPAGE
Lloh41:
	ldr	x9, [x9, _AC_ERR_OTHER@GOTPAGEOFF]
Lloh42:
	ldr	w10, [x9]
	bics	w9, w8, w10
	b.eq	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_14 Depth=1
	str	w9, [x23, #4]
	mov	x8, x9
LBB0_20:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	w9, [x23]
Lloh43:
	adrp	x11, _ATA_QCFLAG_SENSE_VALID@GOTPAGE
Lloh44:
	ldr	x11, [x11, _ATA_QCFLAG_SENSE_VALID@GOTPAGEOFF]
Lloh45:
	ldr	w11, [x11]
	tst	w11, w9
	b.eq	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w11, [x25]
	orr	w10, w11, w10
	bic	w8, w8, w10
	str	w8, [x23, #4]
LBB0_22:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	w10, [x28]
	tst	w10, w9
	b.ne	LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_14 Depth=1
Lloh46:
	adrp	x10, _AC_ERR_INVALID@GOTPAGE
Lloh47:
	ldr	x10, [x10, _AC_ERR_INVALID@GOTPAGEOFF]
Lloh48:
	ldr	w10, [x10]
	tst	w10, w8
	b.ne	LBB0_10
; %bb.24:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w10, [x25]
	cmp	w8, w10
	b.eq	LBB0_10
LBB0_25:                                ;   in Loop: Header=BB0_14 Depth=1
Lloh49:
	adrp	x10, _ATA_QCFLAG_RETRY@GOTPAGE
Lloh50:
	ldr	x10, [x10, _ATA_QCFLAG_RETRY@GOTPAGEOFF]
Lloh51:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x23]
	ldr	w10, [x28]
	ldr	x11, [x23, #8]
	str	x11, [x19, #32]
	orr	w21, w8, w21
	tst	w10, w9
	b.eq	LBB0_11
; %bb.26:                               ;   in Loop: Header=BB0_14 Depth=1
Lloh52:
	adrp	x8, _ATA_EFLAG_IS_IO@GOTPAGE
Lloh53:
	ldr	x8, [x8, _ATA_EFLAG_IS_IO@GOTPAGEOFF]
Lloh54:
	ldr	w8, [x8]
	b	LBB0_12
LBB0_27:
	mov	w24, #0
LBB0_28:
	ldr	w8, [x20]
Lloh55:
	adrp	x9, _ATA_PFLAG_FROZEN@GOTPAGE
Lloh56:
	ldr	x9, [x9, _ATA_PFLAG_FROZEN@GOTPAGEOFF]
Lloh57:
	ldr	w9, [x9]
Lloh58:
	adrp	x22, _AC_ERR_TIMEOUT@GOTPAGE
Lloh59:
	ldr	x22, [x22, _AC_ERR_TIMEOUT@GOTPAGEOFF]
	tst	w9, w8
	b.ne	LBB0_30
; %bb.29:
Lloh60:
	adrp	x8, _AC_ERR_HSM@GOTPAGE
Lloh61:
	ldr	x8, [x8, _AC_ERR_HSM@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w8, w9, w8
	tst	w8, w21
	b.eq	LBB0_44
LBB0_30:
Lloh63:
	adrp	x8, _ATA_EH_RESET@GOTPAGE
Lloh64:
	ldr	x8, [x8, _ATA_EH_RESET@GOTPAGEOFF]
LBB0_31:
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	orr	w8, w9, w8
	str	w8, [x19, #12]
LBB0_32:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_34
; %bb.33:
	ldr	w9, [x19, #12]
Lloh65:
	adrp	x10, _ATA_EH_PERDEV_MASK@GOTPAGE
Lloh66:
	ldr	x10, [x10, _ATA_EH_PERDEV_MASK@GOTPAGEOFF]
	ldr	w11, [x10]
	and	w9, w11, w9
	ldr	x11, [x19, #24]
	ldr	x8, [x8]
	lsl	x8, x8, #2
	ldr	w12, [x11, x8]
	orr	w9, w12, w9
	str	w9, [x11, x8]
	ldr	w8, [x10]
	ldr	w9, [x19, #12]
	bic	w8, w9, w8
	str	w8, [x19, #12]
LBB0_34:
	ldr	w8, [x22]
	tst	w8, w21
	b.eq	LBB0_36
; %bb.35:
	mov	x0, x19
	bl	_ata_is_host_link
	cbz	w0, LBB0_38
LBB0_36:
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_39
LBB0_37:
	ldr	w8, [x0, #8]
Lloh67:
	adrp	x9, _ATA_DFLAG_DUBIOUS_XFER@GOTPAGE
Lloh68:
	ldr	x9, [x9, _ATA_DFLAG_DUBIOUS_XFER@GOTPAGEOFF]
Lloh69:
	ldr	w9, [x9]
Lloh70:
	adrp	x10, _ATA_EFLAG_DUBIOUS_XFER@GOTPAGE
Lloh71:
	ldr	x10, [x10, _ATA_EFLAG_DUBIOUS_XFER@GOTPAGEOFF]
Lloh72:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w8, wzr, w10, eq
	orr	w1, w8, w24
	mov	x2, x21
	bl	_ata_eh_speed_down
	ldr	w8, [x19, #12]
	orr	w8, w8, w0
	str	w8, [x19, #12]
	b	LBB0_42
LBB0_38:
	ldr	w8, [x22]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	ldr	x0, [x19, #32]
	cbnz	x0, LBB0_37
LBB0_39:
	mov	x0, x19
	bl	_ata_link_max_devices
	cmp	w0, #1
	b.ne	LBB0_42
; %bb.40:
	ldr	x0, [x19]
	bl	_ata_dev_enabled
	cbz	x0, LBB0_42
; %bb.41:
	ldr	x0, [x19]
	cbnz	x0, LBB0_37
LBB0_42:
Lloh73:
	adrp	x0, l_.str.1@PAGE
Lloh74:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPRINTK
LBB0_43:
	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
LBB0_44:
Lloh75:
	adrp	x8, _ATA_EFLAG_IS_IO@GOTPAGE
Lloh76:
	ldr	x8, [x8, _ATA_EFLAG_IS_IO@GOTPAGEOFF]
Lloh77:
	ldr	w8, [x8]
	and	w8, w8, w24
	cmp	w8, #0
	ccmp	w21, #0, #4, ne
	b.ne	LBB0_47
; %bb.45:
	cbnz	w8, LBB0_32
; %bb.46:
Lloh78:
	adrp	x8, _AC_ERR_DEV@GOTPAGE
Lloh79:
	ldr	x8, [x8, _AC_ERR_DEV@GOTPAGEOFF]
Lloh80:
	ldr	w8, [x8]
	bics	wzr, w21, w8
	b.eq	LBB0_32
LBB0_47:
Lloh81:
	adrp	x8, _ATA_EH_REVALIDATE@GOTPAGE
Lloh82:
	ldr	x8, [x8, _ATA_EH_REVALIDATE@GOTPAGEOFF]
	b	LBB0_31
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpAdd	Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGot	Lloh81, Lloh82
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ENTER\n"

	.comm	_ATA_EHI_NO_AUTOPSY,4,2         ; @ATA_EHI_NO_AUTOPSY
	.comm	_SCR_ERROR,4,2                  ; @SCR_ERROR
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_ATA_ALL_DEVICES,4,2            ; @ATA_ALL_DEVICES
	.comm	_ATA_EH_RESET,4,2               ; @ATA_EH_RESET
	.comm	_AC_ERR_OTHER,4,2               ; @AC_ERR_OTHER
	.comm	_ATA_MAX_QUEUE,4,2              ; @ATA_MAX_QUEUE
	.comm	_ATA_QCFLAG_FAILED,4,2          ; @ATA_QCFLAG_FAILED
	.comm	_AC_ERR_ATA_BUS,4,2             ; @AC_ERR_ATA_BUS
	.comm	_AC_ERR_DEV,4,2                 ; @AC_ERR_DEV
	.comm	_AC_ERR_MEDIA,4,2               ; @AC_ERR_MEDIA
	.comm	_AC_ERR_INVALID,4,2             ; @AC_ERR_INVALID
	.comm	_ATA_QCFLAG_SENSE_VALID,4,2     ; @ATA_QCFLAG_SENSE_VALID
	.comm	_ATA_QCFLAG_IO,4,2              ; @ATA_QCFLAG_IO
	.comm	_ATA_QCFLAG_RETRY,4,2           ; @ATA_QCFLAG_RETRY
	.comm	_ATA_EFLAG_IS_IO,4,2            ; @ATA_EFLAG_IS_IO
	.comm	_ATA_PFLAG_FROZEN,4,2           ; @ATA_PFLAG_FROZEN
	.comm	_AC_ERR_HSM,4,2                 ; @AC_ERR_HSM
	.comm	_AC_ERR_TIMEOUT,4,2             ; @AC_ERR_TIMEOUT
	.comm	_ATA_EH_REVALIDATE,4,2          ; @ATA_EH_REVALIDATE
	.comm	_ATA_EH_PERDEV_MASK,4,2         ; @ATA_EH_PERDEV_MASK
	.comm	_ATA_DFLAG_DUBIOUS_XFER,4,2     ; @ATA_DFLAG_DUBIOUS_XFER
	.comm	_ATA_EFLAG_DUBIOUS_XFER,4,2     ; @ATA_EFLAG_DUBIOUS_XFER
l_.str.1:                               ; @.str.1
	.asciz	"EXIT\n"

	.no_dead_strip	_ata_eh_link_autopsy
.subsections_via_symbols
