	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_eh_analyze_serror
_ata_eh_analyze_serror:                 ## @ata_eh_analyze_serror
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	4(%rdi), %edx
	movq	_SERR_PERSISTENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_SERR_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_AC_ERR_ATA_BUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_ATA_EH_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_SERR_PROTOCOL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_AC_ERR_HSM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_SERR_INTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_AC_ERR_SYSTEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ATA_LFLAG_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_ata_is_host_link
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	_SERR_PHYRDY_CHG@GOTPCREL(%rip), %rcx
	movq	_SERR_DEV_XCHG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	testl	%edx, %eax
	je	LBB0_6
LBB0_5:
	leaq	4(%r12), %rdi
	callq	_ata_ehi_hotplugged
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_6:
	andl	%edx, %r13d
	andl	%edx, %r15d
	movl	%r13d, %eax
	orl	%r15d, %eax
	orl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	andl	%edx, %ebx
	xorl	%ecx, %ecx
	orl	%ebx, %eax
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	cmovel	%ecx, %eax
	testl	%ebx, %ebx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	cmovel	%ebx, %ecx
	testl	%r15d, %r15d
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	cmovel	%r15d, %edx
	testl	%r13d, %r13d
	cmovel	%r13d, %r14d
	orl	%edx, %r14d
	orl	%ecx, %r14d
	orl	%r14d, 8(%r12)
	orl	%eax, 12(%r12)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_SERR_PHYRDY_CHG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%edx, %eax
	jne	LBB0_5
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_SERR_PERSISTENT,4,2            ## @SERR_PERSISTENT
	.comm	_SERR_DATA,4,2                  ## @SERR_DATA
	.comm	_AC_ERR_ATA_BUS,4,2             ## @AC_ERR_ATA_BUS
	.comm	_ATA_EH_RESET,4,2               ## @ATA_EH_RESET
	.comm	_SERR_PROTOCOL,4,2              ## @SERR_PROTOCOL
	.comm	_AC_ERR_HSM,4,2                 ## @AC_ERR_HSM
	.comm	_SERR_INTERNAL,4,2              ## @SERR_INTERNAL
	.comm	_AC_ERR_SYSTEM,4,2              ## @AC_ERR_SYSTEM
	.comm	_ATA_LFLAG_DISABLED,4,2         ## @ATA_LFLAG_DISABLED
	.comm	_SERR_PHYRDY_CHG,4,2            ## @SERR_PHYRDY_CHG
	.comm	_SERR_DEV_XCHG,4,2              ## @SERR_DEV_XCHG
	.no_dead_strip	_ata_eh_analyze_serror
.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_serror
_ata_eh_analyze_serror:                 ; @ata_eh_analyze_serror
	.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
	mov	x20, x0
	ldr	w21, [x20, #4]!
Lloh0:
	adrp	x8, _SERR_PERSISTENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SERR_PERSISTENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh3:
	adrp	x8, _SERR_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SERR_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
Lloh6:
	adrp	x8, _AC_ERR_ATA_BUS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AC_ERR_ATA_BUS@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
Lloh9:
	adrp	x8, _ATA_EH_RESET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATA_EH_RESET@GOTPAGEOFF]
Lloh11:
	ldr	w24, [x8]
Lloh12:
	adrp	x8, _SERR_PROTOCOL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SERR_PROTOCOL@GOTPAGEOFF]
Lloh14:
	ldr	w27, [x8]
Lloh15:
	adrp	x8, _AC_ERR_HSM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AC_ERR_HSM@GOTPAGEOFF]
Lloh17:
	ldr	w26, [x8]
Lloh18:
	adrp	x8, _SERR_INTERNAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SERR_INTERNAL@GOTPAGEOFF]
Lloh20:
	ldr	w28, [x8]
Lloh21:
	adrp	x8, _AC_ERR_SYSTEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AC_ERR_SYSTEM@GOTPAGEOFF]
Lloh23:
	ldr	w22, [x8]
	ldr	w8, [x0]
Lloh24:
	adrp	x9, _ATA_LFLAG_DISABLED@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ATA_LFLAG_DISABLED@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_ata_is_host_link
	cbz	x0, LBB0_5
LBB0_2:
Lloh27:
	adrp	x8, _SERR_PHYRDY_CHG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SERR_PHYRDY_CHG@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _SERR_DEV_XCHG@GOTPAGE
Lloh31:
	ldr	x9, [x9, _SERR_DEV_XCHG@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w21
	b.eq	LBB0_4
LBB0_3:
	mov	x0, x20
	bl	_ata_ehi_hotplugged
LBB0_4:
	ands	w8, w28, w21
	csel	w9, wzr, w22, eq
	ands	w10, w27, w21
	orr	w8, w8, w10
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	orr	w10, w25, w10
	csel	w11, wzr, w26, eq
	ands	w10, w10, w21
	orr	w8, w8, w10
	csel	w10, wzr, w23, eq
	cmp	w8, #0
	csel	w8, wzr, w24, eq
	orr	w10, w11, w10
	orr	w9, w10, w9
	ldp	w10, w11, [x19, #8]
	orr	w9, w9, w10
	orr	w8, w11, w8
	stp	w9, w8, [x19, #8]
	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_5:
Lloh33:
	adrp	x8, _SERR_PHYRDY_CHG@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SERR_PHYRDY_CHG@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	tst	w8, w21
	b.ne	LBB0_3
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_SERR_PERSISTENT,4,2            ; @SERR_PERSISTENT
	.comm	_SERR_DATA,4,2                  ; @SERR_DATA
	.comm	_AC_ERR_ATA_BUS,4,2             ; @AC_ERR_ATA_BUS
	.comm	_ATA_EH_RESET,4,2               ; @ATA_EH_RESET
	.comm	_SERR_PROTOCOL,4,2              ; @SERR_PROTOCOL
	.comm	_AC_ERR_HSM,4,2                 ; @AC_ERR_HSM
	.comm	_SERR_INTERNAL,4,2              ; @SERR_INTERNAL
	.comm	_AC_ERR_SYSTEM,4,2              ; @AC_ERR_SYSTEM
	.comm	_ATA_LFLAG_DISABLED,4,2         ; @ATA_LFLAG_DISABLED
	.comm	_SERR_PHYRDY_CHG,4,2            ; @SERR_PHYRDY_CHG
	.comm	_SERR_DEV_XCHG,4,2              ; @SERR_DEV_XCHG
	.no_dead_strip	_ata_eh_analyze_serror
.subsections_via_symbols
