	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsl_sata_setup_fis
_fsl_sata_setup_fis:                    ## @fsl_sata_setup_fis
	.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
	movl	%ecx, %r12d
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	(%rsi), %rbx
	movq	%rbx, %rdi
	movl	$32, %esi
	callq	_bzero
	movl	$39, (%rbx)
	movl	(%r14), %eax
	andl	$15, %eax
	movl	%eax, 4(%rbx)
	movq	8(%r14), %rcx
	movq	_XPT_SCSI_IO@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.1:
	orl	$128, %eax
	movl	%eax, 4(%rbx)
	movq	_ATA_PACKET_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	_CAM_DIR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	16(%r14), %eax
	movq	_CAM_DIR_NONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.2:
	movl	(%r14), %eax
	jmp	LBB0_3
LBB0_7:
	movq	_CAM_ATAIO_CONTROL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r14)
	je	LBB0_8
## %bb.12:
	movl	52(%r14), %eax
	jmp	LBB0_13
LBB0_4:
	movq	(%r13), %rcx
	movslq	(%r14), %rax
	movq	(%rcx,%rax,8), %rcx
	movq	_ATA_DMA@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_5
LBB0_3:
	movl	%eax, 20(%rbx)
	movl	(%r14), %eax
	sarl	$8, %eax
	movl	$6, %ecx
	jmp	LBB0_6
LBB0_8:
	orl	$128, %eax
	movl	%eax, 4(%rbx)
	movl	4(%r14), %eax
	movl	%eax, 8(%rbx)
	movl	8(%r14), %eax
	movl	%eax, 12(%rbx)
	movl	12(%r14), %eax
	movl	%eax, 16(%rbx)
	movl	16(%r14), %eax
	movl	%eax, 20(%rbx)
	movl	20(%r14), %eax
	movl	%eax, 24(%rbx)
	movl	24(%r14), %eax
	movl	%eax, 28(%rbx)
	movl	28(%r14), %eax
	movl	%eax, 32(%rbx)
	movl	32(%r14), %eax
	movl	%eax, 36(%rbx)
	movl	36(%r14), %eax
	movl	%eax, 40(%rbx)
	movl	40(%r14), %eax
	movl	%eax, 44(%rbx)
	movq	_CAM_ATAIO_FPDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_10
## %bb.9:
	shll	$3, %r12d
	movl	%r12d, 48(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_5:
	movq	_ATA_F_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$3, %ecx
LBB0_6:
	movl	%eax, (%rbx,%rcx,4)
	movq	_ATA_D_LBA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_ATA_A_4BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%rbx)
	movq	_CAM_CDB_POINTER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	16(%r14), %eax
	setne	%cl
	movl	8(%r14,%rcx,4), %edi
	movq	8(%r15), %rsi
	movl	4(%r14), %edx
	callq	_bcopy
	movslq	4(%r14), %rdi
	movl	$32, %esi
	subl	%edi, %esi
	shlq	$2, %rdi
	addq	8(%r15), %rdi
	callq	_bzero
	jmp	LBB0_14
LBB0_10:
	movl	44(%r14), %eax
	movl	%eax, 48(%rbx)
	movl	48(%r14), %eax
LBB0_11:
	movl	%eax, 52(%rbx)
	movq	_ATA_A_4BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:
	movl	%eax, 60(%rbx)
LBB0_14:
	movl	$20, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XPT_SCSI_IO,8,3                ## @XPT_SCSI_IO
	.comm	_ATA_PACKET_CMD,4,2             ## @ATA_PACKET_CMD
	.comm	_CAM_DIR_MASK,4,2               ## @CAM_DIR_MASK
	.comm	_CAM_DIR_NONE,4,2               ## @CAM_DIR_NONE
	.comm	_ATA_DMA,8,3                    ## @ATA_DMA
	.comm	_ATA_F_DMA,4,2                  ## @ATA_F_DMA
	.comm	_ATA_D_LBA,4,2                  ## @ATA_D_LBA
	.comm	_ATA_A_4BIT,4,2                 ## @ATA_A_4BIT
	.comm	_CAM_CDB_POINTER,4,2            ## @CAM_CDB_POINTER
	.comm	_CAM_ATAIO_CONTROL,4,2          ## @CAM_ATAIO_CONTROL
	.comm	_CAM_ATAIO_FPDMA,4,2            ## @CAM_ATAIO_FPDMA
	.no_dead_strip	_fsl_sata_setup_fis
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsl_sata_setup_fis
_fsl_sata_setup_fis:                    ; @fsl_sata_setup_fis
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x3
	mov	x19, x2
	mov	x21, x1
	mov	x23, x0
	ldr	x20, [x1]
	mov	x0, x20
	mov	w1, #32
	bl	_bzero
	mov	w8, #39
	str	w8, [x20]
	ldr	w8, [x19]
	and	w8, w8, #0xf
	str	w8, [x20, #4]
	ldr	x9, [x19, #8]
Lloh0:
	adrp	x10, _XPT_SCSI_IO@GOTPAGE
Lloh1:
	ldr	x10, [x10, _XPT_SCSI_IO@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.1:
	orr	w8, w8, #0x80
Lloh3:
	adrp	x9, _ATA_PACKET_CMD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATA_PACKET_CMD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w8, w9, [x20, #4]
	ldr	w8, [x19, #16]
Lloh6:
	adrp	x9, _CAM_DIR_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CAM_DIR_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh9:
	adrp	x9, _CAM_DIR_NONE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CAM_DIR_NONE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x19]
	b	LBB0_6
LBB0_3:
	ldr	w9, [x19]
Lloh12:
	adrp	x10, _CAM_ATAIO_CONTROL@GOTPAGE
Lloh13:
	ldr	x10, [x10, _CAM_ATAIO_CONTROL@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_7
; %bb.4:
	ldr	w8, [x19, #52]
	b	LBB0_13
LBB0_5:
	ldr	x9, [x23]
	ldrsw	x8, [x19]
	ldr	x9, [x9, x8, lsl #3]
Lloh15:
	adrp	x10, _ATA_DMA@GOTPAGE
Lloh16:
	ldr	x10, [x10, _ATA_DMA@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ge	LBB0_9
LBB0_6:
	str	w8, [x20, #20]
	ldr	w8, [x19]
	asr	w8, w8, #8
	mov	w9, #6
	b	LBB0_10
LBB0_7:
	orr	w8, w8, #0x80
	str	w8, [x20, #4]
	ldr	w8, [x19, #4]
	str	w8, [x20, #8]
	ldr	w8, [x19, #8]
	str	w8, [x20, #12]
	ldr	w8, [x19, #12]
	str	w8, [x20, #16]
	ldr	w8, [x19, #16]
	str	w8, [x20, #20]
	ldr	w8, [x19, #20]
	str	w8, [x20, #24]
	ldr	w8, [x19, #24]
	str	w8, [x20, #28]
	ldr	w8, [x19, #28]
	str	w8, [x20, #32]
	ldr	w8, [x19, #32]
	str	w8, [x20, #36]
	ldr	w8, [x19, #36]
	str	w8, [x20, #40]
	ldr	w8, [x19, #40]
	str	w8, [x20, #44]
	ldr	w8, [x19]
Lloh18:
	adrp	x9, _CAM_ATAIO_FPDMA@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CAM_ATAIO_FPDMA@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:
	mov	w8, #0
	lsl	w9, w22, #3
	str	w9, [x20, #48]
	b	LBB0_12
LBB0_9:
Lloh21:
	adrp	x8, _ATA_F_DMA@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ATA_F_DMA@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	mov	w9, #3
LBB0_10:
	str	w8, [x20, x9, lsl #2]
Lloh24:
	adrp	x8, _ATA_D_LBA@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ATA_D_LBA@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	str	w8, [x20, #28]
Lloh27:
	adrp	x8, _ATA_A_4BIT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ATA_A_4BIT@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x20, #60]
	ldr	w8, [x19, #16]
Lloh30:
	adrp	x9, _CAM_CDB_POINTER@GOTPAGE
Lloh31:
	ldr	x9, [x9, _CAM_CDB_POINTER@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #12
	mov	w9, #8
	csel	x8, x9, x8, eq
	ldr	w0, [x19, x8]
	ldr	x1, [x21, #8]
	ldr	w2, [x19, #4]
	bl	_bcopy
	ldr	x8, [x21, #8]
	ldrsw	x9, [x19, #4]
	add	x0, x8, x9, lsl #2
	mov	w8, #32
	sub	w1, w8, w9
	bl	_bzero
	b	LBB0_14
LBB0_11:
	ldr	w8, [x19, #44]
	str	w8, [x20, #48]
	ldr	w8, [x19, #48]
LBB0_12:
	str	w8, [x20, #52]
Lloh33:
	adrp	x8, _ATA_A_4BIT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ATA_A_4BIT@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
LBB0_13:
	str	w8, [x20, #60]
LBB0_14:
	mov	w0, #20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_XPT_SCSI_IO,8,3                ; @XPT_SCSI_IO
	.comm	_ATA_PACKET_CMD,4,2             ; @ATA_PACKET_CMD
	.comm	_CAM_DIR_MASK,4,2               ; @CAM_DIR_MASK
	.comm	_CAM_DIR_NONE,4,2               ; @CAM_DIR_NONE
	.comm	_ATA_DMA,8,3                    ; @ATA_DMA
	.comm	_ATA_F_DMA,4,2                  ; @ATA_F_DMA
	.comm	_ATA_D_LBA,4,2                  ; @ATA_D_LBA
	.comm	_ATA_A_4BIT,4,2                 ; @ATA_A_4BIT
	.comm	_CAM_CDB_POINTER,4,2            ; @CAM_CDB_POINTER
	.comm	_CAM_ATAIO_CONTROL,4,2          ; @CAM_ATAIO_CONTROL
	.comm	_CAM_ATAIO_FPDMA,4,2            ; @CAM_ATAIO_FPDMA
	.no_dead_strip	_fsl_sata_setup_fis
.subsections_via_symbols
