	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_eh_analyze_tf
_ata_eh_analyze_tf:                     ## @ata_eh_analyze_tf
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	(%rsi), %eax
	movq	_ATA_BUSY@GOTPCREL(%rip), %rcx
	movq	_ATA_DRQ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_ATA_DRDY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, %edx
	andl	%eax, %edx
	cmpl	%ecx, %edx
	jne	LBB0_1
## %bb.2:
	movq	_ATA_ERR@GOTPCREL(%rip), %rcx
	movq	_ATA_DF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_3
## %bb.4:
	movl	4(%rsi), %ecx
	movq	_AC_ERR_DEV@GOTPCREL(%rip), %rdx
	movl	(%rbx), %eax
	orl	(%rdx), %eax
	movl	%eax, (%rbx)
	movq	24(%rbx), %rdi
	movl	(%rdi), %edx
	cmpl	$128, %edx
	je	LBB0_12
## %bb.5:
	cmpl	$129, %edx
	jne	LBB0_17
## %bb.6:
	movq	_ATA_ICRC@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_8
## %bb.7:
	movq	_AC_ERR_ATA_BUS@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, (%rbx)
LBB0_8:
	movq	_ATA_UNC@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_10
## %bb.9:
	movq	_AC_ERR_MEDIA@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, (%rbx)
LBB0_10:
	movq	_ATA_IDNF@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_17
## %bb.11:
	movq	_AC_ERR_INVALID@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_16
LBB0_1:
	movq	_AC_ERR_HSM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	jmp	LBB0_18
LBB0_3:
	xorl	%ecx, %ecx
	jmp	LBB0_19
LBB0_12:
	movq	32(%rbx), %rcx
	movq	_ATA_PFLAG_FROZEN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	jne	LBB0_17
## %bb.13:
	movq	16(%rbx), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %edx
	sarl	$4, %edx
	callq	_atapi_eh_request_sense
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	orl	(%rbx), %eax
LBB0_16:
	movl	%eax, (%rbx)
LBB0_17:
	movq	_AC_ERR_HSM@GOTPCREL(%rip), %rdx
	movq	_AC_ERR_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	_AC_ERR_ATA_BUS@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	andl	%eax, %ecx
	je	LBB0_19
LBB0_18:
	movq	_ATA_EH_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_19:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_14:
	movq	_ATA_QCFLAG_SENSE_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	movl	(%rbx), %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_BUSY,4,2                   ## @ATA_BUSY
	.comm	_ATA_DRQ,4,2                    ## @ATA_DRQ
	.comm	_ATA_DRDY,4,2                   ## @ATA_DRDY
	.comm	_AC_ERR_HSM,4,2                 ## @AC_ERR_HSM
	.comm	_ATA_EH_RESET,4,2               ## @ATA_EH_RESET
	.comm	_ATA_ERR,4,2                    ## @ATA_ERR
	.comm	_ATA_DF,4,2                     ## @ATA_DF
	.comm	_AC_ERR_DEV,4,2                 ## @AC_ERR_DEV
	.comm	_ATA_ICRC,4,2                   ## @ATA_ICRC
	.comm	_AC_ERR_ATA_BUS,4,2             ## @AC_ERR_ATA_BUS
	.comm	_ATA_UNC,4,2                    ## @ATA_UNC
	.comm	_AC_ERR_MEDIA,4,2               ## @AC_ERR_MEDIA
	.comm	_ATA_IDNF,4,2                   ## @ATA_IDNF
	.comm	_AC_ERR_INVALID,4,2             ## @AC_ERR_INVALID
	.comm	_ATA_PFLAG_FROZEN,4,2           ## @ATA_PFLAG_FROZEN
	.comm	_ATA_QCFLAG_SENSE_VALID,4,2     ## @ATA_QCFLAG_SENSE_VALID
	.comm	_AC_ERR_TIMEOUT,4,2             ## @AC_ERR_TIMEOUT
	.no_dead_strip	_ata_eh_analyze_tf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_eh_analyze_tf
_ata_eh_analyze_tf:                     ; @ata_eh_analyze_tf
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x9, _ATA_BUSY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_BUSY@GOTPAGEOFF]
	ldr	w8, [x1]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _ATA_DRQ@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ATA_DRQ@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh6:
	adrp	x10, _ATA_DRDY@GOTPAGE
Lloh7:
	ldr	x10, [x10, _ATA_DRDY@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w9, w10
	and	w9, w9, w8
	cmp	w9, w10
	b.ne	LBB0_10
; %bb.1:
Lloh9:
	adrp	x9, _ATA_ERR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ATA_ERR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _ATA_DF@GOTPAGE
Lloh13:
	ldr	x10, [x10, _ATA_DF@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_11
; %bb.2:
	ldr	w9, [x1, #4]
Lloh15:
	adrp	x8, _AC_ERR_DEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AC_ERR_DEV@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w10, [x19]
	orr	w8, w10, w8
	str	w8, [x19]
	ldr	x0, [x19, #24]
	ldr	w10, [x0]
Lloh18:
	adrp	x20, _AC_ERR_ATA_BUS@GOTPAGE
Lloh19:
	ldr	x20, [x20, _AC_ERR_ATA_BUS@GOTPAGEOFF]
	cmp	w10, #128
	b.eq	LBB0_12
; %bb.3:
	cmp	w10, #129
	b.ne	LBB0_16
; %bb.4:
Lloh20:
	adrp	x10, _ATA_ICRC@GOTPAGE
Lloh21:
	ldr	x10, [x10, _ATA_ICRC@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.5:
	ldr	w10, [x20]
	orr	w8, w10, w8
	str	w8, [x19]
LBB0_6:
Lloh23:
	adrp	x10, _ATA_UNC@GOTPAGE
Lloh24:
	ldr	x10, [x10, _ATA_UNC@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_8
; %bb.7:
Lloh26:
	adrp	x10, _AC_ERR_MEDIA@GOTPAGE
Lloh27:
	ldr	x10, [x10, _AC_ERR_MEDIA@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
	orr	w8, w8, w10
	str	w8, [x19]
LBB0_8:
Lloh29:
	adrp	x10, _ATA_IDNF@GOTPAGE
Lloh30:
	ldr	x10, [x10, _ATA_IDNF@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_16
; %bb.9:
Lloh32:
	adrp	x9, _AC_ERR_INVALID@GOTPAGE
Lloh33:
	ldr	x9, [x9, _AC_ERR_INVALID@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w8, w8, w9
	b	LBB0_15
LBB0_10:
Lloh35:
	adrp	x8, _AC_ERR_HSM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AC_ERR_HSM@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
Lloh38:
	adrp	x8, _ATA_EH_RESET@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ATA_EH_RESET@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	b	LBB0_17
LBB0_11:
	mov	w0, #0
	b	LBB0_17
LBB0_12:
	ldr	x9, [x19, #32]
	ldr	w9, [x9]
Lloh41:
	adrp	x10, _ATA_PFLAG_FROZEN@GOTPAGE
Lloh42:
	ldr	x10, [x10, _ATA_PFLAG_FROZEN@GOTPAGEOFF]
Lloh43:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_16
; %bb.13:
	ldr	x8, [x19, #16]
	ldr	w1, [x8]
	ldr	w8, [x19, #8]
	asr	w2, w8, #4
	bl	_atapi_eh_request_sense
	cbz	w0, LBB0_18
; %bb.14:
	ldr	w8, [x19]
	orr	w8, w8, w0
LBB0_15:
	str	w8, [x19]
LBB0_16:
Lloh44:
	adrp	x9, _AC_ERR_HSM@GOTPAGE
Lloh45:
	ldr	x9, [x9, _AC_ERR_HSM@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
Lloh47:
	adrp	x10, _AC_ERR_TIMEOUT@GOTPAGE
Lloh48:
	ldr	x10, [x10, _AC_ERR_TIMEOUT@GOTPAGEOFF]
Lloh49:
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldr	w10, [x20]
	orr	w9, w9, w10
Lloh50:
	adrp	x10, _ATA_EH_RESET@GOTPAGE
Lloh51:
	ldr	x10, [x10, _ATA_EH_RESET@GOTPAGEOFF]
Lloh52:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w0, wzr, w10, eq
LBB0_17:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_18:
Lloh53:
	adrp	x8, _ATA_QCFLAG_SENSE_VALID@GOTPAGE
Lloh54:
	ldr	x8, [x8, _ATA_QCFLAG_SENSE_VALID@GOTPAGEOFF]
Lloh55:
	ldr	w9, [x8]
	ldp	w8, w10, [x19]
	orr	w9, w10, w9
	str	w9, [x19, #4]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.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	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_BUSY,4,2                   ; @ATA_BUSY
	.comm	_ATA_DRQ,4,2                    ; @ATA_DRQ
	.comm	_ATA_DRDY,4,2                   ; @ATA_DRDY
	.comm	_AC_ERR_HSM,4,2                 ; @AC_ERR_HSM
	.comm	_ATA_EH_RESET,4,2               ; @ATA_EH_RESET
	.comm	_ATA_ERR,4,2                    ; @ATA_ERR
	.comm	_ATA_DF,4,2                     ; @ATA_DF
	.comm	_AC_ERR_DEV,4,2                 ; @AC_ERR_DEV
	.comm	_ATA_ICRC,4,2                   ; @ATA_ICRC
	.comm	_AC_ERR_ATA_BUS,4,2             ; @AC_ERR_ATA_BUS
	.comm	_ATA_UNC,4,2                    ; @ATA_UNC
	.comm	_AC_ERR_MEDIA,4,2               ; @AC_ERR_MEDIA
	.comm	_ATA_IDNF,4,2                   ; @ATA_IDNF
	.comm	_AC_ERR_INVALID,4,2             ; @AC_ERR_INVALID
	.comm	_ATA_PFLAG_FROZEN,4,2           ; @ATA_PFLAG_FROZEN
	.comm	_ATA_QCFLAG_SENSE_VALID,4,2     ; @ATA_QCFLAG_SENSE_VALID
	.comm	_AC_ERR_TIMEOUT,4,2             ; @AC_ERR_TIMEOUT
	.no_dead_strip	_ata_eh_analyze_tf
.subsections_via_symbols
