	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_l3c_pmu_write_evtype
_hisi_l3c_pmu_write_evtype:             ## @hisi_l3c_pmu_write_evtype
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	_L3C_EVENT_TYPE0@GOTPCREL(%rip), %rax
	leal	3(%rsi), %ebx
	testl	%esi, %esi
	cmovnsl	%esi, %ebx
	andl	$-4, %ebx
	subl	%ebx, %esi
	addl	(%rax), %ebx
	movl	%edx, %r14d
	movq	%rdi, %r15
	leal	(,%rsi,8), %r12d
	movl	(%rdi), %edi
	addl	%ebx, %edi
	callq	_readl
	movq	_L3C_EVTYPE_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%r12d, %ecx
	shll	%cl, %edx
	notl	%edx
	shll	%cl, %r14d
	andl	%eax, %edx
	orl	%edx, %r14d
	addl	(%r15), %ebx
	movl	%r14d, %edi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_L3C_EVENT_TYPE0,4,2            ## @L3C_EVENT_TYPE0
	.comm	_L3C_EVTYPE_NONE,4,2            ## @L3C_EVTYPE_NONE
	.no_dead_strip	_hisi_l3c_pmu_write_evtype
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hisi_l3c_pmu_write_evtype
_hisi_l3c_pmu_write_evtype:             ; @hisi_l3c_pmu_write_evtype
	.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, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _L3C_EVENT_TYPE0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _L3C_EVENT_TYPE0@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w9, w1, #3
	cmp	w1, #0
	csel	w9, w9, w1, lt
	and	w9, w9, #0xfffffffc
	sub	w10, w1, w9
	lsl	w21, w10, #3
	ldr	w10, [x0]
	add	w22, w8, w9
	add	w0, w10, w22
	bl	_readl
Lloh3:
	adrp	x8, _L3C_EVTYPE_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _L3C_EVTYPE_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w8, w8, w21
	bic	w8, w0, w8
	lsl	w9, w19, w21
	orr	w0, w8, w9
	ldr	w8, [x20]
	add	w1, w8, w22
	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	_writel
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_L3C_EVENT_TYPE0,4,2            ; @L3C_EVENT_TYPE0
	.comm	_L3C_EVTYPE_NONE,4,2            ; @L3C_EVTYPE_NONE
	.no_dead_strip	_hisi_l3c_pmu_write_evtype
.subsections_via_symbols
