	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ali_get_spdif_in_rate
_snd_ali_get_spdif_in_rate:             ## @snd_ali_get_spdif_in_rate
	.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, %rbx
	movq	_ALI_SPDIF_CTRL@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	callq	_ALI_REG
	movl	%eax, %edi
	callq	_inb
                                        ## kill: def $eax killed $eax def $rax
	andl	$63, %eax
	leal	64(%rax), %r14d
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	callq	_ALI_REG
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_outb
	movq	%rbx, %rdi
	callq	_snd_ali_detect_spdif_rate
	movq	_ALI_SPDIF_CS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$3, %rsi
	movq	%rbx, %rdi
	callq	_ALI_REG
	movl	%eax, %edi
	callq	_inb
	andl	$15, %eax
	xorl	%ecx, %ecx
	cmpl	$2, %eax
	ja	LBB0_2
## %bb.1:
	movl	%eax, %eax
	leaq	l_switch.table.snd_ali_get_spdif_in_rate(%rip), %rcx
	movl	(%rcx,%rax,4), %ecx
LBB0_2:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ALI_SPDIF_CTRL,8,3             ## @ALI_SPDIF_CTRL
	.comm	_ALI_SPDIF_CS,8,3               ## @ALI_SPDIF_CS
	.no_dead_strip	_snd_ali_get_spdif_in_rate
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.snd_ali_get_spdif_in_rate
l_switch.table.snd_ali_get_spdif_in_rate:
	.long	44100                           ## 0xac44
	.long	48000                           ## 0xbb80
	.long	32000                           ## 0x7d00

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ali_get_spdif_in_rate
_snd_ali_get_spdif_in_rate:             ; @snd_ali_get_spdif_in_rate
	.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
Lloh0:
	adrp	x21, _ALI_SPDIF_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ALI_SPDIF_CTRL@GOTPAGEOFF]
	ldr	x1, [x21]
	bl	_ALI_REG
	bl	_inb
	mov	w20, #64
	bfxil	w20, w0, #0, #6
	ldr	x1, [x21]
	mov	x0, x19
	bl	_ALI_REG
	mov	x1, x0
	mov	x0, x20
	bl	_outb
	mov	x0, x19
	bl	_snd_ali_detect_spdif_rate
Lloh2:
	adrp	x8, _ALI_SPDIF_CS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ALI_SPDIF_CS@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x1, x8, #3
	mov	x0, x19
	bl	_ALI_REG
	bl	_inb
	and	w8, w0, #0xf
	cmp	w8, #2
	b.hi	LBB0_2
; %bb.1:
Lloh5:
	adrp	x9, l_switch.table.snd_ali_get_spdif_in_rate@PAGE
Lloh6:
	add	x9, x9, l_switch.table.snd_ali_get_spdif_in_rate@PAGEOFF
	ldr	w0, [x9, w8, uxtw #2]
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ALI_SPDIF_CTRL,8,3             ; @ALI_SPDIF_CTRL
	.comm	_ALI_SPDIF_CS,8,3               ; @ALI_SPDIF_CS
	.no_dead_strip	_snd_ali_get_spdif_in_rate
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.snd_ali_get_spdif_in_rate
l_switch.table.snd_ali_get_spdif_in_rate:
	.long	44100                           ; 0xac44
	.long	48000                           ; 0xbb80
	.long	32000                           ; 0x7d00

.subsections_via_symbols
