	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_eh_schedule_probe
_ata_eh_schedule_probe:                 ## @ata_eh_schedule_probe
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	callq	_ata_dev_phys_link
	movl	$0, -36(%rbp)
	movl	(%rbx), %ecx
	movl	$1, %edx
	shll	%cl, %edx
	movq	%rax, %r14
	movl	16(%r12), %eax
	xorl	%r15d, %r15d
	btl	%ecx, %eax
	jae	LBB0_4
## %bb.1:
	testl	%edx, (%r12)
	jne	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	callq	_ata_eh_detach_dev
	movq	%rbx, %rdi
	callq	_ata_dev_init
	movslq	(%rbx), %rcx
	movl	$1, %eax
	shll	%cl, %eax
	orl	%eax, (%r12)
	movq	_ATA_EH_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%r12)
	movq	8(%r12), %rax
	movl	$-2, %edx
	roll	%cl, %edx
	movq	$0, (%rax,%rcx,8)
	andl	%edx, 4(%r12)
	movl	$1, %r15d
	addq	$4, %rbx
	movq	_AC_ERR_OTHER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ata_ering_record
	movq	_ata_count_probe_trials_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ata_ering_map
	movl	-36(%rbp), %eax
	movq	_ATA_EH_PROBE_TRIALS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_4
## %bb.3:
	movl	$1, %r15d
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_sata_down_spd_limit
LBB0_4:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_EH_RESET,4,2               ## @ATA_EH_RESET
	.comm	_AC_ERR_OTHER,4,2               ## @AC_ERR_OTHER
	.comm	_ata_count_probe_trials_cb,4,2  ## @ata_count_probe_trials_cb
	.comm	_ATA_EH_PROBE_TRIALS,4,2        ## @ATA_EH_PROBE_TRIALS
	.no_dead_strip	_ata_eh_schedule_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_eh_schedule_probe
_ata_eh_schedule_probe:                 ; @ata_eh_schedule_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	ldr	x22, [x0, #8]
	bl	_ata_dev_phys_link
	str	wzr, [sp, #12]
	ldr	w9, [x22, #16]
	ldr	w8, [x20]
	mov	w10, #1
	lsl	w8, w10, w8
	tst	w8, w9
	b.eq	LBB0_2
; %bb.1:
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_2:
	mov	w21, #0
LBB0_3:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
LBB0_4:
	mov	x19, x0
	mov	x0, x20
	bl	_ata_eh_detach_dev
	mov	x0, x20
	bl	_ata_dev_init
	ldrsw	x8, [x20], #4
	mov	w21, #1
	lsl	w9, w21, w8
	ldp	w10, w11, [x22]
	orr	w10, w10, w9
	bic	w9, w11, w9
Lloh0:
	adrp	x11, _ATA_EH_RESET@GOTPAGE
Lloh1:
	ldr	x11, [x11, _ATA_EH_RESET@GOTPAGEOFF]
	str	w10, [x22]
Lloh2:
	ldr	w10, [x11]
	ldr	w11, [x22, #20]
	orr	w10, w11, w10
	str	w10, [x22, #20]
	ldr	x10, [x22, #8]
	str	xzr, [x10, x8, lsl #3]
	str	w9, [x22, #4]
Lloh3:
	adrp	x8, _AC_ERR_OTHER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AC_ERR_OTHER@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_ata_ering_record
Lloh6:
	adrp	x8, _ata_count_probe_trials_cb@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ata_count_probe_trials_cb@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_ata_ering_map
	ldr	w8, [sp, #12]
Lloh9:
	adrp	x9, _ATA_EH_PROBE_TRIALS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ATA_EH_PROBE_TRIALS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_3
; %bb.5:
	mov	w21, #1
	mov	x0, x19
	mov	w1, #1
	bl	_sata_down_spd_limit
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_EH_RESET,4,2               ; @ATA_EH_RESET
	.comm	_AC_ERR_OTHER,4,2               ; @AC_ERR_OTHER
	.comm	_ata_count_probe_trials_cb,4,2  ; @ata_count_probe_trials_cb
	.comm	_ATA_EH_PROBE_TRIALS,4,2        ; @ATA_EH_PROBE_TRIALS
	.no_dead_strip	_ata_eh_schedule_probe
.subsections_via_symbols
