	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function armpmu_map_cache_event
_armpmu_map_cache_event:                ## @armpmu_map_cache_event
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	movq	_PERF_COUNT_HW_CACHE_MAX@GOTPCREL(%rip), %rax
	movzbl	%bl, %ecx
	cmpl	(%rax), %ecx
	jae	LBB0_1
## %bb.2:
	movq	_PERF_COUNT_HW_CACHE_OP_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movzbl	%bh, %edx
	cmpl	%eax, %edx
	jae	LBB0_1
## %bb.3:
	movq	_PERF_COUNT_HW_CACHE_RESULT_MAX@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	shrl	$16, %ebx
	movzbl	%bl, %ebx
	cmpl	%esi, %ebx
	jae	LBB0_1
## %bb.4:
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	movl	%ecx, %ecx
	imulq	%rcx, %rax
	imulq	%rsi, %rax
	leaq	(%rdi,%rax,4), %rax
	movl	%edx, %ecx
	imulq	%rsi, %rcx
	leaq	(%rax,%rcx,4), %rax
	movl	%ebx, %ecx
	movl	(%rax,%rcx,4), %eax
	movq	_CACHE_OP_UNSUPPORTED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
LBB0_6:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PERF_COUNT_HW_CACHE_MAX,4,2    ## @PERF_COUNT_HW_CACHE_MAX
	.comm	_PERF_COUNT_HW_CACHE_OP_MAX,4,2 ## @PERF_COUNT_HW_CACHE_OP_MAX
	.comm	_PERF_COUNT_HW_CACHE_RESULT_MAX,4,2 ## @PERF_COUNT_HW_CACHE_RESULT_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_CACHE_OP_UNSUPPORTED,4,2       ## @CACHE_OP_UNSUPPORTED
	.no_dead_strip	_armpmu_map_cache_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function armpmu_map_cache_event
_armpmu_map_cache_event:                ; @armpmu_map_cache_event
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _PERF_COUNT_HW_CACHE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PERF_COUNT_HW_CACHE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	and	w8, w1, #0xff
	cmp	w8, w9
	b.hs	LBB0_6
; %bb.1:
Lloh3:
	adrp	x9, _PERF_COUNT_HW_CACHE_OP_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PERF_COUNT_HW_CACHE_OP_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x9]
	ubfx	w9, w1, #8, #8
	cmp	w9, w10
	b.hs	LBB0_6
; %bb.2:
Lloh6:
	adrp	x11, _PERF_COUNT_HW_CACHE_RESULT_MAX@GOTPAGE
Lloh7:
	ldr	x11, [x11, _PERF_COUNT_HW_CACHE_RESULT_MAX@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	ubfx	w12, w1, #16, #8
	cmp	w12, w11
	b.hs	LBB0_6
; %bb.3:
	cbz	x0, LBB0_5
; %bb.4:
	mul	x8, x10, x8
	mul	x8, x8, x11
	add	x8, x0, x8, lsl #2
	mul	x9, x11, x9
	add	x8, x8, x9, lsl #2
	ldr	w0, [x8, w12, uxtw #2]
Lloh9:
	adrp	x8, _CACHE_OP_UNSUPPORTED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CACHE_OP_UNSUPPORTED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
LBB0_5:
Lloh12:
	adrp	x8, _ENOENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PERF_COUNT_HW_CACHE_MAX,4,2    ; @PERF_COUNT_HW_CACHE_MAX
	.comm	_PERF_COUNT_HW_CACHE_OP_MAX,4,2 ; @PERF_COUNT_HW_CACHE_OP_MAX
	.comm	_PERF_COUNT_HW_CACHE_RESULT_MAX,4,2 ; @PERF_COUNT_HW_CACHE_RESULT_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_CACHE_OP_UNSUPPORTED,4,2       ; @CACHE_OP_UNSUPPORTED
	.no_dead_strip	_armpmu_map_cache_event
.subsections_via_symbols
