	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_widgets_power_state_vt1716S
_set_widgets_power_state_vt1716S:       ## @set_widgets_power_state_vt1716S
	.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, %r15
	movq	(%rdi), %r12
	movq	_AC_VERB_GET_CONNECT_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$23, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_snd_hda_codec_read
	movl	%eax, %ebx
	movq	_AC_PWRST_D3@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)
	leaq	-44(%rbp), %r14
	movq	%r15, %rdi
	movl	$26, %esi
	movq	%r14, %rdx
	callq	_set_pin_power_state
	movq	%r15, %rdi
	movl	$27, %esi
	movq	%r14, %rdx
	callq	_set_pin_power_state
	movq	%r15, %rdi
	movl	$30, %esi
	movq	%r14, %rdx
	callq	_set_pin_power_state
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	cmpl	$5, %ebx
	jne	LBB0_1
## %bb.2:
	movq	_AC_PWRST_D0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, -44(%rbp)
	jmp	LBB0_3
LBB0_1:
	movl	-44(%rbp), %edx
LBB0_3:
	movq	%r15, %rdi
	movl	$23, %esi
	callq	_update_power_state
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movl	$19, %esi
	callq	_update_power_state
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$30, %esi
	callq	_set_pin_power_state
	cmpq	$0, 8(%r12)
	je	LBB0_5
## %bb.4:
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$34, %esi
	callq	_set_pin_power_state
	jmp	LBB0_6
LBB0_5:
	movq	_AC_PWRST_D3@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$34, %esi
	callq	_update_power_state
LBB0_6:
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movl	$38, %esi
	callq	_update_power_state
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movl	$20, %esi
	callq	_update_power_state
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$25, %esi
	callq	_set_pin_power_state
	movq	%r15, %rdi
	callq	_smart51_enabled
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$27, %esi
	callq	_set_pin_power_state
LBB0_8:
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movl	$24, %esi
	callq	_update_power_state
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movl	$17, %esi
	callq	_update_power_state
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$35, %esi
	callq	_set_pin_power_state
	movq	%r15, %rdi
	callq	_smart51_enabled
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$26, %esi
	callq	_set_pin_power_state
LBB0_10:
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movl	$39, %esi
	callq	_update_power_state
	movq	%r15, %rdi
	callq	_smart51_enabled
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$30, %esi
	callq	_set_pin_power_state
LBB0_12:
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movl	$37, %esi
	callq	_update_power_state
	movq	%r15, %rdi
	movl	$28, %esi
	callq	_snd_hda_jack_detect
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:
	movq	%r15, %rdi
	movl	$29, %esi
	callq	_snd_hda_jack_detect
	xorl	%r14d, %r14d
	cmpq	$0, (%r12)
	movq	_AC_PWRST_D0@GOTPCREL(%rip), %rcx
	jne	LBB0_16
## %bb.14:
	testl	%eax, %eax
	je	LBB0_16
LBB0_15:
	movb	$1, %r14b
	movq	%r13, %rcx
LBB0_16:
	movl	(%rcx), %edx
	movl	%edx, -44(%rbp)
	movq	%r15, %rdi
	movl	$40, %esi
	callq	_update_power_state
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movl	$41, %esi
	callq	_update_power_state
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movl	$42, %esi
	callq	_update_power_state
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)
	leaq	-44(%rbp), %rbx
	movq	%r15, %rdi
	movl	$28, %esi
	movq	%rbx, %rdx
	callq	_set_pin_power_state
	movq	%r15, %rdi
	movl	$29, %esi
	movq	%rbx, %rdx
	callq	_set_pin_power_state
	cmpq	$0, (%r12)
	je	LBB0_18
## %bb.17:
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movl	$37, %esi
	callq	_update_power_state
LBB0_18:
	cmpl	$5, -48(%rbp)                   ## 4-byte Folded Reload
	movq	_AC_PWRST_D0@GOTPCREL(%rip), %r12
	movq	%rbx, %rax
	cmoveq	%r12, %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$22, %esi
	callq	_update_power_state
	testb	%r14b, %r14b
	cmoveq	%r12, %rbx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movl	$16, %esi
	callq	_update_power_state
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AC_VERB_GET_CONNECT_SEL,4,2    ## @AC_VERB_GET_CONNECT_SEL
	.comm	_AC_PWRST_D3,4,2                ## @AC_PWRST_D3
	.comm	_AC_PWRST_D0,4,2                ## @AC_PWRST_D0
	.no_dead_strip	_set_widgets_power_state_vt1716S
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_widgets_power_state_vt1716S
_set_widgets_power_state_vt1716S:       ; @set_widgets_power_state_vt1716S
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _AC_VERB_GET_CONNECT_SEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AC_VERB_GET_CONNECT_SEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	w1, #23
	mov	w2, #0
	mov	w4, #0
	bl	_snd_hda_codec_read
	mov	x20, x0
Lloh3:
	adrp	x23, _AC_PWRST_D3@GOTPAGE
Lloh4:
	ldr	x23, [x23, _AC_PWRST_D3@GOTPAGEOFF]
	ldr	w8, [x23]
	str	w8, [sp, #12]
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #26
	bl	_set_pin_power_state
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #27
	bl	_set_pin_power_state
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #30
	bl	_set_pin_power_state
Lloh5:
	adrp	x22, _AC_PWRST_D0@GOTPAGE
Lloh6:
	ldr	x22, [x22, _AC_PWRST_D0@GOTPAGEOFF]
	cmp	w20, #5
	b.ne	LBB0_2
; %bb.1:
	ldr	w2, [x22]
	str	w2, [sp, #12]
	b	LBB0_3
LBB0_2:
	ldr	w2, [sp, #12]
LBB0_3:
	mov	x0, x19
	mov	w1, #23
	bl	_update_power_state
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #19
	bl	_update_power_state
	ldr	w8, [x23]
	str	w8, [sp, #12]
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #30
	bl	_set_pin_power_state
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_5
; %bb.4:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #34
	bl	_set_pin_power_state
	b	LBB0_6
LBB0_5:
	ldr	w2, [x23]
	mov	x0, x19
	mov	w1, #34
	bl	_update_power_state
LBB0_6:
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #38
	bl	_update_power_state
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #20
	bl	_update_power_state
	ldr	w8, [x23]
	str	w8, [sp, #12]
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #25
	bl	_set_pin_power_state
	mov	x0, x19
	bl	_smart51_enabled
	cbz	x0, LBB0_8
; %bb.7:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #27
	bl	_set_pin_power_state
LBB0_8:
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #24
	bl	_update_power_state
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #17
	bl	_update_power_state
	ldr	w8, [x23]
	str	w8, [sp, #12]
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #35
	bl	_set_pin_power_state
	mov	x0, x19
	bl	_smart51_enabled
	cbz	x0, LBB0_10
; %bb.9:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #26
	bl	_set_pin_power_state
LBB0_10:
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #39
	bl	_update_power_state
	mov	x0, x19
	bl	_smart51_enabled
	cbz	x0, LBB0_12
; %bb.11:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #30
	bl	_set_pin_power_state
LBB0_12:
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #37
	bl	_update_power_state
	mov	x0, x19
	mov	w1, #28
	bl	_snd_hda_jack_detect
	cbnz	w0, LBB0_15
; %bb.13:
	mov	x0, x19
	mov	w1, #29
	bl	_snd_hda_jack_detect
	mov	w24, #0
	ldr	x9, [x21]
Lloh7:
	adrp	x8, _AC_PWRST_D0@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AC_PWRST_D0@GOTPAGEOFF]
	cbnz	x9, LBB0_16
; %bb.14:
	cbz	w0, LBB0_16
LBB0_15:
Lloh9:
	adrp	x8, _AC_PWRST_D3@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AC_PWRST_D3@GOTPAGEOFF]
	mov	w24, #1
LBB0_16:
	ldr	w2, [x8]
	str	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #40
	bl	_update_power_state
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #41
	bl	_update_power_state
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #42
	bl	_update_power_state
	ldr	w8, [x23]
	str	w8, [sp, #12]
	add	x23, sp, #12
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #28
	bl	_set_pin_power_state
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #29
	bl	_set_pin_power_state
	ldr	x8, [x21]
	cbz	x8, LBB0_18
; %bb.17:
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #37
	bl	_update_power_state
LBB0_18:
	cmp	w20, #5
	csel	x8, x22, x23, eq
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #22
	bl	_update_power_state
	cmp	w24, #0
	csel	x8, x23, x22, ne
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #16
	bl	_update_power_state
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AC_VERB_GET_CONNECT_SEL,4,2    ; @AC_VERB_GET_CONNECT_SEL
	.comm	_AC_PWRST_D3,4,2                ; @AC_PWRST_D3
	.comm	_AC_PWRST_D0,4,2                ; @AC_PWRST_D0
	.no_dead_strip	_set_widgets_power_state_vt1716S
.subsections_via_symbols
