	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_control_reg
_write_control_reg:                     ## @write_control_reg
	.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
	movq	%rdi, %r15
	movq	_GML_DIGITAL_IN_AUTO_MUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	orl	%esi, %ecx
	notl	%eax
	andl	%esi, %eax
	cmpq	$0, 8(%rdi)
	movl	%edx, %r12d
	cmovnel	%ecx, %eax
	movslq	%eax, %rbx
	movq	%rbx, %rdi
	callq	_DE_ACT
	movl	%ebx, %edi
	callq	_cpu_to_le32
	movl	%eax, %r14d
	testb	%r12b, %r12b
	jne	LBB0_2
## %bb.1:
	movq	(%r15), %rcx
	xorl	%eax, %eax
	cmpl	(%rcx), %r14d
	je	LBB0_4
LBB0_2:
	movq	%r15, %rdi
	callq	_wait_handshake
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%r15), %rax
	movl	%r14d, (%rax)
	movq	%r15, %rdi
	callq	_clear_handshake
	movq	_DSP_VC_WRITE_CONTROL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_send_vector                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GML_DIGITAL_IN_AUTO_MUTE,4,2   ## @GML_DIGITAL_IN_AUTO_MUTE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_DSP_VC_WRITE_CONTROL_REG,4,2   ## @DSP_VC_WRITE_CONTROL_REG
	.no_dead_strip	_write_control_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_control_reg
_write_control_reg:                     ; @write_control_reg
	.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, x2
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _GML_DIGITAL_IN_AUTO_MUTE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GML_DIGITAL_IN_AUTO_MUTE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	orr	w10, w9, w1
	bic	w9, w1, w9
	cmp	x8, #0
	csel	w20, w9, w10, eq
	sxtw	x0, w20
	bl	_DE_ACT
	mov	x0, x20
	bl	_cpu_to_le32
	mov	x20, x0
	cbnz	w21, LBB0_3
; %bb.1:
	ldr	x8, [x19]
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_wait_handshake
	cbz	x0, LBB0_6
; %bb.4:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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_6:
	ldr	x8, [x19]
	str	w20, [x8]
	mov	x0, x19
	bl	_clear_handshake
Lloh6:
	adrp	x8, _DSP_VC_WRITE_CONTROL_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DSP_VC_WRITE_CONTROL_REG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_send_vector
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GML_DIGITAL_IN_AUTO_MUTE,4,2   ; @GML_DIGITAL_IN_AUTO_MUTE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_DSP_VC_WRITE_CONTROL_REG,4,2   ; @DSP_VC_WRITE_CONTROL_REG
	.no_dead_strip	_write_control_reg
.subsections_via_symbols
