	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rts5227_extra_init_hw
_rts5227_extra_init_hw:                 ## @rts5227_extra_init_hw
	.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
	movq	%rdi, %rbx
	callq	_rtsx_pci_init_cmd
	movq	_WRITE_REG_CMD@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_GPIO_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$2, %ecx
	movl	$2, %r8d
	callq	_rtsx_pci_add_cmd
	movl	(%r14), %esi
	movq	_ASPM_FORCE_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$63, %ecx
	xorl	%r8d, %r8d
	callq	_rtsx_pci_add_cmd
	movl	(%r14), %esi
	movq	_LDO_PWR_SEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$3, %ecx
	xorl	%r8d, %r8d
	callq	_rtsx_pci_add_cmd
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$3, %ecx
	movl	$1, %r8d
	callq	_rtsx_pci_add_cmd
	movl	(%r14), %esi
	movq	_OLT_LED_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$15, %ecx
	movl	$2, %r8d
	callq	_rtsx_pci_add_cmd
	movl	8(%rbx), %edi
	movq	_PCI_EXP_DEVCTL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_pcie_capability_read_word
	movq	_PCI_EXP_DEVCTL2_LTR_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -28(%rbp)
	je	LBB0_2
## %bb.1:
	movl	(%r14), %esi
	movq	_LTR_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$255, %ecx
	movl	$163, %r8d
	callq	_rtsx_pci_add_cmd
LBB0_2:
	movl	(%r14), %esi
	movq	_OBFF_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$3, %ecx
	movl	$3, %r8d
	callq	_rtsx_pci_add_cmd
	movq	_OUTPUT_3V3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rts5227_fill_driving
	movq	_PCR_REVERSE_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rbx), %eax
	movl	(%r14), %esi
	movq	_PETXCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$136, %r8d
	movl	$184, %eax
	cmovnel	%eax, %r8d
	movq	%rbx, %rdi
	movl	$184, %ecx
	callq	_rtsx_pci_add_cmd
	movl	(%r14), %esi
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
	movl	$16, %ecx
	xorl	%r8d, %r8d
	callq	_rtsx_pci_add_cmd
	movq	%rbx, %rdi
	movl	$100, %esi
	callq	_rtsx_pci_send_cmd
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WRITE_REG_CMD,4,2              ## @WRITE_REG_CMD
	.comm	_GPIO_CTL,4,2                   ## @GPIO_CTL
	.comm	_ASPM_FORCE_CTL,4,2             ## @ASPM_FORCE_CTL
	.comm	_LDO_PWR_SEL,4,2                ## @LDO_PWR_SEL
	.comm	_OLT_LED_CTL,4,2                ## @OLT_LED_CTL
	.comm	_PCI_EXP_DEVCTL2,4,2            ## @PCI_EXP_DEVCTL2
	.comm	_PCI_EXP_DEVCTL2_LTR_EN,4,2     ## @PCI_EXP_DEVCTL2_LTR_EN
	.comm	_LTR_CTL,4,2                    ## @LTR_CTL
	.comm	_OBFF_CFG,4,2                   ## @OBFF_CFG
	.comm	_OUTPUT_3V3,4,2                 ## @OUTPUT_3V3
	.comm	_PCR_REVERSE_SOCKET,4,2         ## @PCR_REVERSE_SOCKET
	.comm	_PETXCFG,4,2                    ## @PETXCFG
	.no_dead_strip	_rts5227_extra_init_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rts5227_extra_init_hw
_rts5227_extra_init_hw:                 ; @rts5227_extra_init_hw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_rtsx_pci_init_cmd
Lloh0:
	adrp	x20, _WRITE_REG_CMD@GOTPAGE
Lloh1:
	ldr	x20, [x20, _WRITE_REG_CMD@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x8, _GPIO_CTL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GPIO_CTL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #2
	mov	w4, #2
	bl	_rtsx_pci_add_cmd
	ldr	w1, [x20]
Lloh5:
	adrp	x8, _ASPM_FORCE_CTL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ASPM_FORCE_CTL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #63
	mov	w4, #0
	bl	_rtsx_pci_add_cmd
	ldr	w1, [x20]
Lloh8:
	adrp	x21, _LDO_PWR_SEL@GOTPAGE
Lloh9:
	ldr	x21, [x21, _LDO_PWR_SEL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #3
	mov	w4, #0
	bl	_rtsx_pci_add_cmd
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #3
	mov	w4, #1
	bl	_rtsx_pci_add_cmd
	ldr	w1, [x20]
Lloh10:
	adrp	x8, _OLT_LED_CTL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _OLT_LED_CTL@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #15
	mov	w4, #2
	bl	_rtsx_pci_add_cmd
	ldr	w0, [x19, #8]
Lloh13:
	adrp	x8, _PCI_EXP_DEVCTL2@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PCI_EXP_DEVCTL2@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pcie_capability_read_word
	ldr	w8, [sp, #12]
Lloh16:
	adrp	x9, _PCI_EXP_DEVCTL2_LTR_EN@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PCI_EXP_DEVCTL2_LTR_EN@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w1, [x20]
Lloh19:
	adrp	x8, _LTR_CTL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LTR_CTL@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #255
	mov	w4, #163
	bl	_rtsx_pci_add_cmd
LBB0_2:
	ldr	w1, [x20]
Lloh22:
	adrp	x8, _OBFF_CFG@GOTPAGE
Lloh23:
	ldr	x8, [x8, _OBFF_CFG@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #3
	mov	w4, #3
	bl	_rtsx_pci_add_cmd
Lloh25:
	adrp	x8, _OUTPUT_3V3@GOTPAGE
Lloh26:
	ldr	x8, [x8, _OUTPUT_3V3@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rts5227_fill_driving
	ldr	w8, [x19]
Lloh28:
	adrp	x9, _PCR_REVERSE_SOCKET@GOTPAGE
Lloh29:
	ldr	x9, [x9, _PCR_REVERSE_SOCKET@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
Lloh31:
	adrp	x10, _PETXCFG@GOTPAGE
Lloh32:
	ldr	x10, [x10, _PETXCFG@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh33:
	ldr	w2, [x10]
	tst	w9, w8
	mov	w8, #184
	mov	w9, #136
	csel	w4, w9, w8, eq
	mov	x0, x19
	mov	w3, #184
	bl	_rtsx_pci_add_cmd
	ldr	w1, [x20]
	ldr	w2, [x19, #4]
	mov	x0, x19
	mov	w3, #16
	mov	w4, #0
	bl	_rtsx_pci_add_cmd
	mov	x0, x19
	mov	w1, #100
	bl	_rtsx_pci_send_cmd
	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
	add	sp, sp, #64
	ret
	.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	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_WRITE_REG_CMD,4,2              ; @WRITE_REG_CMD
	.comm	_GPIO_CTL,4,2                   ; @GPIO_CTL
	.comm	_ASPM_FORCE_CTL,4,2             ; @ASPM_FORCE_CTL
	.comm	_LDO_PWR_SEL,4,2                ; @LDO_PWR_SEL
	.comm	_OLT_LED_CTL,4,2                ; @OLT_LED_CTL
	.comm	_PCI_EXP_DEVCTL2,4,2            ; @PCI_EXP_DEVCTL2
	.comm	_PCI_EXP_DEVCTL2_LTR_EN,4,2     ; @PCI_EXP_DEVCTL2_LTR_EN
	.comm	_LTR_CTL,4,2                    ; @LTR_CTL
	.comm	_OBFF_CFG,4,2                   ; @OBFF_CFG
	.comm	_OUTPUT_3V3,4,2                 ; @OUTPUT_3V3
	.comm	_PCR_REVERSE_SOCKET,4,2         ; @PCR_REVERSE_SOCKET
	.comm	_PETXCFG,4,2                    ; @PETXCFG
	.no_dead_strip	_rts5227_extra_init_hw
.subsections_via_symbols
