	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via_reset_pcictrl
_via_reset_pcictrl:                     ## @via_reset_pcictrl
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_via_save_pcictrlreg
	movq	%r15, %rdi
	callq	_via_save_sdcreg
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_VIA_CRDR_PCICLKGATT_PAD_PWRON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movq	_MMC_VDD_165_195@GOTPCREL(%rip), %rdx
	movq	_VIA_CRDR_PCICLKGATT_3V3@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ebx
	movl	%ebx, %esi
	andl	%eax, %esi
	orl	%eax, %ebx
	cmpq	(%rdx), %rcx
	cmovel	%esi, %ebx
	movq	_VIA_CRDR_PCICLKGATT@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	16(%r15), %rsi
	movl	%ebx, %edi
	callq	_writeb
	movq	%r15, %rdi
	callq	_via_pwron_sleep
	movq	_VIA_CRDR_PCICLKGATT_SFTRST@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	(%r12), %rsi
	addq	16(%r15), %rsi
	movl	%ebx, %edi
	callq	_writeb
	movl	$3, %edi
	callq	_msleep
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_via_restore_pcictrlreg
	movq	%r15, %rdi
	callq	_via_restore_sdcreg
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VIA_CRDR_PCICLKGATT_PAD_PWRON,4,2 ## @VIA_CRDR_PCICLKGATT_PAD_PWRON
	.comm	_MMC_VDD_165_195,8,3            ## @MMC_VDD_165_195
	.comm	_VIA_CRDR_PCICLKGATT_3V3,4,2    ## @VIA_CRDR_PCICLKGATT_3V3
	.comm	_VIA_CRDR_PCICLKGATT,8,3        ## @VIA_CRDR_PCICLKGATT
	.comm	_VIA_CRDR_PCICLKGATT_SFTRST,4,2 ## @VIA_CRDR_PCICLKGATT_SFTRST
	.no_dead_strip	_via_reset_pcictrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via_reset_pcictrl
_via_reset_pcictrl:                     ; @via_reset_pcictrl
	.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
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_via_save_pcictrlreg
	mov	x0, x20
	bl	_via_save_sdcreg
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh0:
	adrp	x8, _VIA_CRDR_PCICLKGATT_PAD_PWRON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIA_CRDR_PCICLKGATT_PAD_PWRON@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x20]
Lloh3:
	adrp	x10, _MMC_VDD_165_195@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MMC_VDD_165_195@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x11, _VIA_CRDR_PCICLKGATT_3V3@GOTPAGE
Lloh7:
	ldr	x11, [x11, _VIA_CRDR_PCICLKGATT_3V3@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	and	w12, w11, w8
	orr	w8, w11, w8
	cmp	x9, x10
	csel	w21, w12, w8, eq
	ldr	x8, [x20, #16]
Lloh9:
	adrp	x22, _VIA_CRDR_PCICLKGATT@GOTPAGE
Lloh10:
	ldr	x22, [x22, _VIA_CRDR_PCICLKGATT@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writeb
	mov	x0, x20
	bl	_via_pwron_sleep
Lloh11:
	adrp	x8, _VIA_CRDR_PCICLKGATT_SFTRST@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VIA_CRDR_PCICLKGATT_SFTRST@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w0, w8, w21
	ldr	x8, [x20, #16]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writeb
	mov	w0, #3
	bl	_msleep
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_via_restore_pcictrlreg
	mov	x0, x20
	bl	_via_restore_sdcreg
	mov	x0, x19
	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
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VIA_CRDR_PCICLKGATT_PAD_PWRON,4,2 ; @VIA_CRDR_PCICLKGATT_PAD_PWRON
	.comm	_MMC_VDD_165_195,8,3            ; @MMC_VDD_165_195
	.comm	_VIA_CRDR_PCICLKGATT_3V3,4,2    ; @VIA_CRDR_PCICLKGATT_3V3
	.comm	_VIA_CRDR_PCICLKGATT,8,3        ; @VIA_CRDR_PCICLKGATT
	.comm	_VIA_CRDR_PCICLKGATT_SFTRST,4,2 ; @VIA_CRDR_PCICLKGATT_SFTRST
	.no_dead_strip	_via_reset_pcictrl
.subsections_via_symbols
