	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsl_sata_deinit
_fsl_sata_deinit:                       ## @fsl_sata_deinit
	.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, %rbx
	movl	(%rax), %edi
	movq	_FSL_SATA_P_HCTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_ATA_INL
	movl	(%rbx), %edi
	movl	(%r14), %esi
	movq	_FSL_SATA_P_HCTRL_INT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	callq	_ATA_OUTL
	movq	%rbx, %rdi
	callq	_fsl_sata_stop
	movl	(%rbx), %edi
	movq	_FSL_SATA_P_SCTL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	xorl	%edx, %edx
	callq	_ATA_OUTL
	movl	$100, %edi
	callq	_DELAY
	movl	(%rbx), %edi
	movl	(%r15), %esi
	movq	_ATA_SC_DET_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ATA_OUTL
	movl	(%rbx), %edi
	movl	(%r14), %esi
	callq	_ATA_INL
	movl	(%rbx), %edi
	movl	(%r14), %esi
	movq	_FSL_SATA_P_HCTRL_HC_ON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	callq	_ATA_OUTL
	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_INT_MASK,4,2  ## @FSL_SATA_P_HCTRL_INT_MASK
	.comm	_FSL_SATA_P_SCTL,4,2            ## @FSL_SATA_P_SCTL
	.comm	_ATA_SC_DET_DISABLE,4,2         ## @ATA_SC_DET_DISABLE
	.comm	_FSL_SATA_P_HCTRL_HC_ON,4,2     ## @FSL_SATA_P_HCTRL_HC_ON
	.no_dead_strip	_fsl_sata_deinit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsl_sata_deinit
_fsl_sata_deinit:                       ; @fsl_sata_deinit
	.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
	ldr	w8, [x19]
	ldr	w1, [x20]
Lloh2:
	adrp	x9, _FSL_SATA_P_HCTRL_INT_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _FSL_SATA_P_HCTRL_INT_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	bic	w2, w0, w9
	mov	x0, x8
	bl	_ATA_OUTL
	mov	x0, x19
	bl	_fsl_sata_stop
	ldr	w0, [x19]
Lloh5:
	adrp	x21, _FSL_SATA_P_SCTL@GOTPAGE
Lloh6:
	ldr	x21, [x21, _FSL_SATA_P_SCTL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #0
	bl	_ATA_OUTL
	mov	w0, #100
	bl	_DELAY
	ldr	w0, [x19]
	ldr	w1, [x21]
Lloh7:
	adrp	x8, _ATA_SC_DET_DISABLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ATA_SC_DET_DISABLE@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	bl	_ATA_OUTL
	ldr	w0, [x19]
	ldr	w1, [x20]
	bl	_ATA_INL
	ldr	w8, [x19]
	ldr	w1, [x20]
Lloh10:
	adrp	x9, _FSL_SATA_P_HCTRL_HC_ON@GOTPAGE
Lloh11:
	ldr	x9, [x9, _FSL_SATA_P_HCTRL_HC_ON@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	bic	w2, w0, w9
	mov	x0, x8
	bl	_ATA_OUTL
	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	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.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_INT_MASK,4,2  ; @FSL_SATA_P_HCTRL_INT_MASK
	.comm	_FSL_SATA_P_SCTL,4,2            ; @FSL_SATA_P_SCTL
	.comm	_ATA_SC_DET_DISABLE,4,2         ; @ATA_SC_DET_DISABLE
	.comm	_FSL_SATA_P_HCTRL_HC_ON,4,2     ; @FSL_SATA_P_HCTRL_HC_ON
	.no_dead_strip	_fsl_sata_deinit
.subsections_via_symbols
