	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function generic_digital_control
_generic_digital_control:               ## @generic_digital_control
	.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
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_AC97_SPDIF_CONTROL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	*(%rdi)
	leal	-1(%r12), %ecx
	cmpl	$3, %ecx
	jae	LBB0_1
## %bb.3:
	movslq	%ecx, %rcx
	leaq	l_switch.table.generic_digital_control(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movq	_AC97_SC_SPSR_MASK@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	orl	(%rcx), %eax
	movq	_AC97_SC_CC_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movq	_AUDIO_CCMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r15d, %eax
	shll	$6, %eax
	orl	%ecx, %eax
	movq	_AUDIO_DIGITAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%r15d, %ecx
	movl	%eax, %edx
	orl	$2, %edx
	testl	%ecx, %ecx
	cmovel	%eax, %edx
	movq	_AUDIO_PRO@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	(%rax), %eax
	andl	%r15d, %eax
	setne	%cl
	orl	%edx, %ecx
	movq	_AUDIO_DRS@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movl	%ecx, %edx
	orl	$16384, %edx                    ## imm = 0x4000
	testl	%r15d, %r15d
	cmovel	%ecx, %edx
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	*8(%rbx)
	movq	_AC97_EXTENDED_STATUS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	*(%rbx)
	movq	_AC97_EA_SLOT_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_AC97_EA_VRA@GOTPCREL(%rip), %rcx
	movq	_AC97_EA_SPDIF@GOTPCREL(%rip), %r12
	orl	(%rcx), %r14d
	orl	%eax, %r14d
	orl	(%r12), %r14d
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	*8(%rbx)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	*(%rbx)
	movl	%eax, %edx
	xorl	%eax, %eax
	testl	$1024, %edx                     ## imm = 0x400
	jne	LBB0_6
## %bb.4:
	movl	(%r15), %esi
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, %edx
	movq	%rbx, %rdi
	callq	*8(%rbx)
	jmp	LBB0_5
LBB0_1:
	movq	_AC97_EXTENDED_STATUS@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	*(%rbx)
	movl	(%r14), %esi
	movq	_AC97_EA_SPDIF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%rbx, %rdi
	callq	*8(%rbx)
	testl	%r12d, %r12d
	je	LBB0_2
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_2:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AC97_SPDIF_CONTROL,4,2         ## @AC97_SPDIF_CONTROL
	.comm	_AC97_EXTENDED_STATUS,4,2       ## @AC97_EXTENDED_STATUS
	.comm	_AC97_EA_SPDIF,4,2              ## @AC97_EA_SPDIF
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AC97_SC_SPSR_MASK,4,2          ## @AC97_SC_SPSR_MASK
	.comm	_AC97_SC_SPSR_48K,4,2           ## @AC97_SC_SPSR_48K
	.comm	_AC97_SC_SPSR_44K,4,2           ## @AC97_SC_SPSR_44K
	.comm	_AC97_SC_SPSR_32K,4,2           ## @AC97_SC_SPSR_32K
	.comm	_AC97_SC_CC_MASK,4,2            ## @AC97_SC_CC_MASK
	.comm	_AUDIO_CCMASK,4,2               ## @AUDIO_CCMASK
	.comm	_AUDIO_DIGITAL,4,2              ## @AUDIO_DIGITAL
	.comm	_AUDIO_PRO,4,2                  ## @AUDIO_PRO
	.comm	_AUDIO_DRS,4,2                  ## @AUDIO_DRS
	.comm	_AC97_EA_SLOT_MASK,4,2          ## @AC97_EA_SLOT_MASK
	.comm	_AC97_EA_VRA,4,2                ## @AC97_EA_VRA
	.no_dead_strip	_generic_digital_control
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.generic_digital_control
l_switch.table.generic_digital_control:
	.quad	_AC97_SC_SPSR_48K
	.quad	_AC97_SC_SPSR_44K
	.quad	_AC97_SC_SPSR_32K

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function generic_digital_control
_generic_digital_control:               ; @generic_digital_control
	.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	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x23, _AC97_SPDIF_CONTROL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AC97_SPDIF_CONTROL@GOTPAGEOFF]
	ldr	w1, [x23]
	blr	x8
	sub	w8, w22, #1
	cmp	w8, #3
	b.hs	LBB0_3
; %bb.1:
Lloh2:
	adrp	x9, l_switch.table.generic_digital_control@PAGE
Lloh3:
	add	x9, x9, l_switch.table.generic_digital_control@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
Lloh4:
	adrp	x9, _AC97_SC_SPSR_MASK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _AC97_SC_SPSR_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	and	w9, w9, w0
	ldr	w8, [x8]
	orr	w8, w9, w8
Lloh7:
	adrp	x9, _AC97_SC_CC_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AC97_SC_CC_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	adrp	x10, _AUDIO_CCMASK@GOTPAGE
Lloh11:
	ldr	x10, [x10, _AUDIO_CCMASK@GOTPAGEOFF]
	bic	w8, w8, w9
Lloh12:
	ldr	w9, [x10]
	and	w9, w9, w21
	orr	w8, w8, w9, lsl #6
Lloh13:
	adrp	x9, _AUDIO_DIGITAL@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AUDIO_DIGITAL@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w10, w8, #0x2
	tst	w9, w21
	csel	w8, w8, w10, eq
Lloh16:
	adrp	x9, _AUDIO_PRO@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AUDIO_PRO@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w21
	cset	w9, ne
	orr	w8, w8, w9
Lloh19:
	adrp	x9, _AUDIO_DRS@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AUDIO_DRS@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w10, w8, #0x4000
	tst	w9, w21
	csel	w2, w8, w10, eq
	ldr	x8, [x19, #8]
	ldr	w1, [x23]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19]
Lloh22:
	adrp	x21, _AC97_EXTENDED_STATUS@GOTPAGE
Lloh23:
	ldr	x21, [x21, _AC97_EXTENDED_STATUS@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	blr	x8
Lloh24:
	adrp	x8, _AC97_EA_SLOT_MASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AC97_EA_SLOT_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh27:
	adrp	x9, _AC97_EA_VRA@GOTPAGE
Lloh28:
	ldr	x9, [x9, _AC97_EA_VRA@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
Lloh30:
	adrp	x22, _AC97_EA_SPDIF@GOTPAGE
Lloh31:
	ldr	x22, [x22, _AC97_EA_SPDIF@GOTPAGEOFF]
	ldr	w10, [x22]
	orr	w9, w9, w20
	orr	w8, w9, w8
	orr	w2, w8, w10
	ldr	x8, [x19, #8]
	ldr	w1, [x21]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19]
	ldr	w1, [x21]
	mov	x0, x19
	blr	x8
	tbnz	w0, #10, LBB0_5
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	w1, [x21]
	ldr	w9, [x22]
	bic	w2, w0, w9
	mov	x0, x19
	blr	x8
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19]
Lloh32:
	adrp	x20, _AC97_EXTENDED_STATUS@GOTPAGE
Lloh33:
	ldr	x20, [x20, _AC97_EXTENDED_STATUS@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #8]
	ldr	w1, [x20]
Lloh34:
	adrp	x9, _AC97_EA_SPDIF@GOTPAGE
Lloh35:
	ldr	x9, [x9, _AC97_EA_SPDIF@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	bic	w2, w0, w9
	mov	x0, x19
	blr	x8
	cbz	w22, LBB0_5
LBB0_4:
Lloh37:
	adrp	x8, _EINVAL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_AC97_SPDIF_CONTROL,4,2         ; @AC97_SPDIF_CONTROL
	.comm	_AC97_EXTENDED_STATUS,4,2       ; @AC97_EXTENDED_STATUS
	.comm	_AC97_EA_SPDIF,4,2              ; @AC97_EA_SPDIF
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AC97_SC_SPSR_MASK,4,2          ; @AC97_SC_SPSR_MASK
	.comm	_AC97_SC_SPSR_48K,4,2           ; @AC97_SC_SPSR_48K
	.comm	_AC97_SC_SPSR_44K,4,2           ; @AC97_SC_SPSR_44K
	.comm	_AC97_SC_SPSR_32K,4,2           ; @AC97_SC_SPSR_32K
	.comm	_AC97_SC_CC_MASK,4,2            ; @AC97_SC_CC_MASK
	.comm	_AUDIO_CCMASK,4,2               ; @AUDIO_CCMASK
	.comm	_AUDIO_DIGITAL,4,2              ; @AUDIO_DIGITAL
	.comm	_AUDIO_PRO,4,2                  ; @AUDIO_PRO
	.comm	_AUDIO_DRS,4,2                  ; @AUDIO_DRS
	.comm	_AC97_EA_SLOT_MASK,4,2          ; @AC97_EA_SLOT_MASK
	.comm	_AC97_EA_VRA,4,2                ; @AC97_EA_VRA
	.no_dead_strip	_generic_digital_control
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.generic_digital_control
l_switch.table.generic_digital_control:
	.quad	_AC97_SC_SPSR_48K
	.quad	_AC97_SC_SPSR_44K
	.quad	_AC97_SC_SPSR_32K

.subsections_via_symbols
