	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via_sdc_set_power
_via_sdc_set_power:                     ## @via_sdc_set_power
	.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
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	$1, %eax
	movl	%r12d, %ecx
	shll	%cl, %eax
	movl	%eax, (%rbx)
	movq	_VIA_CRDR_PCICLKGATT@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	8(%rbx), %rdi
	callq	_readb
	movl	(%rbx), %ecx
	movq	_MMC_VDD_165_195@GOTPCREL(%rip), %rdx
	movq	_VIA_CRDR_PCICLKGATT_3V3@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, %edi
	notl	%edi
	andl	%eax, %edi
	orl	%eax, %esi
	cmpl	(%rdx), %ecx
	cmovel	%edi, %esi
	movq	_VIA_CRDR_PCICLKGATT_PAD_PWRON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %eax
	orl	%esi, %eax
	notl	%edi
	andl	%esi, %edi
	testl	%r15d, %r15d
	cmovnel	%eax, %edi
	movq	(%r12), %rsi
	addq	8(%rbx), %rsi
	callq	_writeb
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_via_pwron_sleep                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VIA_CRDR_PCICLKGATT,8,3        ## @VIA_CRDR_PCICLKGATT
	.comm	_MMC_VDD_165_195,4,2            ## @MMC_VDD_165_195
	.comm	_VIA_CRDR_PCICLKGATT_3V3,4,2    ## @VIA_CRDR_PCICLKGATT_3V3
	.comm	_VIA_CRDR_PCICLKGATT_PAD_PWRON,4,2 ## @VIA_CRDR_PCICLKGATT_PAD_PWRON
	.no_dead_strip	_via_sdc_set_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via_sdc_set_power
_via_sdc_set_power:                     ; @via_sdc_set_power
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	add	x22, x0, #4
	mov	x0, x22
	bl	_spin_lock_irqsave
	mov	w8, #1
	lsl	w8, w8, w20
	str	w8, [x21]
	ldr	x8, [x21, #8]
Lloh0:
	adrp	x20, _VIA_CRDR_PCICLKGATT@GOTPAGE
Lloh1:
	ldr	x20, [x20, _VIA_CRDR_PCICLKGATT@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readb
	ldr	w8, [x21]
Lloh2:
	adrp	x9, _MMC_VDD_165_195@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MMC_VDD_165_195@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _VIA_CRDR_PCICLKGATT_3V3@GOTPAGE
Lloh6:
	ldr	x10, [x10, _VIA_CRDR_PCICLKGATT_3V3@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	bic	w11, w0, w10
	orr	w10, w10, w0
	cmp	w8, w9
	csel	w8, w11, w10, eq
Lloh8:
	adrp	x9, _VIA_CRDR_PCICLKGATT_PAD_PWRON@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VIA_CRDR_PCICLKGATT_PAD_PWRON@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w10, w9, w8
	bic	w8, w8, w9
	cmp	w19, #0
	csel	w0, w8, w10, eq
	ldr	x8, [x21, #8]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writeb
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	x0, x21
	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	_via_pwron_sleep
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_VIA_CRDR_PCICLKGATT,8,3        ; @VIA_CRDR_PCICLKGATT
	.comm	_MMC_VDD_165_195,4,2            ; @MMC_VDD_165_195
	.comm	_VIA_CRDR_PCICLKGATT_3V3,4,2    ; @VIA_CRDR_PCICLKGATT_3V3
	.comm	_VIA_CRDR_PCICLKGATT_PAD_PWRON,4,2 ; @VIA_CRDR_PCICLKGATT_PAD_PWRON
	.no_dead_strip	_via_sdc_set_power
.subsections_via_symbols
