	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsl_sata_init
_fsl_sata_init:                         ## @fsl_sata_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_device_get_softc
	movq	%rax, %r15
	movl	(%rax), %edi
	movq	_FSL_SATA_P_HCTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_ATA_INL
	movq	_FSL_SATA_P_HCTRL_HC_ON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	_FSL_SATA_P_HCTRL_HC_FORCE_OFF@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r15), %edi
	movl	(%r14), %esi
	movq	_FSL_SATA_P_HCTRL_INT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	%ebx, %edx
	callq	_ATA_OUTL
	movq	_FSL_SATA_P_HSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FSL_SATA_P_HSTS_HS_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	callq	_fsl_sata_wait_register
	movq	_FSL_SATA_CL_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addl	4(%r15), %edx
	movl	(%r15), %edi
	movq	_FSL_SATA_P_CHBA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATA_OUTL
	movq	_FSL_SATA_P_HCTRL_ENT@GOTPCREL(%rip), %rax
	movq	_FSL_SATA_P_HCTRL_PM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	notl	%edx
	andl	%ebx, %edx
	movl	(%r15), %edi
	movl	(%r14), %esi
	callq	_ATA_OUTL
	movl	(%r15), %edi
	movq	_FSL_SATA_P_PCC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_ATA_INL
	movl	(%r15), %edi
	movl	(%rbx), %esi
	movq	_FSL_SATA_PCC_LPB_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	callq	_ATA_OUTL
	movl	(%r15), %edi
	movq	_FSL_SATA_P_ICC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FSL_SATA_P_ICC_ITC_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %edx
	shll	%cl, %edx
	callq	_ATA_OUTL
	movq	%r15, %rdi
	callq	_fsl_sata_start
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FSL_SATA_P_HCTRL,4,2           ## @FSL_SATA_P_HCTRL
	.comm	_FSL_SATA_P_HCTRL_HC_ON,4,2     ## @FSL_SATA_P_HCTRL_HC_ON
	.comm	_FSL_SATA_P_HCTRL_HC_FORCE_OFF,4,2 ## @FSL_SATA_P_HCTRL_HC_FORCE_OFF
	.comm	_FSL_SATA_P_HCTRL_INT_MASK,4,2  ## @FSL_SATA_P_HCTRL_INT_MASK
	.comm	_FSL_SATA_P_HSTS,4,2            ## @FSL_SATA_P_HSTS
	.comm	_FSL_SATA_P_HSTS_HS_ON,4,2      ## @FSL_SATA_P_HSTS_HS_ON
	.comm	_FSL_SATA_CL_OFFSET,4,2         ## @FSL_SATA_CL_OFFSET
	.comm	_FSL_SATA_P_CHBA,4,2            ## @FSL_SATA_P_CHBA
	.comm	_FSL_SATA_P_HCTRL_ENT,4,2       ## @FSL_SATA_P_HCTRL_ENT
	.comm	_FSL_SATA_P_HCTRL_PM,4,2        ## @FSL_SATA_P_HCTRL_PM
	.comm	_FSL_SATA_P_PCC,4,2             ## @FSL_SATA_P_PCC
	.comm	_FSL_SATA_PCC_LPB_EN,4,2        ## @FSL_SATA_PCC_LPB_EN
	.comm	_FSL_SATA_P_ICC,4,2             ## @FSL_SATA_P_ICC
	.comm	_FSL_SATA_P_ICC_ITC_S,4,2       ## @FSL_SATA_P_ICC_ITC_S
	.no_dead_strip	_fsl_sata_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsl_sata_init
_fsl_sata_init:                         ; @fsl_sata_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_device_get_softc
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x20, _FSL_SATA_P_HCTRL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _FSL_SATA_P_HCTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_ATA_INL
Lloh2:
	adrp	x8, _FSL_SATA_P_HCTRL_HC_ON@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FSL_SATA_P_HCTRL_HC_ON@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh5:
	adrp	x9, _FSL_SATA_P_HCTRL_HC_FORCE_OFF@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FSL_SATA_P_HCTRL_HC_FORCE_OFF@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w21, w8, w9
	ldr	w0, [x19]
	ldr	w1, [x20]
Lloh8:
	adrp	x8, _FSL_SATA_P_HCTRL_INT_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FSL_SATA_P_HCTRL_INT_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	bic	w2, w21, w8
	bl	_ATA_OUTL
Lloh11:
	adrp	x8, _FSL_SATA_P_HSTS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FSL_SATA_P_HSTS@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _FSL_SATA_P_HSTS_HS_ON@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FSL_SATA_P_HSTS_HS_ON@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #1000
	bl	_fsl_sata_wait_register
Lloh17:
	adrp	x8, _FSL_SATA_CL_OFFSET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _FSL_SATA_CL_OFFSET@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldp	w0, w9, [x19]
	add	w2, w8, w9
Lloh20:
	adrp	x8, _FSL_SATA_P_CHBA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FSL_SATA_P_CHBA@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_ATA_OUTL
Lloh23:
	adrp	x8, _FSL_SATA_P_HCTRL_ENT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FSL_SATA_P_HCTRL_ENT@GOTPAGEOFF]
Lloh25:
	adrp	x9, _FSL_SATA_P_HCTRL_PM@GOTPAGE
Lloh26:
	ldr	x9, [x9, _FSL_SATA_P_HCTRL_PM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w2, w21, w8
	ldr	w0, [x19]
	ldr	w1, [x20]
	bl	_ATA_OUTL
	ldr	w0, [x19]
Lloh29:
	adrp	x20, _FSL_SATA_P_PCC@GOTPAGE
Lloh30:
	ldr	x20, [x20, _FSL_SATA_P_PCC@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_ATA_INL
	ldr	w8, [x19]
	ldr	w1, [x20]
Lloh31:
	adrp	x9, _FSL_SATA_PCC_LPB_EN@GOTPAGE
Lloh32:
	ldr	x9, [x9, _FSL_SATA_PCC_LPB_EN@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	bic	w2, w0, w9
	mov	x0, x8
	bl	_ATA_OUTL
	ldr	w0, [x19]
Lloh34:
	adrp	x8, _FSL_SATA_P_ICC@GOTPAGE
Lloh35:
	ldr	x8, [x8, _FSL_SATA_P_ICC@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
Lloh37:
	adrp	x8, _FSL_SATA_P_ICC_ITC_S@GOTPAGE
Lloh38:
	ldr	x8, [x8, _FSL_SATA_P_ICC_ITC_S@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w2, w9, w8
	bl	_ATA_OUTL
	mov	x0, x19
	bl	_fsl_sata_start
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh27
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_FSL_SATA_P_HCTRL,4,2           ; @FSL_SATA_P_HCTRL
	.comm	_FSL_SATA_P_HCTRL_HC_ON,4,2     ; @FSL_SATA_P_HCTRL_HC_ON
	.comm	_FSL_SATA_P_HCTRL_HC_FORCE_OFF,4,2 ; @FSL_SATA_P_HCTRL_HC_FORCE_OFF
	.comm	_FSL_SATA_P_HCTRL_INT_MASK,4,2  ; @FSL_SATA_P_HCTRL_INT_MASK
	.comm	_FSL_SATA_P_HSTS,4,2            ; @FSL_SATA_P_HSTS
	.comm	_FSL_SATA_P_HSTS_HS_ON,4,2      ; @FSL_SATA_P_HSTS_HS_ON
	.comm	_FSL_SATA_CL_OFFSET,4,2         ; @FSL_SATA_CL_OFFSET
	.comm	_FSL_SATA_P_CHBA,4,2            ; @FSL_SATA_P_CHBA
	.comm	_FSL_SATA_P_HCTRL_ENT,4,2       ; @FSL_SATA_P_HCTRL_ENT
	.comm	_FSL_SATA_P_HCTRL_PM,4,2        ; @FSL_SATA_P_HCTRL_PM
	.comm	_FSL_SATA_P_PCC,4,2             ; @FSL_SATA_P_PCC
	.comm	_FSL_SATA_PCC_LPB_EN,4,2        ; @FSL_SATA_PCC_LPB_EN
	.comm	_FSL_SATA_P_ICC,4,2             ; @FSL_SATA_P_ICC
	.comm	_FSL_SATA_P_ICC_ITC_S,4,2       ; @FSL_SATA_P_ICC_ITC_S
	.no_dead_strip	_fsl_sata_init
.subsections_via_symbols
