	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sata_powerup
_sata_powerup:                          ## @sata_powerup
	.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, %r12
	movq	_XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_RD4
	movq	_IOPHY_MISC_PAD_S0_CTL1_IDDQ_OVRD@GOTPCREL(%rip), %rcx
	movq	_IOPHY_MISC_PAD_S0_CTL1_IDDQ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_WR4
	movq	_XUSB_PADCTL_IOPHY_PLL_S0_CTL1@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_RD4
	movq	_IOPHY_PLL_S0_CTL1_PLL_PWR_OVRD@GOTPCREL(%rip), %rcx
	movq	_IOPHY_PLL_S0_CTL1_PLL_IDDQ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_WR4
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_RD4
	movq	_IOPHY_PLL_S0_CTL1_PLL1_MODE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_WR4
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_RD4
	movq	_IOPHY_PLL_S0_CTL1_PLL_RST_L@GOTPCREL(%rip), %r15
	orl	(%r15), %eax
	movl	(%r14), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_WR4
	movl	$101, %ebx
	movq	_IOPHY_PLL_S0_CTL1_PLL1_LOCKDET@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_RD4
	testl	%eax, (%r13)
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$100, %edi
	callq	_DELAY
	decl	%ebx
	jne	LBB0_1
	jmp	LBB0_4
LBB0_3:
	cmpl	$1, %ebx
	jne	LBB0_5
LBB0_4:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_5:
	movq	_XUSB_PADCTL_USB3_PAD_MUX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_RD4
	orl	(%r15), %eax
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_WR4
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_RD4
	movq	_USB3_PAD_MUX_SATA_IDDQ_DISABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_WR4
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1,4,2 ## @XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1
	.comm	_IOPHY_MISC_PAD_S0_CTL1_IDDQ_OVRD,4,2 ## @IOPHY_MISC_PAD_S0_CTL1_IDDQ_OVRD
	.comm	_IOPHY_MISC_PAD_S0_CTL1_IDDQ,4,2 ## @IOPHY_MISC_PAD_S0_CTL1_IDDQ
	.comm	_XUSB_PADCTL_IOPHY_PLL_S0_CTL1,4,2 ## @XUSB_PADCTL_IOPHY_PLL_S0_CTL1
	.comm	_IOPHY_PLL_S0_CTL1_PLL_PWR_OVRD,4,2 ## @IOPHY_PLL_S0_CTL1_PLL_PWR_OVRD
	.comm	_IOPHY_PLL_S0_CTL1_PLL_IDDQ,4,2 ## @IOPHY_PLL_S0_CTL1_PLL_IDDQ
	.comm	_IOPHY_PLL_S0_CTL1_PLL1_MODE,4,2 ## @IOPHY_PLL_S0_CTL1_PLL1_MODE
	.comm	_IOPHY_PLL_S0_CTL1_PLL_RST_L,4,2 ## @IOPHY_PLL_S0_CTL1_PLL_RST_L
	.comm	_IOPHY_PLL_S0_CTL1_PLL1_LOCKDET,4,2 ## @IOPHY_PLL_S0_CTL1_PLL1_LOCKDET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to power up SATA phy\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_XUSB_PADCTL_USB3_PAD_MUX,4,2   ## @XUSB_PADCTL_USB3_PAD_MUX
	.comm	_USB3_PAD_MUX_SATA_IDDQ_DISABLE,4,2 ## @USB3_PAD_MUX_SATA_IDDQ_DISABLE
	.no_dead_strip	_sata_powerup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sata_powerup
_sata_powerup:                          ; @sata_powerup
	.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	x19, x0
Lloh0:
	adrp	x20, _XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1@GOTPAGE
Lloh1:
	ldr	x20, [x20, _XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_RD4
Lloh2:
	adrp	x8, _IOPHY_MISC_PAD_S0_CTL1_IDDQ_OVRD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IOPHY_MISC_PAD_S0_CTL1_IDDQ_OVRD@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _IOPHY_MISC_PAD_S0_CTL1_IDDQ@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IOPHY_MISC_PAD_S0_CTL1_IDDQ@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w2, w0, w8
	ldr	w1, [x20]
	mov	x0, x19
	bl	_WR4
Lloh8:
	adrp	x20, _XUSB_PADCTL_IOPHY_PLL_S0_CTL1@GOTPAGE
Lloh9:
	ldr	x20, [x20, _XUSB_PADCTL_IOPHY_PLL_S0_CTL1@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_RD4
Lloh10:
	adrp	x8, _IOPHY_PLL_S0_CTL1_PLL_PWR_OVRD@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IOPHY_PLL_S0_CTL1_PLL_PWR_OVRD@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _IOPHY_PLL_S0_CTL1_PLL_IDDQ@GOTPAGE
Lloh14:
	ldr	x9, [x9, _IOPHY_PLL_S0_CTL1_PLL_IDDQ@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w2, w0, w8
	ldr	w1, [x20]
	mov	x0, x19
	bl	_WR4
	ldr	w1, [x20]
	mov	x0, x19
	bl	_RD4
Lloh16:
	adrp	x8, _IOPHY_PLL_S0_CTL1_PLL1_MODE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IOPHY_PLL_S0_CTL1_PLL1_MODE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_WR4
	ldr	w1, [x20]
	mov	x0, x19
	bl	_RD4
Lloh19:
	adrp	x21, _IOPHY_PLL_S0_CTL1_PLL_RST_L@GOTPAGE
Lloh20:
	ldr	x21, [x21, _IOPHY_PLL_S0_CTL1_PLL_RST_L@GOTPAGEOFF]
	ldr	w8, [x21]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_WR4
	mov	w22, #101
Lloh21:
	adrp	x23, _IOPHY_PLL_S0_CTL1_PLL1_LOCKDET@GOTPAGE
Lloh22:
	ldr	x23, [x23, _IOPHY_PLL_S0_CTL1_PLL1_LOCKDET@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_RD4
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #100
	bl	_DELAY
	subs	w22, w22, #1
	b.ne	LBB0_1
	b	LBB0_4
LBB0_3:
	cmp	w22, #1
	b.ne	LBB0_5
LBB0_4:
	ldr	w0, [x19]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_printf
Lloh25:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_5:
Lloh28:
	adrp	x20, _XUSB_PADCTL_USB3_PAD_MUX@GOTPAGE
Lloh29:
	ldr	x20, [x20, _XUSB_PADCTL_USB3_PAD_MUX@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_RD4
	ldr	w8, [x21]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_WR4
	ldr	w1, [x20]
	mov	x0, x19
	bl	_RD4
Lloh30:
	adrp	x8, _USB3_PAD_MUX_SATA_IDDQ_DISABLE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _USB3_PAD_MUX_SATA_IDDQ_DISABLE@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_WR4
	mov	w0, #0
LBB0_6:
	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 AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1,4,2 ; @XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1
	.comm	_IOPHY_MISC_PAD_S0_CTL1_IDDQ_OVRD,4,2 ; @IOPHY_MISC_PAD_S0_CTL1_IDDQ_OVRD
	.comm	_IOPHY_MISC_PAD_S0_CTL1_IDDQ,4,2 ; @IOPHY_MISC_PAD_S0_CTL1_IDDQ
	.comm	_XUSB_PADCTL_IOPHY_PLL_S0_CTL1,4,2 ; @XUSB_PADCTL_IOPHY_PLL_S0_CTL1
	.comm	_IOPHY_PLL_S0_CTL1_PLL_PWR_OVRD,4,2 ; @IOPHY_PLL_S0_CTL1_PLL_PWR_OVRD
	.comm	_IOPHY_PLL_S0_CTL1_PLL_IDDQ,4,2 ; @IOPHY_PLL_S0_CTL1_PLL_IDDQ
	.comm	_IOPHY_PLL_S0_CTL1_PLL1_MODE,4,2 ; @IOPHY_PLL_S0_CTL1_PLL1_MODE
	.comm	_IOPHY_PLL_S0_CTL1_PLL_RST_L,4,2 ; @IOPHY_PLL_S0_CTL1_PLL_RST_L
	.comm	_IOPHY_PLL_S0_CTL1_PLL1_LOCKDET,4,2 ; @IOPHY_PLL_S0_CTL1_PLL1_LOCKDET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to power up SATA phy\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_XUSB_PADCTL_USB3_PAD_MUX,4,2   ; @XUSB_PADCTL_USB3_PAD_MUX
	.comm	_USB3_PAD_MUX_SATA_IDDQ_DISABLE,4,2 ; @USB3_PAD_MUX_SATA_IDDQ_DISABLE
	.no_dead_strip	_sata_powerup
.subsections_via_symbols
