	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsl_sata_execute_transaction
_fsl_sata_execute_transaction:          ## @fsl_sata_execute_transaction
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	24(%rdi), %r14
	movq	32(%rdi), %rbx
	movl	(%r14), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_FSL_SATA_CMD_WRITE@GOTPCREL(%rip), %rax
	movq	_FSL_SATA_CMD_SNOOP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	20(%r14), %edi
	movq	_CAM_DEBUG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rdx
	callq	_CAM_DEBUG
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_FSL_SATA_CTP
	movq	%rax, %r15
	movl	(%r12), %ecx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_fsl_sata_setup_fis
	testl	%eax, %eax
	je	LBB0_21
## %bb.1:
	movl	%eax, %r13d
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_FSL_SATA_CLP
	movq	%rax, %rbx
	movl	%r13d, %edi
	callq	_htole16
	movq	%rax, 32(%rbx)
	movl	16(%r12), %edi
	callq	_htole16
	movq	%rax, 24(%rbx)
	movq	8(%r14), %rax
	movq	_XPT_ATA_IO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.2:
	movq	_CAM_ATAIO_CONTROL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r14)
	je	LBB0_5
## %bb.3:
	movq	_ATA_A_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%r14)
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	je	LBB0_24
## %bb.4:
	movq	_FSL_SATA_CMD_RESET@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	orl	(%rcx), %esi
	movl	$1, -52(%rbp)                   ## 4-byte Folded Spill
	movb	$1, %cl
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	xorl	%edx, %edx
	jmp	LBB0_7
LBB0_5:
	movl	$0, -64(%rbp)                   ## 4-byte Folded Spill
	xorl	%edx, %edx
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movl	-48(%rbp), %r13d                ## 4-byte Reload
LBB0_6:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
LBB0_7:
	movq	_CAM_ATAIO_FPDMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	(%r14), %edi
	je	LBB0_9
## %bb.8:
	movq	_FSL_SATA_CMD_QUEUED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
LBB0_9:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	orl	%esi, %edi
	andl	$15, %r13d
	movq	_XPT_SCSI_IO@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	jne	LBB0_11
## %bb.10:
	movq	_FSL_SATA_CMD_ATAPI@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_11:
	orl	%ecx, %edi
	orl	(%r12), %edi
	callq	_htole32
	movq	%rax, 16(%rbx)
	movl	4(%r12), %edi
	callq	_htole32
	movq	%rax, 8(%rbx)
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_FSL_SATA_CTP_BUS
	movl	%eax, %edi
	callq	_htole32
	movq	%rax, (%rbx)
	movl	12(%r15), %esi
	movl	16(%r15), %edi
	movq	_BUS_DMASYNC_PREREAD@GOTPCREL(%rip), %rax
	movq	_BUS_DMASYNC_PREWRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	_bus_dmamap_sync
	movq	_FSL_SATA_SLOT_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movb	(%r12), %cl
	movl	$1, %eax
	shll	%cl, %eax
	orl	%eax, (%r15)
	movl	$1, %ebx
	movl	4(%r15), %edi
	movq	_FSL_SATA_P_CQPMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movl	%r13d, %edx
	callq	_ATA_OUTL
	movl	4(%r15), %edi
	movq	_FSL_SATA_P_CQR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movb	(%r12), %cl
	shll	%cl, %ebx
	movl	%ebx, %edx
	callq	_ATA_OUTL
	movq	8(%r14), %rax
	movq	_XPT_ATA_IO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.12:
	movq	_ATA_DEVICE_RESET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%al
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	notb	%cl
	testb	%al, %cl
	jne	LBB0_20
## %bb.13:
	movl	16(%r14), %ecx
	movq	_FSL_SATA_ERR_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	testl	%ecx, %ecx
	jle	LBB0_25
## %bb.14:
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movl	%ecx, -88(%rbp)                 ## 4-byte Spill
	imull	$100, %ecx, %eax
	cmpl	$2, %eax
	movl	$1, %r14d
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	cmovgel	%eax, %r14d
	movq	_FSL_SATA_P_CCR@GOTPCREL(%rip), %r13
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	(%r13), %esi
	callq	_ATA_INL
	movl	(%r12), %ecx
	btl	%ecx, %eax
	jb	LBB0_19
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=1
	incl	%ebx
	cmpl	%ebx, %r14d
	je	LBB0_26
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_DELAY
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	testb	%r15b, %r15b
	je	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	_FSL_SATA_P_SIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATA_INL
	decl	%eax
	cmpl	$-2, %eax
	jae	LBB0_16
LBB0_19:
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_23
LBB0_20:
	movq	_SBT_1MS@GOTPCREL(%rip), %rax
	movl	16(%r14), %ecx
	imull	(%rax), %ecx
	leaq	8(%r12), %rdi
	movl	%ecx, %esi
	shrl	$31, %esi
	addl	%ecx, %esi
	sarl	%esi
	movq	_fsl_sata_timeout@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	xorl	%edx, %edx
	movq	%r12, %r8
	xorl	%r9d, %r9d
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_callout_reset_sbt              ## TAILCALL
LBB0_21:
	movl	8(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_FSL_SATA_ERR_INVALID@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %esi
LBB0_23:
	movq	%r12, %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fsl_sata_end_transaction       ## TAILCALL
LBB0_24:
	movq	(%r15), %rdi
	leaq	L_.memset_pattern(%rip), %rsi
	movl	$128, %edx
	callq	_memset_pattern16
	movq	8(%r14), %rax
	movl	$2, -52(%rbp)                   ## 4-byte Folded Spill
	movb	$1, %cl
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	movb	$1, %dl
	jmp	LBB0_6
LBB0_25:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	testl	%ecx, %ecx
	jne	LBB0_27
	jmp	LBB0_23
LBB0_26:
	cmpl	-68(%rbp), %ebx                 ## 4-byte Folded Reload
	setl	%bl
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	_FSL_SATA_P_CQR@GOTPCREL(%rip), %r15
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	movl	-88(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	je	LBB0_23
LBB0_27:
	testb	%bl, %bl
	jne	LBB0_23
## %bb.28:
	movq	%rax, %rbx
	movl	8(%rax), %edi
	movl	(%r12), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_device_printf
	movl	4(%rbx), %edi
	movl	8(%rbx), %eax
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	movq	_FSL_SATA_P_HSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATA_INL
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %edi
	movl	(%r15), %esi
	callq	_ATA_INL
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %edi
	movq	_FSL_SATA_P_CCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATA_INL
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %edi
	movq	_FSL_SATA_P_SSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATA_INL
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %edi
	movq	_FSL_SATA_P_CER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATA_INL
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %edi
	movq	_FSL_SATA_P_DER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATA_INL
	movl	%eax, %r15d
	movl	4(%rbx), %edi
	movq	_FSL_SATA_P_SERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATA_INL
	movl	%eax, %r13d
	movl	4(%rbx), %edi
	movq	_FSL_SATA_P_CAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATA_INL
	movl	%eax, %r14d
	movl	4(%rbx), %edi
	movq	_FSL_SATA_P_SIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATA_INL
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movl	-80(%rbp), %edi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movl	-68(%rbp), %r9d                 ## 4-byte Reload
	xorl	%eax, %eax
	pushq	%rbx
	pushq	%r14
	pushq	%r13
	pushq	%r15
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	callq	_device_printf
	addq	$48, %rsp
	movq	_FSL_SATA_ERR_TIMEOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_FSL_SATA_CMD_WRITE,4,2         ## @FSL_SATA_CMD_WRITE
	.comm	_FSL_SATA_CMD_SNOOP,4,2         ## @FSL_SATA_CMD_SNOOP
	.comm	_CAM_DEBUG_TRACE,4,2            ## @CAM_DEBUG_TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Setting up SATA FIS failed\n"

	.comm	_FSL_SATA_ERR_INVALID,4,2       ## @FSL_SATA_ERR_INVALID
	.comm	_XPT_ATA_IO,8,3                 ## @XPT_ATA_IO
	.comm	_CAM_ATAIO_CONTROL,4,2          ## @CAM_ATAIO_CONTROL
	.comm	_ATA_A_RESET,4,2                ## @ATA_A_RESET
	.comm	_FSL_SATA_CMD_RESET,4,2         ## @FSL_SATA_CMD_RESET
	.comm	_CAM_ATAIO_FPDMA,4,2            ## @CAM_ATAIO_FPDMA
	.comm	_FSL_SATA_CMD_QUEUED,4,2        ## @FSL_SATA_CMD_QUEUED
	.comm	_XPT_SCSI_IO,8,3                ## @XPT_SCSI_IO
	.comm	_FSL_SATA_CMD_ATAPI,4,2         ## @FSL_SATA_CMD_ATAPI
	.comm	_BUS_DMASYNC_PREREAD,4,2        ## @BUS_DMASYNC_PREREAD
	.comm	_BUS_DMASYNC_PREWRITE,4,2       ## @BUS_DMASYNC_PREWRITE
	.comm	_FSL_SATA_SLOT_RUNNING,4,2      ## @FSL_SATA_SLOT_RUNNING
	.comm	_FSL_SATA_P_CQPMP,4,2           ## @FSL_SATA_P_CQPMP
	.comm	_FSL_SATA_P_CQR,4,2             ## @FSL_SATA_P_CQR
	.comm	_ATA_DEVICE_RESET,8,3           ## @ATA_DEVICE_RESET
	.comm	_FSL_SATA_ERR_NONE,4,2          ## @FSL_SATA_ERR_NONE
	.comm	_FSL_SATA_P_SIG,4,2             ## @FSL_SATA_P_SIG
	.comm	_FSL_SATA_P_CCR,4,2             ## @FSL_SATA_P_CCR
L_.str.2:                               ## @.str.2
	.asciz	"Poll timeout on slot %d port %d (round %d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"hsts %08x cqr %08x ccr %08x ss %08x rs %08x cer %08x der %08x serr %08x car %08x sig %08x\n"

	.comm	_FSL_SATA_P_HSTS,4,2            ## @FSL_SATA_P_HSTS
	.comm	_FSL_SATA_P_SSTS,4,2            ## @FSL_SATA_P_SSTS
	.comm	_FSL_SATA_P_CER,4,2             ## @FSL_SATA_P_CER
	.comm	_FSL_SATA_P_DER,4,2             ## @FSL_SATA_P_DER
	.comm	_FSL_SATA_P_SERR,4,2            ## @FSL_SATA_P_SERR
	.comm	_FSL_SATA_P_CAR,4,2             ## @FSL_SATA_P_CAR
	.comm	_FSL_SATA_ERR_TIMEOUT,4,2       ## @FSL_SATA_ERR_TIMEOUT
	.comm	_SBT_1MS,4,2                    ## @SBT_1MS
	.comm	_fsl_sata_timeout,8,3           ## @fsl_sata_timeout
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @.memset_pattern
L_.memset_pattern:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff

	.no_dead_strip	_fsl_sata_execute_transaction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsl_sata_execute_transaction
_fsl_sata_execute_transaction:          ; @fsl_sata_execute_transaction
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	ldp	x22, x20, [x0, #24]
	ldr	w21, [x22]
Lloh0:
	adrp	x8, _FSL_SATA_CMD_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FSL_SATA_CMD_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x8, _FSL_SATA_CMD_SNOOP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FSL_SATA_CMD_SNOOP@GOTPAGEOFF]
Lloh5:
	ldr	w26, [x8]
	ldr	w0, [x22, #20]
Lloh6:
	adrp	x8, _CAM_DEBUG_TRACE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CAM_DEBUG_TRACE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	x2, [x22, #8]
	bl	_CAM_DEBUG
	mov	x0, x20
	mov	x1, x19
	bl	_FSL_SATA_CTP
	mov	x24, x0
	ldr	w3, [x19]
	mov	x0, x20
	mov	x1, x24
	mov	x2, x22
	bl	_fsl_sata_setup_fis
	cbz	w0, LBB0_16
; %bb.1:
	mov	x25, x0
	and	w8, w21, #0xf
	stur	x8, [x29, #-88]                 ; 8-byte Folded Spill
	orr	w28, w26, w23
	mov	x0, x20
	mov	x1, x19
	bl	_FSL_SATA_CLP
	mov	x23, x0
	mov	x0, x25
	bl	_htole16
	str	x0, [x23, #32]
	ldr	w0, [x19, #16]
	bl	_htole16
	str	x0, [x23, #24]
	ldr	x8, [x22, #8]
Lloh9:
	adrp	x26, _XPT_ATA_IO@GOTPAGE
Lloh10:
	ldr	x26, [x26, _XPT_ATA_IO@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	ldr	w9, [x22]
Lloh11:
	adrp	x10, _CAM_ATAIO_CONTROL@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CAM_ATAIO_CONTROL@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.3:
	ldr	w9, [x22, #4]
Lloh14:
	adrp	x10, _ATA_A_RESET@GOTPAGE
Lloh15:
	ldr	x10, [x10, _ATA_A_RESET@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_19
; %bb.4:
	mov	w25, #0
Lloh17:
	adrp	x9, _FSL_SATA_CMD_RESET@GOTPAGE
Lloh18:
	ldr	x9, [x9, _FSL_SATA_CMD_RESET@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w28, w9, w28
	mov	w27, #1
	mov	w24, #1
	b	LBB0_6
LBB0_5:
	mov	w27, #0
	mov	w25, #0
	mov	w24, #0
LBB0_6:
	ldr	w9, [x22]
Lloh20:
	adrp	x10, _CAM_ATAIO_FPDMA@GOTPAGE
Lloh21:
	ldr	x10, [x10, _CAM_ATAIO_FPDMA@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
Lloh23:
	adrp	x11, _FSL_SATA_CMD_QUEUED@GOTPAGE
Lloh24:
	ldr	x11, [x11, _FSL_SATA_CMD_QUEUED@GOTPAGEOFF]
Lloh25:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w9, wzr, w11, eq
	orr	w9, w9, w28
Lloh26:
	adrp	x10, _XPT_SCSI_IO@GOTPAGE
Lloh27:
	ldr	x10, [x10, _XPT_SCSI_IO@GOTPAGEOFF]
Lloh28:
	ldr	x10, [x10]
Lloh29:
	adrp	x11, _FSL_SATA_CMD_ATAPI@GOTPAGE
Lloh30:
	ldr	x11, [x11, _FSL_SATA_CMD_ATAPI@GOTPAGEOFF]
Lloh31:
	ldr	w11, [x11]
	cmp	x8, x10
	csel	w8, w11, wzr, eq
	orr	w8, w9, w8
	ldr	w9, [x19]
	orr	w0, w8, w9
	bl	_htole32
	str	x0, [x23, #16]
	ldr	w0, [x19, #4]
	bl	_htole32
	str	x0, [x23, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_FSL_SATA_CTP_BUS
	bl	_htole32
	str	x0, [x23]
Lloh32:
	adrp	x8, _BUS_DMASYNC_PREREAD@GOTPAGE
Lloh33:
	ldr	x8, [x8, _BUS_DMASYNC_PREREAD@GOTPAGEOFF]
	ldp	w1, w0, [x20, #12]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	adrp	x9, _BUS_DMASYNC_PREWRITE@GOTPAGE
Lloh36:
	ldr	x9, [x9, _BUS_DMASYNC_PREWRITE@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_bus_dmamap_sync
Lloh38:
	adrp	x8, _FSL_SATA_SLOT_RUNNING@GOTPAGE
Lloh39:
	ldr	x8, [x8, _FSL_SATA_SLOT_RUNNING@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	ldr	w8, [x19]
	mov	w21, #1
	lsl	w8, w21, w8
	ldp	w9, w0, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
Lloh41:
	adrp	x8, _FSL_SATA_P_CQPMP@GOTPAGE
Lloh42:
	ldr	x8, [x8, _FSL_SATA_P_CQPMP@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	ldur	x2, [x29, #-88]                 ; 8-byte Folded Reload
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_ATA_OUTL
	ldr	w0, [x20, #4]
Lloh44:
	adrp	x23, _FSL_SATA_P_CQR@GOTPAGE
Lloh45:
	ldr	x23, [x23, _FSL_SATA_P_CQR@GOTPAGEOFF]
	ldr	w1, [x23]
	ldr	w8, [x19]
	lsl	w2, w21, w8
	bl	_ATA_OUTL
	ldr	x8, [x22, #8]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.7:
Lloh46:
	adrp	x9, _ATA_DEVICE_RESET@GOTPAGE
Lloh47:
	ldr	x9, [x9, _ATA_DEVICE_RESET@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, ne
	bic	w8, w8, w27
	tbnz	w8, #0, LBB0_15
; %bb.8:
	ldr	w26, [x22, #16]
Lloh49:
	adrp	x8, _FSL_SATA_ERR_NONE@GOTPAGE
Lloh50:
	ldr	x8, [x8, _FSL_SATA_ERR_NONE@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
	cmp	w26, #1
	b.lt	LBB0_20
; %bb.9:
	str	w1, [sp, #96]                   ; 4-byte Folded Spill
	str	x24, [sp, #88]                  ; 8-byte Folded Spill
	mov	w27, #0
	mov	w8, #100
	mul	w28, w26, w8
	cmp	w28, #1
	csinc	w24, w28, wzr, gt
Lloh52:
	adrp	x22, _FSL_SATA_P_SIG@GOTPAGE
Lloh53:
	ldr	x22, [x22, _FSL_SATA_P_SIG@GOTPAGEOFF]
Lloh54:
	adrp	x21, _FSL_SATA_P_CCR@GOTPAGE
Lloh55:
	ldr	x21, [x21, _FSL_SATA_P_CCR@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w1, [x21]
	bl	_ATA_INL
	ldr	w8, [x19]
	lsr	w8, w0, w8
	tbnz	w8, #0, LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w27, w27, #1
	cmp	w24, w27
	b.eq	LBB0_21
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_DELAY
	ldr	w0, [x20, #4]
	cbz	w25, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w1, [x22]
	bl	_ATA_INL
	sub	w8, w0, #1
	cmn	w8, #2
	b.hs	LBB0_11
LBB0_14:
	ldr	w1, [sp, #96]                   ; 4-byte Folded Reload
	b	LBB0_18
LBB0_15:
	add	x0, x19, #8
Lloh56:
	adrp	x8, _SBT_1MS@GOTPAGE
Lloh57:
	ldr	x8, [x8, _SBT_1MS@GOTPAGEOFF]
Lloh58:
	ldr	w8, [x8]
	ldr	w9, [x22, #16]
	mul	w8, w9, w8
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
Lloh59:
	adrp	x8, _fsl_sata_timeout@GOTPAGE
Lloh60:
	ldr	x8, [x8, _fsl_sata_timeout@GOTPAGEOFF]
Lloh61:
	ldr	x3, [x8]
	mov	w2, #0
	mov	x4, x19
	mov	w5, #0
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	b	_callout_reset_sbt
LBB0_16:
	ldr	w0, [x20, #8]
Lloh62:
	adrp	x1, l_.str.1@PAGE
Lloh63:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_device_printf
Lloh64:
	adrp	x8, _FSL_SATA_ERR_INVALID@GOTPAGE
Lloh65:
	ldr	x8, [x8, _FSL_SATA_ERR_INVALID@GOTPAGEOFF]
LBB0_17:
	ldr	w1, [x8]
LBB0_18:
	mov	x0, x19
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	b	_fsl_sata_end_transaction
LBB0_19:
	ldr	x0, [x24]
Lloh66:
	adrp	x1, l_.memset_pattern@PAGE
Lloh67:
	add	x1, x1, l_.memset_pattern@PAGEOFF
	mov	w2, #128
	bl	_memset_pattern16
	ldr	x8, [x22, #8]
	mov	w24, #2
	mov	w27, #1
	mov	w25, #1
	b	LBB0_6
LBB0_20:
	mov	w8, #0
	cbnz	w26, LBB0_22
	b	LBB0_18
LBB0_21:
	cmp	w27, w28
	cset	w8, lt
	ldr	x24, [sp, #88]                  ; 8-byte Folded Reload
	ldr	w1, [sp, #96]                   ; 4-byte Folded Reload
	cbz	w26, LBB0_18
LBB0_22:
	tbnz	w8, #0, LBB0_18
; %bb.23:
	ldr	w0, [x20, #8]
	ldr	w8, [x19]
	str	x24, [sp, #16]
	ldur	x9, [x29, #-88]                 ; 8-byte Folded Reload
	stp	x8, x9, [sp]
Lloh68:
	adrp	x1, l_.str.2@PAGE
Lloh69:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_device_printf
	ldp	w0, w8, [x20, #4]
	stur	w8, [x29, #-88]                 ; 4-byte Folded Spill
Lloh70:
	adrp	x8, _FSL_SATA_P_HSTS@GOTPAGE
Lloh71:
	ldr	x8, [x8, _FSL_SATA_P_HSTS@GOTPAGEOFF]
Lloh72:
	ldr	w1, [x8]
	bl	_ATA_INL
	str	x0, [sp, #96]                   ; 8-byte Folded Spill
	ldr	w0, [x20, #4]
	ldr	w1, [x23]
	bl	_ATA_INL
	mov	x23, x0
	ldr	w0, [x20, #4]
Lloh73:
	adrp	x8, _FSL_SATA_P_CCR@GOTPAGE
Lloh74:
	ldr	x8, [x8, _FSL_SATA_P_CCR@GOTPAGEOFF]
Lloh75:
	ldr	w1, [x8]
	bl	_ATA_INL
	mov	x24, x0
	ldr	w0, [x20, #4]
Lloh76:
	adrp	x8, _FSL_SATA_P_SSTS@GOTPAGE
Lloh77:
	ldr	x8, [x8, _FSL_SATA_P_SSTS@GOTPAGEOFF]
Lloh78:
	ldr	w1, [x8]
	bl	_ATA_INL
	mov	x25, x0
Lloh79:
	adrp	x8, _FSL_SATA_P_CER@GOTPAGE
Lloh80:
	ldr	x8, [x8, _FSL_SATA_P_CER@GOTPAGEOFF]
Lloh81:
	ldr	w1, [x8]
	ldp	w22, w0, [x20]
	bl	_ATA_INL
	mov	x26, x0
	ldr	w0, [x20, #4]
Lloh82:
	adrp	x8, _FSL_SATA_P_DER@GOTPAGE
Lloh83:
	ldr	x8, [x8, _FSL_SATA_P_DER@GOTPAGEOFF]
Lloh84:
	ldr	w1, [x8]
	bl	_ATA_INL
	mov	x27, x0
	ldr	w0, [x20, #4]
Lloh85:
	adrp	x8, _FSL_SATA_P_SERR@GOTPAGE
Lloh86:
	ldr	x8, [x8, _FSL_SATA_P_SERR@GOTPAGEOFF]
Lloh87:
	ldr	w1, [x8]
	bl	_ATA_INL
	mov	x28, x0
	ldr	w0, [x20, #4]
Lloh88:
	adrp	x8, _FSL_SATA_P_CAR@GOTPAGE
Lloh89:
	ldr	x8, [x8, _FSL_SATA_P_CAR@GOTPAGEOFF]
Lloh90:
	ldr	w1, [x8]
	bl	_ATA_INL
	mov	x21, x0
	ldr	w0, [x20, #4]
Lloh91:
	adrp	x8, _FSL_SATA_P_SIG@GOTPAGE
Lloh92:
	ldr	x8, [x8, _FSL_SATA_P_SIG@GOTPAGEOFF]
Lloh93:
	ldr	w1, [x8]
	bl	_ATA_INL
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x21, x0, [sp, #64]
	stp	x27, x28, [sp, #48]
	stp	x22, x26, [sp, #32]
	stp	x24, x25, [sp, #16]
Lloh94:
	adrp	x1, l_.str.3@PAGE
Lloh95:
	add	x1, x1, l_.str.3@PAGEOFF
	ldr	x8, [sp, #96]                   ; 8-byte Folded Reload
	stp	x8, x23, [sp]
	ldur	w0, [x29, #-88]                 ; 4-byte Folded Reload
	bl	_device_printf
Lloh96:
	adrp	x8, _FSL_SATA_ERR_TIMEOUT@GOTPAGE
Lloh97:
	ldr	x8, [x8, _FSL_SATA_ERR_TIMEOUT@GOTPAGEOFF]
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh64, Lloh65
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh96, Lloh97
	.loh AdrpAdd	Lloh94, Lloh95
	.loh AdrpLdrGotLdr	Lloh91, Lloh92, Lloh93
	.loh AdrpLdrGotLdr	Lloh88, Lloh89, Lloh90
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpAdd	Lloh68, Lloh69
	.cfi_endproc
                                        ; -- End function
	.comm	_FSL_SATA_CMD_WRITE,4,2         ; @FSL_SATA_CMD_WRITE
	.comm	_FSL_SATA_CMD_SNOOP,4,2         ; @FSL_SATA_CMD_SNOOP
	.comm	_CAM_DEBUG_TRACE,4,2            ; @CAM_DEBUG_TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Setting up SATA FIS failed\n"

	.comm	_FSL_SATA_ERR_INVALID,4,2       ; @FSL_SATA_ERR_INVALID
	.comm	_XPT_ATA_IO,8,3                 ; @XPT_ATA_IO
	.comm	_CAM_ATAIO_CONTROL,4,2          ; @CAM_ATAIO_CONTROL
	.comm	_ATA_A_RESET,4,2                ; @ATA_A_RESET
	.comm	_FSL_SATA_CMD_RESET,4,2         ; @FSL_SATA_CMD_RESET
	.comm	_CAM_ATAIO_FPDMA,4,2            ; @CAM_ATAIO_FPDMA
	.comm	_FSL_SATA_CMD_QUEUED,4,2        ; @FSL_SATA_CMD_QUEUED
	.comm	_XPT_SCSI_IO,8,3                ; @XPT_SCSI_IO
	.comm	_FSL_SATA_CMD_ATAPI,4,2         ; @FSL_SATA_CMD_ATAPI
	.comm	_BUS_DMASYNC_PREREAD,4,2        ; @BUS_DMASYNC_PREREAD
	.comm	_BUS_DMASYNC_PREWRITE,4,2       ; @BUS_DMASYNC_PREWRITE
	.comm	_FSL_SATA_SLOT_RUNNING,4,2      ; @FSL_SATA_SLOT_RUNNING
	.comm	_FSL_SATA_P_CQPMP,4,2           ; @FSL_SATA_P_CQPMP
	.comm	_FSL_SATA_P_CQR,4,2             ; @FSL_SATA_P_CQR
	.comm	_ATA_DEVICE_RESET,8,3           ; @ATA_DEVICE_RESET
	.comm	_FSL_SATA_ERR_NONE,4,2          ; @FSL_SATA_ERR_NONE
	.comm	_FSL_SATA_P_SIG,4,2             ; @FSL_SATA_P_SIG
	.comm	_FSL_SATA_P_CCR,4,2             ; @FSL_SATA_P_CCR
l_.str.2:                               ; @.str.2
	.asciz	"Poll timeout on slot %d port %d (round %d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"hsts %08x cqr %08x ccr %08x ss %08x rs %08x cer %08x der %08x serr %08x car %08x sig %08x\n"

	.comm	_FSL_SATA_P_HSTS,4,2            ; @FSL_SATA_P_HSTS
	.comm	_FSL_SATA_P_SSTS,4,2            ; @FSL_SATA_P_SSTS
	.comm	_FSL_SATA_P_CER,4,2             ; @FSL_SATA_P_CER
	.comm	_FSL_SATA_P_DER,4,2             ; @FSL_SATA_P_DER
	.comm	_FSL_SATA_P_SERR,4,2            ; @FSL_SATA_P_SERR
	.comm	_FSL_SATA_P_CAR,4,2             ; @FSL_SATA_P_CAR
	.comm	_FSL_SATA_ERR_TIMEOUT,4,2       ; @FSL_SATA_ERR_TIMEOUT
	.comm	_SBT_1MS,4,2                    ; @SBT_1MS
	.comm	_fsl_sata_timeout,8,3           ; @fsl_sata_timeout
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; @.memset_pattern
l_.memset_pattern:
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff

	.no_dead_strip	_fsl_sata_execute_transaction
.subsections_via_symbols
