	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function etm_enable
_etm_enable:                            ## @etm_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movl	(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	_CS_MODE_DISABLED@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rax, %rdi
	movl	%ebx, %edx
	callq	_local_cmpxchg
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	cmpl	$129, %ebx
	je	LBB0_5
## %bb.3:
	cmpl	$128, %ebx
	jne	LBB0_8
## %bb.4:
	movq	%r12, %rdi
	callq	_etm_enable_sysfs
	jmp	LBB0_6
LBB0_5:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_etm_enable_perf
LBB0_6:
	movl	%eax, %ebx
	testl	%ebx, %ebx
	je	LBB0_9
LBB0_7:
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_local_set
	jmp	LBB0_10
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%ebx, %ebx
	jne	LBB0_7
LBB0_9:
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CS_MODE_DISABLED,4,2           ## @CS_MODE_DISABLED
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_etm_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function etm_enable
_etm_enable:                            ; @etm_enable
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_dev_get_drvdata
	mov	x19, x0
Lloh0:
	adrp	x23, _CS_MODE_DISABLED@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CS_MODE_DISABLED@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x2, x22
	bl	_local_cmpxchg
	cbz	w0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_2:
	cmp	w22, #129
	b.eq	LBB0_5
; %bb.3:
	cmp	w22, #128
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_etm_enable_sysfs
	mov	x20, x0
	cbnz	w20, LBB0_7
	b	LBB0_8
LBB0_5:
	mov	x0, x20
	mov	x1, x21
	bl	_etm_enable_perf
	mov	x20, x0
	cbnz	w20, LBB0_7
	b	LBB0_8
LBB0_6:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	cbz	w20, LBB0_8
LBB0_7:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_local_set
LBB0_8:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CS_MODE_DISABLED,4,2           ; @CS_MODE_DISABLED
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_etm_enable
.subsections_via_symbols
