	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function onyx_snd_single_bit_put
_onyx_snd_single_bit_put:               ## @onyx_snd_single_bit_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
	movq	%rdi, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r15
	movl	$0, -44(%rbp)
	movq	(%rbx), %rbx
	movq	%rbx, %r13
	shrq	$16, %rbx
	movq	_FLAG_POLARITY_INVERT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	%ebx, %r12d
	movq	_FLAG_SPDIFLOCK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_mutex_lock
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.1:
	cmpq	$0, 8(%r15)
	je	LBB0_3
## %bb.2:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_4
LBB0_3:
	movq	%r13, %rax
	movzbl	%ah, %esi
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movzbl	%al, %r13d
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_onyx_read_register
	movl	-44(%rbp), %ebx
	movl	%r13d, %eax
	notl	%eax
	andl	%ebx, %eax
	movq	(%r14), %rcx
	xorl	%edx, %edx
	cmpl	$0, (%rcx)
	setne	%dl
	orl	%r13d, %ebx
	cmpl	%r12d, %edx
	cmovel	%eax, %ebx
	movq	%r15, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_onyx_write_register
	movl	%eax, %r14d
LBB0_4:
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	cmpl	%ebx, -44(%rbp)
	setne	%al
	testl	%r14d, %r14d
	cmovnel	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLAG_POLARITY_INVERT,8,3       ## @FLAG_POLARITY_INVERT
	.comm	_FLAG_SPDIFLOCK,8,3             ## @FLAG_SPDIFLOCK
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_onyx_snd_single_bit_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function onyx_snd_single_bit_put
_onyx_snd_single_bit_put:               ; @onyx_snd_single_bit_put
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	mov	x21, x0
	bl	_snd_kcontrol_chip
	mov	x19, x0
	str	wzr, [sp, #12]
	ldr	x22, [x21]
Lloh0:
	adrp	x8, _FLAG_POLARITY_INVERT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FLAG_POLARITY_INVERT@GOTPAGEOFF]
	lsr	x21, x22, #16
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x8, _FLAG_SPDIFLOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FLAG_SPDIFLOCK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w24, w8, w21
	bl	_mutex_lock
	cbz	w24, LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
; %bb.2:
	mov	w20, #0
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_4
LBB0_3:
	and	w23, w21, w23
	ubfx	w21, w22, #8, #8
	and	w22, w22, #0xff
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x21
	bl	_onyx_read_register
	ldr	w8, [sp, #12]
	bic	w9, w8, w22
	ldr	x10, [x20]
	ldr	w10, [x10]
	cmp	w10, #0
	cset	w10, ne
	orr	w8, w8, w22
	cmp	w10, w23
	csel	w20, w9, w8, eq
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_onyx_write_register
	mov	x21, x0
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	ldr	w8, [sp, #12]
	cmp	w8, w20
	cset	w8, ne
	cmp	w21, #0
	csel	w0, w8, w21, eq
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_FLAG_POLARITY_INVERT,8,3       ; @FLAG_POLARITY_INVERT
	.comm	_FLAG_SPDIFLOCK,8,3             ; @FLAG_SPDIFLOCK
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_onyx_snd_single_bit_put
.subsections_via_symbols
