	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_emu10k1_shared_spdif_put
_snd_emu10k1_shared_spdif_put:          ## @snd_emu10k1_shared_spdif_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, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r14
	movq	(%rbx), %rax
	movl	(%rax), %eax
	movq	24(%r14), %rcx
	xorl	%r13d, %r13d
	testl	%eax, %eax
	sete	%r13b
	cmpq	$0, 8(%rcx)
	cmovel	%eax, %r13d
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	24(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
LBB0_1:
	xorl	%r15d, %r15d
LBB0_2:
	movq	_HCFG@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	8(%r14), %rdi
	callq	_inl
	testl	%r13d, %r13d
	movq	_HCFG_GPOUT0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmovnel	%ecx, %r13d
	movl	%ecx, %edx
	andl	%eax, %edx
	cmpl	%r13d, %edx
	setne	%bl
	orb	%r15b, %bl
	cmpb	$1, %bl
	jne	LBB0_4
## %bb.3:
	notl	%ecx
	andl	%ecx, %eax
	orl	%r13d, %eax
	movq	(%r12), %rsi
	addq	8(%r14), %rsi
	movl	%eax, %edi
	callq	_outl
LBB0_4:
	movzbl	%bl, %ebx
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpq	$0, 16(%r14)
	je	LBB0_1
## %bb.6:
	movq	_A_IOCFG@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	8(%r14), %rdi
	callq	_inl
	testl	%r13d, %r13d
	movq	_A_IOCFG_GPOUT0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %ecx
	cmovel	%r13d, %ecx
	movl	%edx, %esi
	andl	%eax, %esi
	cmpl	%ecx, %esi
	je	LBB0_1
## %bb.9:
	notl	%edx
	andl	%edx, %eax
	orl	%ecx, %eax
	movq	(%r15), %rsi
	addq	8(%r14), %rsi
	movl	%eax, %edi
	callq	_outl
	movb	$1, %r15b
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_A_IOCFG,8,3                    ## @A_IOCFG
	.comm	_A_IOCFG_GPOUT0,4,2             ## @A_IOCFG_GPOUT0
	.comm	_HCFG,8,3                       ## @HCFG
	.comm	_HCFG_GPOUT0,4,2                ## @HCFG_GPOUT0
	.no_dead_strip	_snd_emu10k1_shared_spdif_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_emu10k1_shared_spdif_put
_snd_emu10k1_shared_spdif_put:          ; @snd_emu10k1_shared_spdif_put
	.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	x20, x1
	bl	_snd_kcontrol_chip
	mov	x19, x0
	ldr	x8, [x20]
	ldr	w8, [x8]
	ldr	x9, [x0, #24]
	ldr	x9, [x9, #8]
	cmp	w8, #0
	cset	w10, eq
	cmp	x9, #0
	csel	w20, w8, w10, eq
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
LBB0_1:
	mov	w21, #0
LBB0_2:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x22, _HCFG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HCFG@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_inl
Lloh2:
	adrp	x8, _HCFG_GPOUT0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HCFG_GPOUT0@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w20, #0
	csel	w9, wzr, w8, eq
	and	w10, w8, w0
	cmp	w10, w9
	cset	w10, ne
	orr	w20, w21, w10
	cmp	w20, #1
	b.ne	LBB0_4
; %bb.3:
	bic	w8, w0, w8
	orr	w0, w8, w9
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_outl
LBB0_4:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	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
LBB0_5:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_1
; %bb.6:
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x22, _A_IOCFG@GOTPAGE
Lloh6:
	ldr	x22, [x22, _A_IOCFG@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_inl
	mov	w21, #0
Lloh7:
	adrp	x8, _A_IOCFG_GPOUT0@GOTPAGE
Lloh8:
	ldr	x8, [x8, _A_IOCFG_GPOUT0@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w20, #0
	csel	w9, wzr, w8, eq
	and	w10, w8, w0
	cmp	w10, w9
	b.eq	LBB0_2
; %bb.7:
	bic	w8, w0, w8
	orr	w0, w8, w9
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_outl
	mov	w21, #1
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_A_IOCFG,8,3                    ; @A_IOCFG
	.comm	_A_IOCFG_GPOUT0,4,2             ; @A_IOCFG_GPOUT0
	.comm	_HCFG,8,3                       ; @HCFG
	.comm	_HCFG_GPOUT0,4,2                ; @HCFG_GPOUT0
	.no_dead_strip	_snd_emu10k1_shared_spdif_put
.subsections_via_symbols
