	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function patch_vt1702
_patch_vt1702:                          ## @patch_vt1702
	.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, %r14
	callq	_via_new_spec
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	$26, 16(%rax)
	movq	_HDA_INPUT@GOTPCREL(%rip), %rax
	movq	_AC_AMPCAP_OFFSET_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$23, %esi
	movl	$23, %edi
	shll	%cl, %edi
	movq	_AC_AMPCAP_NUM_STEPS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movl	(%rax), %edx
	orl	%edi, %esi
	movq	_AC_AMPCAP_STEP_SIZE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$5, %eax
	shll	%cl, %eax
	orl	%esi, %eax
	movq	_AC_AMPCAP_MUTE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %eax
	movq	%r14, %rdi
	movl	$26, %esi
	movl	%eax, %ecx
	callq	_snd_hda_override_amp_caps
	movq	%r14, %rdi
	callq	_via_parse_auto_config
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_vt1702_init_verbs@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r15), %rcx
	movslq	4(%r15), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 4(%r15)
	movl	%eax, (%rcx,%rdx,4)
	movq	_via_patch_ops@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	_set_widgets_power_state_vt1702@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_via_free
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HDA_INPUT,4,2                  ## @HDA_INPUT
	.comm	_AC_AMPCAP_OFFSET_SHIFT,4,2     ## @AC_AMPCAP_OFFSET_SHIFT
	.comm	_AC_AMPCAP_NUM_STEPS_SHIFT,4,2  ## @AC_AMPCAP_NUM_STEPS_SHIFT
	.comm	_AC_AMPCAP_STEP_SIZE_SHIFT,4,2  ## @AC_AMPCAP_STEP_SIZE_SHIFT
	.comm	_AC_AMPCAP_MUTE_SHIFT,4,2       ## @AC_AMPCAP_MUTE_SHIFT
	.comm	_vt1702_init_verbs,4,2          ## @vt1702_init_verbs
	.comm	_via_patch_ops,4,2              ## @via_patch_ops
	.comm	_set_widgets_power_state_vt1702,4,2 ## @set_widgets_power_state_vt1702
	.no_dead_strip	_patch_vt1702
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function patch_vt1702
_patch_vt1702:                          ; @patch_vt1702
	.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, x0
	bl	_via_new_spec
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	mov	w8, #26
Lloh0:
	adrp	x9, _HDA_INPUT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HDA_INPUT@GOTPAGEOFF]
	str	w8, [x0, #16]
Lloh2:
	ldr	w2, [x9]
Lloh3:
	adrp	x8, _AC_AMPCAP_OFFSET_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AC_AMPCAP_OFFSET_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #23
	lsl	w8, w9, w8
Lloh6:
	adrp	x10, _AC_AMPCAP_NUM_STEPS_SHIFT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AC_AMPCAP_NUM_STEPS_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _AC_AMPCAP_STEP_SIZE_SHIFT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AC_AMPCAP_STEP_SIZE_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	mov	w10, #5
	lsl	w9, w10, w9
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _AC_AMPCAP_MUTE_SHIFT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AC_AMPCAP_MUTE_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	orr	w3, w8, w9
	mov	x0, x19
	mov	w1, #26
	bl	_snd_hda_override_amp_caps
	mov	x0, x19
	bl	_via_parse_auto_config
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mov	w21, #0
Lloh15:
	adrp	x8, _vt1702_init_verbs@GOTPAGE
Lloh16:
	ldr	x8, [x8, _vt1702_init_verbs@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	x9, [x20, #8]
	ldrsw	x10, [x20, #4]
	add	w11, w10, #1
	str	w11, [x20, #4]
	str	w8, [x9, x10, lsl #2]
Lloh18:
	adrp	x8, _via_patch_ops@GOTPAGE
Lloh19:
	ldr	x8, [x8, _via_patch_ops@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh21:
	adrp	x8, _set_widgets_power_state_vt1702@GOTPAGE
Lloh22:
	ldr	x8, [x8, _set_widgets_power_state_vt1702@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [x20]
	b	LBB0_5
LBB0_3:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_4:
	mov	x21, x0
	mov	x0, x19
	bl	_via_free
LBB0_5:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HDA_INPUT,4,2                  ; @HDA_INPUT
	.comm	_AC_AMPCAP_OFFSET_SHIFT,4,2     ; @AC_AMPCAP_OFFSET_SHIFT
	.comm	_AC_AMPCAP_NUM_STEPS_SHIFT,4,2  ; @AC_AMPCAP_NUM_STEPS_SHIFT
	.comm	_AC_AMPCAP_STEP_SIZE_SHIFT,4,2  ; @AC_AMPCAP_STEP_SIZE_SHIFT
	.comm	_AC_AMPCAP_MUTE_SHIFT,4,2       ; @AC_AMPCAP_MUTE_SHIFT
	.comm	_vt1702_init_verbs,4,2          ; @vt1702_init_verbs
	.comm	_via_patch_ops,4,2              ; @via_patch_ops
	.comm	_set_widgets_power_state_vt1702,4,2 ; @set_widgets_power_state_vt1702
	.no_dead_strip	_patch_vt1702
.subsections_via_symbols
