	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mode_store
_mode_store:                            ## @mode_store
	.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
	movq	%rcx, %r15
	movq	%rdx, %rbx
	movq	%rdi, %r12
	movl	(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r13
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_kstrtoul
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
## %bb.1:
	leaq	8(%r13), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	_ETM_MODE_ALL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	-48(%rbp), %rax
	movq	%rax, 16(%r13)
	movq	_ETM_MODE_EXCLUDE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rdx
	movq	_ETMTECR1_INC_EXC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%rdx, %rax
	je	LBB0_3
## %bb.2:
	orl	%ecx, 28(%r13)
	jmp	LBB0_4
LBB0_3:
	notl	%ecx
	andl	%ecx, 28(%r13)
LBB0_4:
	movq	_ETM_MODE_CYCACC@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rdx
	movq	_ETMCR_CYC_ACC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%rdx, %rax
	je	LBB0_6
## %bb.5:
	orl	24(%r13), %ecx
	jmp	LBB0_7
LBB0_6:
	notl	%ecx
	andl	24(%r13), %ecx
LBB0_7:
	movl	%ecx, 24(%r13)
	movq	_ETM_MODE_STALL@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	testq	%rdx, %rax
	je	LBB0_12
## %bb.8:
	movq	_ETMCCR_FIFOFULL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%r13)
	je	LBB0_9
## %bb.11:
	movq	_ETMCR_STALL_MODE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	jmp	LBB0_13
LBB0_12:
	movq	_ETMCR_STALL_MODE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	%edx, %ecx
LBB0_13:
	movl	%ecx, 24(%r13)
	movq	_ETM_MODE_TIMESTAMP@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	testq	%rdx, %rax
	je	LBB0_17
## %bb.14:
	movq	_ETMCCER_TIMESTAMP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 4(%r13)
	je	LBB0_15
## %bb.16:
	movq	_ETMCR_TIMESTAMP_EN@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	jmp	LBB0_18
LBB0_17:
	movq	_ETMCR_TIMESTAMP_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	%edx, %ecx
LBB0_18:
	movq	_ETM_MODE_CTXID@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	movq	_ETMCR_CTXID_SIZE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, %edi
	notl	%edi
	andl	%ecx, %edi
	orl	%esi, %ecx
	testq	%rdx, %rax
	cmovel	%edi, %ecx
	movq	_ETM_MODE_BBROAD@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	movq	_ETMCR_BRANCH_BROADCAST@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, %edi
	notl	%edi
	andl	%ecx, %edi
	orl	%esi, %ecx
	testq	%rdx, %rax
	cmovel	%edi, %ecx
	movq	_ETM_MODE_RET_STACK@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rsi
	movq	_ETMCR_RETURN_STACK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testq	%rsi, %rax
	je	LBB0_20
## %bb.19:
	orl	%edx, %ecx
	jmp	LBB0_21
LBB0_9:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_10
LBB0_20:
	notl	%edx
	andl	%edx, %ecx
LBB0_21:
	movl	%ecx, 24(%r13)
	movq	_ETM_MODE_EXCL_KERN@GOTPCREL(%rip), %rcx
	movq	_ETM_MODE_EXCL_USER@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movslq	%edx, %rcx
	testq	%rcx, %rax
	je	LBB0_23
## %bb.22:
	addq	$16, %r13
	movq	%r13, %rdi
	callq	_etm_config_trace_mode
LBB0_23:
	movq	%r14, %rdi
	callq	_spin_unlock
	movl	%r15d, %ebx
	jmp	LBB0_24
LBB0_15:
	leaq	L_.str.1(%rip), %rsi
LBB0_10:
	movq	%r12, %rdi
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_spin_unlock
LBB0_24:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETM_MODE_ALL,8,3               ## @ETM_MODE_ALL
	.comm	_ETM_MODE_EXCLUDE,4,2           ## @ETM_MODE_EXCLUDE
	.comm	_ETMTECR1_INC_EXC,4,2           ## @ETMTECR1_INC_EXC
	.comm	_ETM_MODE_CYCACC,4,2            ## @ETM_MODE_CYCACC
	.comm	_ETMCR_CYC_ACC,4,2              ## @ETMCR_CYC_ACC
	.comm	_ETM_MODE_STALL,4,2             ## @ETM_MODE_STALL
	.comm	_ETMCCR_FIFOFULL,4,2            ## @ETMCCR_FIFOFULL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stall mode not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ETMCR_STALL_MODE,4,2           ## @ETMCR_STALL_MODE
	.comm	_ETM_MODE_TIMESTAMP,4,2         ## @ETM_MODE_TIMESTAMP
	.comm	_ETMCCER_TIMESTAMP,4,2          ## @ETMCCER_TIMESTAMP
L_.str.1:                               ## @.str.1
	.asciz	"timestamp not supported\n"

	.comm	_ETMCR_TIMESTAMP_EN,4,2         ## @ETMCR_TIMESTAMP_EN
	.comm	_ETM_MODE_CTXID,4,2             ## @ETM_MODE_CTXID
	.comm	_ETMCR_CTXID_SIZE,4,2           ## @ETMCR_CTXID_SIZE
	.comm	_ETM_MODE_BBROAD,4,2            ## @ETM_MODE_BBROAD
	.comm	_ETMCR_BRANCH_BROADCAST,4,2     ## @ETMCR_BRANCH_BROADCAST
	.comm	_ETM_MODE_RET_STACK,4,2         ## @ETM_MODE_RET_STACK
	.comm	_ETMCR_RETURN_STACK,4,2         ## @ETMCR_RETURN_STACK
	.comm	_ETM_MODE_EXCL_KERN,4,2         ## @ETM_MODE_EXCL_KERN
	.comm	_ETM_MODE_EXCL_USER,4,2         ## @ETM_MODE_EXCL_USER
	.no_dead_strip	_mode_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mode_store
_mode_store:                            ; @mode_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x3
	mov	x20, x2
	mov	x22, x0
	ldr	w0, [x0]
	bl	_dev_get_drvdata
	mov	x21, x0
	add	x2, sp, #8
	mov	x0, x20
	mov	w1, #16
	bl	_kstrtoul
	mov	x23, x0
	cbnz	w0, LBB0_24
; %bb.1:
	add	x20, x21, #8
	mov	x0, x20
	bl	_spin_lock
	ldr	x8, [sp, #8]
Lloh0:
	adrp	x9, _ETM_MODE_ALL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ETM_MODE_ALL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	and	x8, x9, x8
Lloh3:
	adrp	x9, _ETM_MODE_EXCLUDE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ETM_MODE_EXCLUDE@GOTPAGEOFF]
	str	x8, [x21, #16]
Lloh5:
	ldrsw	x10, [x9]
Lloh6:
	adrp	x9, _ETMTECR1_INC_EXC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ETMTECR1_INC_EXC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	x8, x10
	b.eq	LBB0_3
; %bb.2:
	ldr	w10, [x21, #28]
	orr	w9, w10, w9
	b	LBB0_4
LBB0_3:
	ldr	w10, [x21, #28]
	bic	w9, w10, w9
LBB0_4:
	str	w9, [x21, #28]
Lloh9:
	adrp	x9, _ETM_MODE_CYCACC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ETM_MODE_CYCACC@GOTPAGEOFF]
Lloh11:
	ldrsw	x10, [x9]
Lloh12:
	adrp	x9, _ETMCR_CYC_ACC@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ETMCR_CYC_ACC@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	x8, x10
	b.eq	LBB0_6
; %bb.5:
	ldr	w10, [x21, #24]
	orr	w9, w10, w9
	b	LBB0_7
LBB0_6:
	ldr	w10, [x21, #24]
	bic	w9, w10, w9
LBB0_7:
	str	w9, [x21, #24]
Lloh15:
	adrp	x10, _ETM_MODE_STALL@GOTPAGE
Lloh16:
	ldr	x10, [x10, _ETM_MODE_STALL@GOTPAGEOFF]
Lloh17:
	ldrsw	x10, [x10]
	tst	x8, x10
	b.eq	LBB0_10
; %bb.8:
	ldr	w10, [x21]
Lloh18:
	adrp	x11, _ETMCCR_FIFOFULL@GOTPAGE
Lloh19:
	ldr	x11, [x11, _ETMCCR_FIFOFULL@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_17
; %bb.9:
Lloh21:
	adrp	x10, _ETMCR_STALL_MODE@GOTPAGE
Lloh22:
	ldr	x10, [x10, _ETMCR_STALL_MODE@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	orr	w9, w9, w10
	b	LBB0_11
LBB0_10:
Lloh24:
	adrp	x10, _ETMCR_STALL_MODE@GOTPAGE
Lloh25:
	ldr	x10, [x10, _ETMCR_STALL_MODE@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	bic	w9, w9, w10
LBB0_11:
	str	w9, [x21, #24]
Lloh27:
	adrp	x10, _ETM_MODE_TIMESTAMP@GOTPAGE
Lloh28:
	ldr	x10, [x10, _ETM_MODE_TIMESTAMP@GOTPAGEOFF]
Lloh29:
	ldrsw	x10, [x10]
	tst	x8, x10
	b.eq	LBB0_14
; %bb.12:
	ldr	w10, [x21, #4]
Lloh30:
	adrp	x11, _ETMCCER_TIMESTAMP@GOTPAGE
Lloh31:
	ldr	x11, [x11, _ETMCCER_TIMESTAMP@GOTPAGEOFF]
Lloh32:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_22
; %bb.13:
Lloh33:
	adrp	x10, _ETMCR_TIMESTAMP_EN@GOTPAGE
Lloh34:
	ldr	x10, [x10, _ETMCR_TIMESTAMP_EN@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
	orr	w9, w9, w10
	b	LBB0_15
LBB0_14:
Lloh36:
	adrp	x10, _ETMCR_TIMESTAMP_EN@GOTPAGE
Lloh37:
	ldr	x10, [x10, _ETMCR_TIMESTAMP_EN@GOTPAGEOFF]
Lloh38:
	ldr	w10, [x10]
	bic	w9, w9, w10
LBB0_15:
Lloh39:
	adrp	x10, _ETM_MODE_CTXID@GOTPAGE
Lloh40:
	ldr	x10, [x10, _ETM_MODE_CTXID@GOTPAGEOFF]
Lloh41:
	ldrsw	x10, [x10]
Lloh42:
	adrp	x11, _ETMCR_CTXID_SIZE@GOTPAGE
Lloh43:
	ldr	x11, [x11, _ETMCR_CTXID_SIZE@GOTPAGEOFF]
Lloh44:
	ldr	w11, [x11]
	bic	w12, w9, w11
	orr	w9, w9, w11
	tst	x8, x10
	csel	w9, w12, w9, eq
Lloh45:
	adrp	x10, _ETM_MODE_BBROAD@GOTPAGE
Lloh46:
	ldr	x10, [x10, _ETM_MODE_BBROAD@GOTPAGEOFF]
Lloh47:
	ldrsw	x10, [x10]
Lloh48:
	adrp	x11, _ETMCR_BRANCH_BROADCAST@GOTPAGE
Lloh49:
	ldr	x11, [x11, _ETMCR_BRANCH_BROADCAST@GOTPAGEOFF]
Lloh50:
	ldr	w11, [x11]
	bic	w12, w9, w11
	orr	w9, w9, w11
	tst	x8, x10
Lloh51:
	adrp	x10, _ETM_MODE_RET_STACK@GOTPAGE
Lloh52:
	ldr	x10, [x10, _ETM_MODE_RET_STACK@GOTPAGEOFF]
	csel	w9, w12, w9, eq
Lloh53:
	ldrsw	x11, [x10]
Lloh54:
	adrp	x10, _ETMCR_RETURN_STACK@GOTPAGE
Lloh55:
	ldr	x10, [x10, _ETMCR_RETURN_STACK@GOTPAGEOFF]
Lloh56:
	ldr	w10, [x10]
	tst	x8, x11
	b.eq	LBB0_18
; %bb.16:
	orr	w9, w9, w10
	b	LBB0_19
LBB0_17:
Lloh57:
	adrp	x1, l_.str@PAGE
Lloh58:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_23
LBB0_18:
	bic	w9, w9, w10
LBB0_19:
	str	w9, [x21, #24]
Lloh59:
	adrp	x9, _ETM_MODE_EXCL_KERN@GOTPAGE
Lloh60:
	ldr	x9, [x9, _ETM_MODE_EXCL_KERN@GOTPAGEOFF]
Lloh61:
	ldr	w9, [x9]
Lloh62:
	adrp	x10, _ETM_MODE_EXCL_USER@GOTPAGE
Lloh63:
	ldr	x10, [x10, _ETM_MODE_EXCL_USER@GOTPAGEOFF]
Lloh64:
	ldr	w10, [x10]
	orr	w9, w10, w9
	sxtw	x9, w9
	tst	x8, x9
	b.eq	LBB0_21
; %bb.20:
	add	x0, x21, #16
	bl	_etm_config_trace_mode
LBB0_21:
	mov	x0, x20
	bl	_spin_unlock
	mov	x23, x19
	b	LBB0_24
LBB0_22:
Lloh65:
	adrp	x1, l_.str.1@PAGE
Lloh66:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_23:
	mov	x0, x22
	bl	_dev_warn
Lloh67:
	adrp	x8, _EINVAL@GOTPAGE
Lloh68:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh69:
	ldr	w8, [x8]
	neg	w23, w8
	mov	x0, x20
	bl	_spin_unlock
LBB0_24:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.cfi_endproc
                                        ; -- End function
	.comm	_ETM_MODE_ALL,8,3               ; @ETM_MODE_ALL
	.comm	_ETM_MODE_EXCLUDE,4,2           ; @ETM_MODE_EXCLUDE
	.comm	_ETMTECR1_INC_EXC,4,2           ; @ETMTECR1_INC_EXC
	.comm	_ETM_MODE_CYCACC,4,2            ; @ETM_MODE_CYCACC
	.comm	_ETMCR_CYC_ACC,4,2              ; @ETMCR_CYC_ACC
	.comm	_ETM_MODE_STALL,4,2             ; @ETM_MODE_STALL
	.comm	_ETMCCR_FIFOFULL,4,2            ; @ETMCCR_FIFOFULL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stall mode not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ETMCR_STALL_MODE,4,2           ; @ETMCR_STALL_MODE
	.comm	_ETM_MODE_TIMESTAMP,4,2         ; @ETM_MODE_TIMESTAMP
	.comm	_ETMCCER_TIMESTAMP,4,2          ; @ETMCCER_TIMESTAMP
l_.str.1:                               ; @.str.1
	.asciz	"timestamp not supported\n"

	.comm	_ETMCR_TIMESTAMP_EN,4,2         ; @ETMCR_TIMESTAMP_EN
	.comm	_ETM_MODE_CTXID,4,2             ; @ETM_MODE_CTXID
	.comm	_ETMCR_CTXID_SIZE,4,2           ; @ETMCR_CTXID_SIZE
	.comm	_ETM_MODE_BBROAD,4,2            ; @ETM_MODE_BBROAD
	.comm	_ETMCR_BRANCH_BROADCAST,4,2     ; @ETMCR_BRANCH_BROADCAST
	.comm	_ETM_MODE_RET_STACK,4,2         ; @ETM_MODE_RET_STACK
	.comm	_ETMCR_RETURN_STACK,4,2         ; @ETMCR_RETURN_STACK
	.comm	_ETM_MODE_EXCL_KERN,4,2         ; @ETM_MODE_EXCL_KERN
	.comm	_ETM_MODE_EXCL_USER,4,2         ; @ETM_MODE_EXCL_USER
	.no_dead_strip	_mode_store
.subsections_via_symbols
