	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_via82xx_pcm_open
_snd_via82xx_pcm_open:                  ## @snd_via82xx_pcm_open
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdx), %r13
	movq	_snd_via82xx_hw@GOTPCREL(%rip), %rax
	movl	8(%rax), %ecx
	movl	%ecx, 16(%r13)
	movq	(%rax), %rax
	movq	%rax, 8(%r13)
	movq	32(%rdi), %r14
	movq	(%rsi), %rax
	leaq	(%rax,%rax,2), %r12
	leaq	(%r14,%r12,4), %rdi
	addq	$4, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irq
	incl	8(%r14,%r12,4)
	cmpq	$0, 24(%rbx)
	je	LBB0_3
## %bb.1:
	cmpl	$48, 8(%r15)
	jne	LBB0_3
## %bb.2:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_AC97_RATES_SPDIF@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	jmp	LBB0_15
LBB0_3:
	cmpq	$0, 16(%rbx)
	je	LBB0_7
## %bb.4:
	cmpl	$63, 8(%r15)
	jg	LBB0_7
## %bb.5:
	movq	_SNDRV_PCM_RATE_48000@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	movabsq	$206158430256000, %rax          ## imm = 0xBB800000BB80
	movq	%rax, 12(%r13)
	jmp	LBB0_17
LBB0_7:
	cmpq	$0, 8(%rbx)
	je	LBB0_10
## %bb.8:
	cmpl	$63, 8(%r15)
	jg	LBB0_10
## %bb.9:
	movq	_SNDRV_PCM_RATE_CONTINUOUS@GOTPCREL(%rip), %rax
	movq	_SNDRV_PCM_RATE_8000_48000@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 8(%r13)
	movabsq	$206158430216000, %rax          ## imm = 0xBB8000001F40
	movq	%rax, 12(%r13)
	jmp	LBB0_17
LBB0_10:
	movl	(%r14,%r12,4), %eax
	testl	%eax, %eax
	je	LBB0_11
## %bb.16:
	movq	_SNDRV_PCM_RATE_KNOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%r13)
	movl	%eax, 12(%r13)
	movl	%eax, 16(%r13)
	jmp	LBB0_17
LBB0_11:
	cmpq	$0, (%r15)
	movq	(%rbx), %rax
	movq	(%rax), %rax
	jne	LBB0_12
## %bb.13:
	movq	_AC97_RATES_FRONT_DAC@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_12:
	movq	_AC97_RATES_ADC@GOTPCREL(%rip), %rcx
LBB0_14:
	movslq	(%rcx), %rcx
LBB0_15:
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 8(%r13)
	movq	%r13, %rdi
	callq	_snd_pcm_limit_hw_rates
LBB0_17:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irq
	movq	_SNDRV_PCM_HW_PARAM_PERIODS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_snd_pcm_hw_constraint_integer
	testl	%eax, %eax
	js	LBB0_19
## %bb.18:
	movq	%r15, (%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r15)
	xorl	%eax, %eax
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_snd_via82xx_hw,12,2            ## @snd_via82xx_hw
	.comm	_AC97_RATES_SPDIF,8,3           ## @AC97_RATES_SPDIF
	.comm	_SNDRV_PCM_RATE_48000,4,2       ## @SNDRV_PCM_RATE_48000
	.comm	_SNDRV_PCM_RATE_CONTINUOUS,4,2  ## @SNDRV_PCM_RATE_CONTINUOUS
	.comm	_SNDRV_PCM_RATE_8000_48000,4,2  ## @SNDRV_PCM_RATE_8000_48000
	.comm	_AC97_RATES_ADC,4,2             ## @AC97_RATES_ADC
	.comm	_AC97_RATES_FRONT_DAC,4,2       ## @AC97_RATES_FRONT_DAC
	.comm	_SNDRV_PCM_RATE_KNOT,4,2        ## @SNDRV_PCM_RATE_KNOT
	.comm	_SNDRV_PCM_HW_PARAM_PERIODS,4,2 ## @SNDRV_PCM_HW_PARAM_PERIODS
	.no_dead_strip	_snd_via82xx_pcm_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function snd_via82xx_pcm_open
lCPI0_0:
	.long	8000                            ; 0x1f40
	.long	48000                           ; 0xbb80
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_snd_via82xx_pcm_open:                  ; @snd_via82xx_pcm_open
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	mov	x23, x0
	ldr	x21, [x2]
Lloh0:
	adrp	x8, _snd_via82xx_hw@GOTPAGE
Lloh1:
	ldr	x8, [x8, _snd_via82xx_hw@GOTPAGEOFF]
	ldr	w9, [x8, #8]
	ldr	x8, [x8]
	str	x8, [x21, #8]
	str	w9, [x21, #16]
	ldr	x24, [x0, #32]
	ldr	x25, [x1]
	mov	w8, #12
	madd	x26, x25, x8, x24
	add	x22, x26, #4
	mov	x0, x22
	bl	_spin_lock_irq
	ldr	w8, [x26, #8]
	add	w8, w8, #1
	str	w8, [x26, #8]
	ldr	x8, [x23, #24]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w8, [x20, #8]
	cmp	w8, #48
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x23]
	ldr	x8, [x8]
Lloh2:
	adrp	x9, _AC97_RATES_SPDIF@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AC97_RATES_SPDIF@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	b	LBB0_12
LBB0_3:
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	w8, [x20, #8]
	cmp	w8, #63
	b.gt	LBB0_6
; %bb.5:
Lloh5:
	adrp	x8, _SNDRV_PCM_RATE_48000@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SNDRV_PCM_RATE_48000@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x21, #8]
	mov	w8, #48000
	dup.2s	v0, w8
	stur	d0, [x21, #12]
	b	LBB0_13
LBB0_6:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_9
; %bb.7:
	ldr	w8, [x20, #8]
	cmp	w8, #63
	b.gt	LBB0_9
; %bb.8:
Lloh8:
	adrp	x8, _SNDRV_PCM_RATE_CONTINUOUS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SNDRV_PCM_RATE_CONTINUOUS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _SNDRV_PCM_RATE_8000_48000@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SNDRV_PCM_RATE_8000_48000@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x21, #8]
Lloh14:
	adrp	x8, lCPI0_0@PAGE
Lloh15:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x21, #12]
	b	LBB0_13
LBB0_9:
	mov	w8, #12
	mul	x8, x25, x8
	ldr	w8, [x24, x8]
	cbz	w8, LBB0_11
; %bb.10:
Lloh16:
	adrp	x9, _SNDRV_PCM_RATE_KNOT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SNDRV_PCM_RATE_KNOT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #8]
	str	w8, [x21, #16]
	b	LBB0_13
LBB0_11:
	ldr	x8, [x20]
Lloh19:
	adrp	x9, _AC97_RATES_ADC@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AC97_RATES_ADC@GOTPAGEOFF]
Lloh21:
	adrp	x10, _AC97_RATES_FRONT_DAC@GOTPAGE
Lloh22:
	ldr	x10, [x10, _AC97_RATES_FRONT_DAC@GOTPAGEOFF]
	ldr	x11, [x23]
	ldr	x11, [x11]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldrsw	x8, [x8]
	ldr	w8, [x11, x8, lsl #2]
LBB0_12:
	str	w8, [x21, #8]
	mov	x0, x21
	bl	_snd_pcm_limit_hw_rates
LBB0_13:
	mov	x0, x22
	bl	_spin_unlock_irq
Lloh23:
	adrp	x8, _SNDRV_PCM_HW_PARAM_PERIODS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SNDRV_PCM_HW_PARAM_PERIODS@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_snd_pcm_hw_constraint_integer
	tbnz	w0, #31, LBB0_15
; %bb.14:
	mov	w0, #0
	str	x20, [x21]
	str	x19, [x20, #16]
LBB0_15:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdr	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_snd_via82xx_hw,12,2            ; @snd_via82xx_hw
	.comm	_AC97_RATES_SPDIF,8,3           ; @AC97_RATES_SPDIF
	.comm	_SNDRV_PCM_RATE_48000,4,2       ; @SNDRV_PCM_RATE_48000
	.comm	_SNDRV_PCM_RATE_CONTINUOUS,4,2  ; @SNDRV_PCM_RATE_CONTINUOUS
	.comm	_SNDRV_PCM_RATE_8000_48000,4,2  ; @SNDRV_PCM_RATE_8000_48000
	.comm	_AC97_RATES_ADC,4,2             ; @AC97_RATES_ADC
	.comm	_AC97_RATES_FRONT_DAC,4,2       ; @AC97_RATES_FRONT_DAC
	.comm	_SNDRV_PCM_RATE_KNOT,4,2        ; @SNDRV_PCM_RATE_KNOT
	.comm	_SNDRV_PCM_HW_PARAM_PERIODS,4,2 ; @SNDRV_PCM_HW_PARAM_PERIODS
	.no_dead_strip	_snd_via82xx_pcm_open
.subsections_via_symbols
