	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm_enable
_stm_enable:                            ## @stm_enable
	.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	%rdx, %rbx
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	_CS_MODE_SYSFS@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_1
## %bb.3:
	leaq	4(%r15), %rdi
	movq	_CS_MODE_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_local_cmpxchg
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	movl	(%r14), %edi
	callq	_pm_runtime_get_sync
	movq	%r15, %rdi
	callq	_spin_lock
	movq	%r15, %rdi
	callq	_stm_enable_hw
	movq	%r15, %rdi
	callq	_spin_unlock
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	xorl	%eax, %eax
LBB0_6:
	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	_EINVAL,4,2                     ## @EINVAL
	.comm	_CS_MODE_DISABLED,4,2           ## @CS_MODE_DISABLED
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"STM tracing enabled\n"

	.no_dead_strip	_stm_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm_enable
_stm_enable:                            ; @stm_enable
	.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	w0, [x0]
	bl	_dev_get_drvdata
Lloh0:
	adrp	x8, _CS_MODE_SYSFS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CS_MODE_SYSFS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x21
	b.ne	LBB0_3
; %bb.1:
	mov	x20, x0
	add	x0, x0, #4
Lloh3:
	adrp	x8, _CS_MODE_DISABLED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CS_MODE_DISABLED@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_local_cmpxchg
	cbz	x0, LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	ldr	w0, [x19]
	bl	_pm_runtime_get_sync
	mov	x0, x20
	bl	_spin_lock
	mov	x0, x20
	bl	_stm_enable_hw
	mov	x0, x20
	bl	_spin_unlock
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w0, #0
LBB0_6:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CS_MODE_SYSFS,8,3              ; @CS_MODE_SYSFS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CS_MODE_DISABLED,4,2           ; @CS_MODE_DISABLED
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"STM tracing enabled\n"

	.no_dead_strip	_stm_enable
.subsections_via_symbols
