	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad1988_spdif_playback_source_put
_ad1988_spdif_playback_source_put:      ## @ad1988_spdif_playback_source_put
	.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	%rsi, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r14
	movq	(%rbx), %rax
	movl	(%rax), %r15d
	cmpl	$4, %r15d
	jb	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_2:
	movq	_AC_VERB_GET_AMP_GAIN_MUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_AC_AMP_GET_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.5:
	orl	$1, %r8d
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	$29, %esi
	xorl	%edx, %edx
	callq	_snd_hda_codec_read
	movl	%eax, %r12d
	andl	$128, %r12d
	je	LBB0_7
## %bb.6:
	movq	_AC_VERB_SET_AMP_GAIN_MUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	xorl	%edi, %edi
	callq	_AMP_IN_MUTE
	movq	%r14, %rdi
	movl	$29, %esi
	xorl	%edx, %edx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	callq	_snd_hda_codec_write_cache
	movq	_AC_VERB_SET_AMP_GAIN_MUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	$1, %edi
	callq	_AMP_IN_UNMUTE
	movq	%r14, %rdi
	movl	$29, %esi
	xorl	%edx, %edx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	callq	_snd_hda_codec_write_cache
LBB0_7:
	movq	_AC_VERB_GET_CONNECT_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$11, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_snd_hda_codec_read
	incl	%eax
	xorl	%ecx, %ecx
	cmpl	%r15d, %eax
	setne	%cl
	orl	%ecx, %r12d
	je	LBB0_9
## %bb.8:
	movq	_AC_VERB_SET_CONNECT_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	decl	%r15d
	movq	%r14, %rdi
	movl	$11, %esi
	xorl	%edx, %edx
	movl	%r15d, %r8d
	callq	_snd_hda_codec_write_cache
	movl	%r12d, %ebx
	jmp	LBB0_9
LBB0_3:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	$29, %esi
	xorl	%edx, %edx
	callq	_snd_hda_codec_read
	movl	%eax, %r15d
	andl	$128, %r15d
	je	LBB0_9
## %bb.4:
	movq	_AC_VERB_SET_AMP_GAIN_MUTE@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	xorl	%edi, %edi
	callq	_AMP_IN_UNMUTE
	movq	%r14, %rdi
	movl	$29, %esi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_snd_hda_codec_write_cache
	movl	(%r12), %ebx
	movl	$1, %edi
	callq	_AMP_IN_MUTE
	movq	%r14, %rdi
	movl	$29, %esi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_snd_hda_codec_write_cache
	movl	%r15d, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AC_VERB_GET_AMP_GAIN_MUTE,4,2  ## @AC_VERB_GET_AMP_GAIN_MUTE
	.comm	_AC_AMP_GET_INPUT,4,2           ## @AC_AMP_GET_INPUT
	.comm	_AC_VERB_SET_AMP_GAIN_MUTE,4,2  ## @AC_VERB_SET_AMP_GAIN_MUTE
	.comm	_AC_VERB_GET_CONNECT_SEL,4,2    ## @AC_VERB_GET_CONNECT_SEL
	.comm	_AC_VERB_SET_CONNECT_SEL,4,2    ## @AC_VERB_SET_CONNECT_SEL
	.no_dead_strip	_ad1988_spdif_playback_source_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad1988_spdif_playback_source_put
_ad1988_spdif_playback_source_put:      ; @ad1988_spdif_playback_source_put
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	bl	_snd_kcontrol_chip
	ldr	x8, [x20]
	ldr	w21, [x8]
	cmp	w21, #4
	b.lo	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_2:
	mov	x19, x0
Lloh3:
	adrp	x8, _AC_VERB_GET_AMP_GAIN_MUTE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AC_VERB_GET_AMP_GAIN_MUTE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x8, _AC_AMP_GET_INPUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AC_AMP_GET_INPUT@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	cbz	w21, LBB0_7
; %bb.3:
	orr	w4, w4, #0x1
	mov	x0, x19
	mov	w1, #29
	mov	w2, #0
	bl	_snd_hda_codec_read
	and	w22, w0, #0x80
	tbz	w0, #7, LBB0_5
; %bb.4:
Lloh9:
	adrp	x23, _AC_VERB_SET_AMP_GAIN_MUTE@GOTPAGE
Lloh10:
	ldr	x23, [x23, _AC_VERB_SET_AMP_GAIN_MUTE@GOTPAGEOFF]
	ldr	w20, [x23]
	mov	w0, #0
	bl	_AMP_IN_MUTE
	mov	x4, x0
	mov	x0, x19
	mov	w1, #29
	mov	w2, #0
	mov	x3, x20
	bl	_snd_hda_codec_write_cache
	ldr	w20, [x23]
	mov	w0, #1
	bl	_AMP_IN_UNMUTE
	mov	x4, x0
	mov	x0, x19
	mov	w1, #29
	mov	w2, #0
	mov	x3, x20
	bl	_snd_hda_codec_write_cache
LBB0_5:
Lloh11:
	adrp	x8, _AC_VERB_GET_CONNECT_SEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AC_VERB_GET_CONNECT_SEL@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #11
	mov	w2, #0
	mov	w4, #0
	bl	_snd_hda_codec_read
	add	w8, w0, #1
	cmp	w8, w21
	cset	w8, ne
	orr	w20, w22, w8
	cbz	w20, LBB0_10
; %bb.6:
Lloh14:
	adrp	x8, _AC_VERB_SET_CONNECT_SEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AC_VERB_SET_CONNECT_SEL@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	sub	w4, w21, #1
	mov	x0, x19
	mov	w1, #11
	mov	w2, #0
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	mov	w1, #29
	mov	w2, #0
	bl	_snd_hda_codec_read
	mov	w20, #0
	tbz	w0, #7, LBB0_10
; %bb.8:
	and	w20, w0, #0x80
Lloh17:
	adrp	x22, _AC_VERB_SET_AMP_GAIN_MUTE@GOTPAGE
Lloh18:
	ldr	x22, [x22, _AC_VERB_SET_AMP_GAIN_MUTE@GOTPAGEOFF]
	ldr	w21, [x22]
	mov	w0, #0
	bl	_AMP_IN_UNMUTE
	mov	x4, x0
	mov	x0, x19
	mov	w1, #29
	mov	w2, #0
	mov	x3, x21
	bl	_snd_hda_codec_write_cache
	ldr	w21, [x22]
	mov	w0, #1
	bl	_AMP_IN_MUTE
	mov	x4, x0
	mov	x0, x19
	mov	w1, #29
	mov	w2, #0
	mov	x3, x21
LBB0_9:
	bl	_snd_hda_codec_write_cache
LBB0_10:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AC_VERB_GET_AMP_GAIN_MUTE,4,2  ; @AC_VERB_GET_AMP_GAIN_MUTE
	.comm	_AC_AMP_GET_INPUT,4,2           ; @AC_AMP_GET_INPUT
	.comm	_AC_VERB_SET_AMP_GAIN_MUTE,4,2  ; @AC_VERB_SET_AMP_GAIN_MUTE
	.comm	_AC_VERB_GET_CONNECT_SEL,4,2    ; @AC_VERB_GET_CONNECT_SEL
	.comm	_AC_VERB_SET_CONNECT_SEL,4,2    ; @AC_VERB_SET_CONNECT_SEL
	.no_dead_strip	_ad1988_spdif_playback_source_put
.subsections_via_symbols
