	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm_disable
_stm_disable:                           ## @stm_disable
	.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
	movl	(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_local_read
	movq	_CS_MODE_SYSFS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	%r15, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	%r15, %rdi
	callq	_stm_disable_hw
	movq	%rbx, %rdi
	callq	_spin_unlock
	movl	4(%r15), %edi
	movq	_STMTCSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_STMTCSR_BUSY_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_coresight_timeout
	movl	(%r14), %edi
	callq	_pm_runtime_put
	movq	_CS_MODE_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_local_set
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CS_MODE_SYSFS,8,3              ## @CS_MODE_SYSFS
	.comm	_STMTCSR,4,2                    ## @STMTCSR
	.comm	_STMTCSR_BUSY_BIT,4,2           ## @STMTCSR_BUSY_BIT
	.comm	_CS_MODE_DISABLED,4,2           ## @CS_MODE_DISABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"STM tracing disabled\n"

	.no_dead_strip	_stm_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm_disable
_stm_disable:                           ; @stm_disable
	.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	x19, x0
	ldr	w0, [x0]
	bl	_dev_get_drvdata
	mov	x20, x0
	bl	_local_read
Lloh0:
	adrp	x8, _CS_MODE_SYSFS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CS_MODE_SYSFS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	add	x21, x20, #8
	mov	x0, x21
	bl	_spin_lock
	mov	x0, x20
	bl	_stm_disable_hw
	mov	x0, x21
	bl	_spin_unlock
	ldr	w0, [x20, #4]
Lloh3:
	adrp	x8, _STMTCSR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STMTCSR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _STMTCSR_BUSY_BIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STMTCSR_BUSY_BIT@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_coresight_timeout
	ldr	w0, [x19]
	bl	_pm_runtime_put
Lloh9:
	adrp	x8, _CS_MODE_DISABLED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CS_MODE_DISABLED@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_local_set
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	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	_dev_dbg
LBB0_2:
	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 AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CS_MODE_SYSFS,8,3              ; @CS_MODE_SYSFS
	.comm	_STMTCSR,4,2                    ; @STMTCSR
	.comm	_STMTCSR_BUSY_BIT,4,2           ; @STMTCSR_BUSY_BIT
	.comm	_CS_MODE_DISABLED,4,2           ; @CS_MODE_DISABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"STM tracing disabled\n"

	.no_dead_strip	_stm_disable
.subsections_via_symbols
