	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_trident_spdif_default_put
_snd_trident_spdif_default_put:         ## @snd_trident_spdif_default_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, %r14
	callq	_snd_kcontrol_chip
	movq	%rax, %rbx
	movq	(%r14), %rax
	movl	4(%rax), %ecx
	movl	8(%rax), %edx
	shll	$8, %ecx
	orl	(%rax), %ecx
	shll	$16, %edx
	movl	12(%rax), %r12d
	shll	$24, %r12d
	orl	%edx, %r12d
	orl	%ecx, %r12d
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movl	(%rbx), %r13d
	movl	%r12d, (%rbx)
	movq	8(%rbx), %rax
	movq	_TRIDENT_DEVICE_ID_SI7018@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	cmpq	$0, 24(%rbx)
	jne	LBB0_6
## %bb.4:
	movq	_SI_SPDIF_CS@GOTPCREL(%rip), %rax
	movl	%r12d, %r15d
	jmp	LBB0_5
LBB0_1:
	movq	_NX_SPCTRL_SPCSO@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$3, %rsi
	movq	%rbx, %rdi
	callq	_TRID_REG
	movl	%eax, %edi
	callq	_inb
	testb	$16, %al
	jne	LBB0_6
## %bb.2:
	movl	(%rbx), %r15d
	movq	_NX_SPCSTATUS@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_TRID_REG
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_outl
LBB0_6:
	xorl	%ebx, %ebx
	cmpl	%r12d, %r13d
	setne	%bl
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	movl	%ebx, %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	_NX_SPCTRL_SPCSO,8,3            ## @NX_SPCTRL_SPCSO
	.comm	_NX_SPCSTATUS,8,3               ## @NX_SPCSTATUS
	.comm	_SI_SPDIF_CS,8,3                ## @SI_SPDIF_CS
	.no_dead_strip	_snd_trident_spdif_default_put
.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_default_put
_snd_trident_spdif_default_put:         ; @snd_trident_spdif_default_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	x19, x1
	bl	_snd_kcontrol_chip
	mov	x20, x0
	ldr	x8, [x19]
	ldp	w9, w10, [x8]
	orr	w9, w9, w10, lsl #8
	ldp	w10, w8, [x8, #8]
	orr	w9, w9, w10, lsl #16
	orr	w22, w9, w8, lsl #24
	add	x19, x0, #16
	mov	x0, x19
	bl	_spin_lock_irq
	ldr	w23, [x20]
	str	w22, [x20]
	ldr	x8, [x20, #8]
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.1:
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _SI_SPDIF_CS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SI_SPDIF_CS@GOTPAGEOFF]
	mov	x21, x22
	b	LBB0_5
LBB0_3:
Lloh5:
	adrp	x8, _NX_SPCTRL_SPCSO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NX_SPCTRL_SPCSO@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	add	x1, x8, #3
	mov	x0, x20
	bl	_TRID_REG
	bl	_inb
	tbnz	w0, #4, LBB0_6
; %bb.4:
	ldr	w21, [x20]
Lloh8:
	adrp	x8, _NX_SPCSTATUS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NX_SPCSTATUS@GOTPAGEOFF]
LBB0_5:
	ldr	x1, [x8]
	mov	x0, x20
	bl	_TRID_REG
	mov	x1, x0
	mov	x0, x21
	bl	_outl
LBB0_6:
	cmp	w23, w22
	cset	w20, ne
	mov	x0, x19
	bl	_spin_unlock_irq
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_TRIDENT_DEVICE_ID_SI7018,8,3   ; @TRIDENT_DEVICE_ID_SI7018
	.comm	_NX_SPCTRL_SPCSO,8,3            ; @NX_SPCTRL_SPCSO
	.comm	_NX_SPCSTATUS,8,3               ; @NX_SPCSTATUS
	.comm	_SI_SPDIF_CS,8,3                ; @SI_SPDIF_CS
	.no_dead_strip	_snd_trident_spdif_default_put
.subsections_via_symbols
