	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_trident_spdif_hw_params
_snd_trident_spdif_hw_params:           ## @snd_trident_spdif_hw_params
	.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, %r15
	movq	%rdi, %r12
	callq	_snd_pcm_substream_chip
	movq	%rax, %rbx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_snd_trident_allocate_pcm_mem
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movq	%rbx, %r13
	movq	(%rbx), %rax
	movq	_TRIDENT_DEVICE_ID_SI7018@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_snd_trident_allocate_evoice
	testl	%eax, %eax
	js	LBB0_5
LBB0_3:
	addq	$36, %rbx
	movq	%rbx, %r14
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	movl	8(%r13), %r12d
	movq	_IEC958_AES0_PROFESSIONAL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	andl	%r12d, %eax
	je	LBB0_6
## %bb.4:
	movq	_IEC958_AES0_PRO_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_5:
	movl	%eax, %r14d
	jmp	LBB0_18
LBB0_6:
	movq	_IEC958_AES3_CON_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$24, %eax
LBB0_7:
	notl	%eax
	andl	%r12d, %eax
	movl	%eax, 8(%r13)
	movq	%r15, %rdi
	callq	_params_rate
	cmpl	$48000, %eax                    ## imm = 0xBB80
	jl	LBB0_9
## %bb.8:
	movl	$60, 12(%r13)
	movq	_IEC958_AES3_CON_FS_48000@GOTPCREL(%rip), %rax
	movq	_IEC958_AES0_PRO_FS_48000@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_9:
	movq	%r15, %rdi
	callq	_params_rate
	cmpl	$44100, %eax                    ## imm = 0xAC44
	jl	LBB0_12
## %bb.10:
	movl	$62, 12(%r13)
	movq	_IEC958_AES3_CON_FS_44100@GOTPCREL(%rip), %rax
	movq	_IEC958_AES0_PRO_FS_44100@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_12:
	movl	$61, 12(%r13)
	movq	_IEC958_AES3_CON_FS_32000@GOTPCREL(%rip), %rax
	movq	_IEC958_AES0_PRO_FS_32000@GOTPCREL(%rip), %rcx
LBB0_13:
	movl	(%rbx), %edx
	andl	16(%r13), %edx
	je	LBB0_15
## %bb.14:
	movl	(%rcx), %ebx
	jmp	LBB0_16
LBB0_15:
	movl	(%rax), %ebx
	shll	$24, %ebx
LBB0_16:
	orl	8(%r13), %ebx
	movl	%ebx, 8(%r13)
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	xorl	%r14d, %r14d
	cmpl	%ebx, %r12d
	je	LBB0_18
## %bb.17:
	movl	32(%r13), %edi
	movq	_SNDRV_CTL_EVENT_MASK_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	24(%r13), %rdx
	callq	_snd_ctl_notify
LBB0_18:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRIDENT_DEVICE_ID_SI7018,8,3   ## @TRIDENT_DEVICE_ID_SI7018
	.comm	_IEC958_AES0_PROFESSIONAL,4,2   ## @IEC958_AES0_PROFESSIONAL
	.comm	_IEC958_AES0_PRO_FS,4,2         ## @IEC958_AES0_PRO_FS
	.comm	_IEC958_AES3_CON_FS,4,2         ## @IEC958_AES3_CON_FS
	.comm	_IEC958_AES0_PRO_FS_48000,4,2   ## @IEC958_AES0_PRO_FS_48000
	.comm	_IEC958_AES3_CON_FS_48000,4,2   ## @IEC958_AES3_CON_FS_48000
	.comm	_IEC958_AES0_PRO_FS_44100,4,2   ## @IEC958_AES0_PRO_FS_44100
	.comm	_IEC958_AES3_CON_FS_44100,4,2   ## @IEC958_AES3_CON_FS_44100
	.comm	_IEC958_AES0_PRO_FS_32000,4,2   ## @IEC958_AES0_PRO_FS_32000
	.comm	_IEC958_AES3_CON_FS_32000,4,2   ## @IEC958_AES3_CON_FS_32000
	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ## @SNDRV_CTL_EVENT_MASK_VALUE
	.no_dead_strip	_snd_trident_spdif_hw_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_trident_spdif_hw_params
_snd_trident_spdif_hw_params:           ; @snd_trident_spdif_hw_params
	.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, x1
	mov	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	mov	x0, x20
	mov	x1, x21
	bl	_snd_trident_allocate_pcm_mem
	tbnz	w0, #31, LBB0_11
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _TRIDENT_DEVICE_ID_SI7018@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TRIDENT_DEVICE_ID_SI7018@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	bl	_snd_trident_allocate_evoice
	tbnz	w0, #31, LBB0_11
LBB0_3:
	add	x20, x19, #36
	mov	x0, x20
	bl	_spin_lock_irq
	ldr	w22, [x19, #8]
Lloh3:
	adrp	x23, _IEC958_AES0_PROFESSIONAL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _IEC958_AES0_PROFESSIONAL@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh5:
	adrp	x9, _IEC958_AES3_CON_FS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IEC958_AES3_CON_FS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _IEC958_AES0_PRO_FS@GOTPAGE
Lloh9:
	ldr	x10, [x10, _IEC958_AES0_PRO_FS@GOTPAGEOFF]
	lsl	w9, w9, #24
Lloh10:
	ldr	w10, [x10]
	tst	w8, w22
	csel	w8, w9, w10, eq
	bic	w8, w22, w8
	str	w8, [x19, #8]
	mov	x0, x21
	bl	_params_rate
	mov	w8, #48000
	cmp	w0, w8
	b.lt	LBB0_5
; %bb.4:
	mov	w8, #60
	str	w8, [x19, #12]
Lloh11:
	adrp	x8, _IEC958_AES3_CON_FS_48000@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IEC958_AES3_CON_FS_48000@GOTPAGEOFF]
Lloh13:
	adrp	x9, _IEC958_AES0_PRO_FS_48000@GOTPAGE
Lloh14:
	ldr	x9, [x9, _IEC958_AES0_PRO_FS_48000@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	mov	x0, x21
	bl	_params_rate
	mov	w8, #44100
	cmp	w0, w8
	b.lt	LBB0_7
; %bb.6:
	mov	w8, #62
	str	w8, [x19, #12]
Lloh15:
	adrp	x8, _IEC958_AES3_CON_FS_44100@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IEC958_AES3_CON_FS_44100@GOTPAGEOFF]
Lloh17:
	adrp	x9, _IEC958_AES0_PRO_FS_44100@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IEC958_AES0_PRO_FS_44100@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	w8, #61
	str	w8, [x19, #12]
Lloh19:
	adrp	x8, _IEC958_AES3_CON_FS_32000@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IEC958_AES3_CON_FS_32000@GOTPAGEOFF]
Lloh21:
	adrp	x9, _IEC958_AES0_PRO_FS_32000@GOTPAGE
Lloh22:
	ldr	x9, [x9, _IEC958_AES0_PRO_FS_32000@GOTPAGEOFF]
LBB0_8:
	ldr	w10, [x19, #16]
	ldr	w11, [x23]
	ldr	w9, [x9]
	ldr	w8, [x8]
	lsl	w8, w8, #24
	tst	w11, w10
	csel	w8, w8, w9, eq
	ldr	w9, [x19, #8]
	orr	w21, w8, w9
	str	w21, [x19, #8]
	mov	x0, x20
	bl	_spin_unlock_irq
	cmp	w22, w21
	b.eq	LBB0_10
; %bb.9:
	ldr	w0, [x19, #32]
Lloh23:
	adrp	x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldr	x2, [x19, #24]
	bl	_snd_ctl_notify
LBB0_10:
	mov	w0, #0
LBB0_11:
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_TRIDENT_DEVICE_ID_SI7018,8,3   ; @TRIDENT_DEVICE_ID_SI7018
	.comm	_IEC958_AES0_PROFESSIONAL,4,2   ; @IEC958_AES0_PROFESSIONAL
	.comm	_IEC958_AES0_PRO_FS,4,2         ; @IEC958_AES0_PRO_FS
	.comm	_IEC958_AES3_CON_FS,4,2         ; @IEC958_AES3_CON_FS
	.comm	_IEC958_AES0_PRO_FS_48000,4,2   ; @IEC958_AES0_PRO_FS_48000
	.comm	_IEC958_AES3_CON_FS_48000,4,2   ; @IEC958_AES3_CON_FS_48000
	.comm	_IEC958_AES0_PRO_FS_44100,4,2   ; @IEC958_AES0_PRO_FS_44100
	.comm	_IEC958_AES3_CON_FS_44100,4,2   ; @IEC958_AES3_CON_FS_44100
	.comm	_IEC958_AES0_PRO_FS_32000,4,2   ; @IEC958_AES0_PRO_FS_32000
	.comm	_IEC958_AES3_CON_FS_32000,4,2   ; @IEC958_AES3_CON_FS_32000
	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ; @SNDRV_CTL_EVENT_MASK_VALUE
	.no_dead_strip	_snd_trident_spdif_hw_params
.subsections_via_symbols
