	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dspio_write
_dspio_write:                           ## @dspio_write
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	(%rdi), %r14
	callq	_dspio_write_wait
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_VENDOR_DSPIO_SCP_WRITE_DATA_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%r15w, %edx
	movq	%r12, %rdi
	callq	_dspio_send
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	_VENDOR_DSPIO_SCP_WRITE_DATA_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shrl	$16, %r15d
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_dspio_send
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movq	_WIDGET_DSP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VENDOR_DSPIO_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_snd_hda_codec_read
LBB0_3:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_VENDOR_STATUS_DSPIO_SCP_COMMAND_QUEUE_FULL@GOTPCREL(%rip), %rcx
	movq	_EIO@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	xorl	%eax, %eax
	subl	(%rdx), %eax
	cmpl	(%rcx), %ebx
	cmovnel	%esi, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VENDOR_DSPIO_SCP_WRITE_DATA_LOW,4,2 ## @VENDOR_DSPIO_SCP_WRITE_DATA_LOW
	.comm	_VENDOR_DSPIO_SCP_WRITE_DATA_HIGH,4,2 ## @VENDOR_DSPIO_SCP_WRITE_DATA_HIGH
	.comm	_WIDGET_DSP_CTRL,4,2            ## @WIDGET_DSP_CTRL
	.comm	_VENDOR_DSPIO_STATUS,4,2        ## @VENDOR_DSPIO_STATUS
	.comm	_VENDOR_STATUS_DSPIO_SCP_COMMAND_QUEUE_FULL,4,2 ## @VENDOR_STATUS_DSPIO_SCP_COMMAND_QUEUE_FULL
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_dspio_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dspio_write
_dspio_write:                           ; @dspio_write
	.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	x21, x1
	mov	x20, x0
	ldr	x19, [x0]
	bl	_dspio_write_wait
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _VENDOR_DSPIO_SCP_WRITE_DATA_LOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VENDOR_DSPIO_SCP_WRITE_DATA_LOW@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	and	w2, w21, #0xffff
	mov	x0, x20
	bl	_dspio_send
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _VENDOR_DSPIO_SCP_WRITE_DATA_HIGH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VENDOR_DSPIO_SCP_WRITE_DATA_HIGH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	lsr	w2, w21, #16
	mov	x0, x20
	bl	_dspio_send
	tbnz	w0, #31, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _WIDGET_DSP_CTRL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WIDGET_DSP_CTRL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _VENDOR_DSPIO_STATUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VENDOR_DSPIO_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w4, #0
	bl	_snd_hda_codec_read
LBB0_3:
	mov	x22, x0
	mov	x0, x19
	bl	_mutex_unlock
Lloh12:
	adrp	x8, _VENDOR_STATUS_DSPIO_SCP_COMMAND_QUEUE_FULL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VENDOR_STATUS_DSPIO_SCP_COMMAND_QUEUE_FULL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _EIO@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w22, w8
	csneg	w0, wzr, w9, ne
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_VENDOR_DSPIO_SCP_WRITE_DATA_LOW,4,2 ; @VENDOR_DSPIO_SCP_WRITE_DATA_LOW
	.comm	_VENDOR_DSPIO_SCP_WRITE_DATA_HIGH,4,2 ; @VENDOR_DSPIO_SCP_WRITE_DATA_HIGH
	.comm	_WIDGET_DSP_CTRL,4,2            ; @WIDGET_DSP_CTRL
	.comm	_VENDOR_DSPIO_STATUS,4,2        ; @VENDOR_DSPIO_STATUS
	.comm	_VENDOR_STATUS_DSPIO_SCP_COMMAND_QUEUE_FULL,4,2 ; @VENDOR_STATUS_DSPIO_SCP_COMMAND_QUEUE_FULL
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_dspio_write
.subsections_via_symbols
