	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsp_set_run_state
_dsp_set_run_state:                     ## @dsp_set_run_state
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_DSP_DBGCNTL_INST_OFFSET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	callq	_chipio_read
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movl	-28(%rbp), %edx
	movq	_DSP_DBGCNTL_STATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	%edx, %ebx
	movq	_DSP_DBGCNTL_STATE_LOBIT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrl	%cl, %ebx
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.2:
	movq	_DSP_DBGCNTL_SS_LOBIT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %eax
	shll	%cl, %eax
	movq	_DSP_DBGCNTL_SS_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	notl	%eax
	andl	%eax, %edx
	movl	%edx, -28(%rbp)
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_chipio_write
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:
	movq	_DSP_DBGCNTL_EXEC_LOBIT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	_DSP_DBGCNTL_EXEC_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	orl	-28(%rbp), %ebx
	movl	%ebx, -28(%rbp)
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_chipio_write
	testl	%eax, %eax
	js	LBB0_5
LBB0_4:
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSP_DBGCNTL_INST_OFFSET,4,2    ## @DSP_DBGCNTL_INST_OFFSET
	.comm	_DSP_DBGCNTL_STATE_MASK,4,2     ## @DSP_DBGCNTL_STATE_MASK
	.comm	_DSP_DBGCNTL_STATE_LOBIT,4,2    ## @DSP_DBGCNTL_STATE_LOBIT
	.comm	_DSP_DBGCNTL_SS_LOBIT,4,2       ## @DSP_DBGCNTL_SS_LOBIT
	.comm	_DSP_DBGCNTL_SS_MASK,4,2        ## @DSP_DBGCNTL_SS_MASK
	.comm	_DSP_DBGCNTL_EXEC_LOBIT,4,2     ## @DSP_DBGCNTL_EXEC_LOBIT
	.comm	_DSP_DBGCNTL_EXEC_MASK,4,2      ## @DSP_DBGCNTL_EXEC_MASK
	.no_dead_strip	_dsp_set_run_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsp_set_run_state
_dsp_set_run_state:                     ; @dsp_set_run_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _DSP_DBGCNTL_INST_OFFSET@GOTPAGE
Lloh1:
	ldr	x20, [x20, _DSP_DBGCNTL_INST_OFFSET@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_chipio_read
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _DSP_DBGCNTL_STATE_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DSP_DBGCNTL_STATE_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	and	w9, w9, w8
Lloh5:
	adrp	x10, _DSP_DBGCNTL_STATE_LOBIT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _DSP_DBGCNTL_STATE_LOBIT@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	lsr	w21, w9, w10
	cbz	w21, LBB0_4
; %bb.2:
Lloh8:
	adrp	x9, _DSP_DBGCNTL_SS_LOBIT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DSP_DBGCNTL_SS_LOBIT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _DSP_DBGCNTL_SS_MASK@GOTPAGE
Lloh12:
	ldr	x10, [x10, _DSP_DBGCNTL_SS_MASK@GOTPAGEOFF]
	lsl	w9, w21, w9
Lloh13:
	ldr	w10, [x10]
	and	w9, w9, w10
	bic	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_chipio_write
	tbnz	w0, #31, LBB0_5
; %bb.3:
Lloh14:
	adrp	x8, _DSP_DBGCNTL_EXEC_LOBIT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DSP_DBGCNTL_EXEC_LOBIT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	lsl	w8, w21, w8
Lloh17:
	adrp	x9, _DSP_DBGCNTL_EXEC_MASK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DSP_DBGCNTL_EXEC_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	and	w8, w8, w9
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_chipio_write
	tbnz	w0, #31, LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DSP_DBGCNTL_INST_OFFSET,4,2    ; @DSP_DBGCNTL_INST_OFFSET
	.comm	_DSP_DBGCNTL_STATE_MASK,4,2     ; @DSP_DBGCNTL_STATE_MASK
	.comm	_DSP_DBGCNTL_STATE_LOBIT,4,2    ; @DSP_DBGCNTL_STATE_LOBIT
	.comm	_DSP_DBGCNTL_SS_LOBIT,4,2       ; @DSP_DBGCNTL_SS_LOBIT
	.comm	_DSP_DBGCNTL_SS_MASK,4,2        ; @DSP_DBGCNTL_SS_MASK
	.comm	_DSP_DBGCNTL_EXEC_LOBIT,4,2     ; @DSP_DBGCNTL_EXEC_LOBIT
	.comm	_DSP_DBGCNTL_EXEC_MASK,4,2      ; @DSP_DBGCNTL_EXEC_MASK
	.no_dead_strip	_dsp_set_run_state
.subsections_via_symbols
