	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsl_sata_timeout
_fsl_sata_timeout:                      ## @fsl_sata_timeout
	.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), %rax
	movq	_FSL_SATA_SLOT_RUNNING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
## %bb.13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	movq	32(%rdi), %r14
	movq	_FSL_SATA_SLOT_EXECUTING@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jge	LBB0_5
## %bb.2:
	movl	24(%r14), %edi
	movq	_FSL_SATA_P_CAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATA_INL
	movl	8(%rbx), %ecx
	btl	%ecx, %eax
	jae	LBB0_4
## %bb.3:
	movq	(%r15), %rax
	movq	%rax, (%rbx)
LBB0_4:
	leaq	24(%rbx), %rdi
	movq	_SBT_1MS@GOTPCREL(%rip), %rax
	movq	16(%rbx), %rcx
	movl	(%rcx), %ecx
	imull	(%rax), %ecx
	movl	%ecx, %esi
	shrl	$31, %esi
	addl	%ecx, %esi
	sarl	%esi
	leaq	_fsl_sata_timeout(%rip), %rcx
	xorl	%edx, %edx
	movq	%rbx, %r8
	xorl	%r9d, %r9d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_callout_reset_sbt              ## TAILCALL
LBB0_5:
	movl	28(%r14), %r15d
	movl	8(%rbx), %edx
	movq	16(%rbx), %rax
	movl	4(%rax), %ecx
	andl	$15, %ecx
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	16(%r14), %r12
	testq	%r12, %r12
	je	LBB0_9
## %bb.6:
	movq	$0, 16(%r14)
	movq	_CAM_REQUEUE_REQ@GOTPCREL(%rip), %rax
	movq	_CAM_RELEASE_SIMQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r12)
	movq	_CAM_DEV_QFRZN@GOTPCREL(%rip), %r13
	testl	%ecx, (%r13)
	jne	LBB0_8
## %bb.7:
	movl	4(%r12), %edi
	movl	$1, %esi
	callq	_xpt_freeze_devq
	movl	(%r13), %eax
	orl	%eax, (%r12)
LBB0_8:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_fsl_sata_done
LBB0_9:
	movl	(%r14), %edx
	testl	%edx, %edx
	jne	LBB0_11
## %bb.10:
	movl	8(%r14), %edi
	movl	$1, %esi
	callq	_xpt_freeze_simq
	movl	(%r14), %edx
LBB0_11:
	movb	8(%rbx), %al
	btsl	%eax, %edx
	movl	%edx, (%r14)
	notl	%edx
	andl	4(%r14), %edx
	je	LBB0_14
## %bb.12:
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_device_printf                  ## TAILCALL
LBB0_14:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fsl_sata_process_timeout       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FSL_SATA_SLOT_RUNNING,8,3      ## @FSL_SATA_SLOT_RUNNING
	.comm	_FSL_SATA_SLOT_EXECUTING,8,3    ## @FSL_SATA_SLOT_EXECUTING
	.comm	_FSL_SATA_P_CAR,4,2             ## @FSL_SATA_P_CAR
	.comm	_SBT_1MS,4,2                    ## @SBT_1MS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout on slot %d port %d\n"

	.comm	_CAM_REQUEUE_REQ,4,2            ## @CAM_REQUEUE_REQ
	.comm	_CAM_RELEASE_SIMQ,4,2           ## @CAM_RELEASE_SIMQ
	.comm	_CAM_DEV_QFRZN,4,2              ## @CAM_DEV_QFRZN
L_.str.1:                               ## @.str.1
	.asciz	" ... waiting for slots %08x\n"

	.no_dead_strip	_fsl_sata_timeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsl_sata_timeout
_fsl_sata_timeout:                      ; @fsl_sata_timeout
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _FSL_SATA_SLOT_RUNNING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FSL_SATA_SLOT_RUNNING@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_2:
	mov	x19, x0
	ldr	x20, [x0, #32]
Lloh3:
	adrp	x21, _FSL_SATA_SLOT_EXECUTING@GOTPAGE
Lloh4:
	ldr	x21, [x21, _FSL_SATA_SLOT_EXECUTING@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.3:
	ldr	w0, [x20, #24]
Lloh5:
	adrp	x8, _FSL_SATA_P_CAR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FSL_SATA_P_CAR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_ATA_INL
	ldr	w8, [x19, #8]
	lsr	w8, w0, w8
	tbz	w8, #0, LBB0_5
; %bb.4:
	ldr	x8, [x21]
	str	x8, [x19]
LBB0_5:
	add	x0, x19, #24
Lloh8:
	adrp	x8, _SBT_1MS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SBT_1MS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	x9, [x19, #16]
	ldr	w9, [x9]
	mul	w8, w9, w8
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
Lloh11:
	adrp	x3, _fsl_sata_timeout@PAGE
Lloh12:
	add	x3, x3, _fsl_sata_timeout@PAGEOFF
	mov	w2, #0
	mov	x4, x19
	mov	w5, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_callout_reset_sbt
LBB0_6:
	ldr	w21, [x20, #28]
	ldr	w2, [x19, #8]
	ldr	x8, [x19, #16]
	ldr	w8, [x8, #4]
	and	w8, w8, #0xf
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_device_printf
	ldr	x22, [x20, #16]
	cbz	x22, LBB0_10
; %bb.7:
	str	xzr, [x20, #16]
Lloh15:
	adrp	x8, _CAM_REQUEUE_REQ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CAM_REQUEUE_REQ@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _CAM_RELEASE_SIMQ@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CAM_RELEASE_SIMQ@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x22]
Lloh21:
	adrp	x23, _CAM_DEV_QFRZN@GOTPAGE
Lloh22:
	ldr	x23, [x23, _CAM_DEV_QFRZN@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_9
; %bb.8:
	ldr	w0, [x22, #4]
	mov	w1, #1
	bl	_xpt_freeze_devq
	ldr	w8, [x23]
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
LBB0_9:
	mov	x0, x20
	mov	x1, x22
	bl	_fsl_sata_done
LBB0_10:
	ldr	w8, [x20]
	cbnz	w8, LBB0_12
; %bb.11:
	ldr	w0, [x20, #8]
	mov	w1, #1
	bl	_xpt_freeze_simq
	ldr	w8, [x20]
LBB0_12:
	ldr	w9, [x19, #8]
	mov	w10, #1
	lsl	w9, w10, w9
	orr	w8, w8, w9
	str	w8, [x20]
	ldr	w9, [x20, #4]
	bics	w2, w9, w8
	b.eq	LBB0_14
; %bb.13:
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_device_printf
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_fsl_sata_process_timeout
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_FSL_SATA_SLOT_RUNNING,8,3      ; @FSL_SATA_SLOT_RUNNING
	.comm	_FSL_SATA_SLOT_EXECUTING,8,3    ; @FSL_SATA_SLOT_EXECUTING
	.comm	_FSL_SATA_P_CAR,4,2             ; @FSL_SATA_P_CAR
	.comm	_SBT_1MS,4,2                    ; @SBT_1MS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout on slot %d port %d\n"

	.comm	_CAM_REQUEUE_REQ,4,2            ; @CAM_REQUEUE_REQ
	.comm	_CAM_RELEASE_SIMQ,4,2           ; @CAM_RELEASE_SIMQ
	.comm	_CAM_DEV_QFRZN,4,2              ; @CAM_DEV_QFRZN
l_.str.1:                               ; @.str.1
	.asciz	" ... waiting for slots %08x\n"

	.no_dead_strip	_fsl_sata_timeout
.subsections_via_symbols
