	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_spe_pmu_irq_handler
_arm_spe_pmu_irq_handler:               ## @arm_spe_pmu_irq_handler
	.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
	movq	%rsi, %rbx
	movq	8(%rsi), %r14
	movq	%rsi, %rdi
	callq	_perf_get_aux
	movq	_IRQ_NONE@GOTPCREL(%rip), %r12
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	%rbx, %rdi
	callq	_arm_spe_pmu_buf_get_fault_act
	cmpl	$128, %eax
	je	LBB0_8
## %bb.2:
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_irq_work_run
	cmpl	$129, %r15d
	je	LBB0_5
## %bb.3:
	cmpl	$130, %r15d
	jne	LBB0_7
## %bb.4:
	xorl	%eax, %eax
	callq	_arm_spe_pmu_disable_and_drain_local
	jmp	LBB0_7
LBB0_5:
	movq	_PERF_AUX_FLAG_TRUNCATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_arm_spe_perf_aux_output_begin
	xorl	%eax, %eax
	callq	_isb
LBB0_7:
	movq	_SYS_PMBSR_EL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_write_sysreg_s
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %r12
LBB0_8:
	movl	(%r12), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_PERF_AUX_FLAG_TRUNCATED,4,2    ## @PERF_AUX_FLAG_TRUNCATED
	.comm	_SYS_PMBSR_EL1,4,2              ## @SYS_PMBSR_EL1
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_arm_spe_pmu_irq_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_spe_pmu_irq_handler
_arm_spe_pmu_irq_handler:               ; @arm_spe_pmu_irq_handler
	.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, x1
	ldr	x20, [x1, #8]
	mov	x0, x1
	bl	_perf_get_aux
	cbz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_arm_spe_pmu_buf_get_fault_act
	cmp	w0, #128
	b.ne	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
	mov	x21, x0
	bl	_irq_work_run
	cmp	w21, #129
	b.eq	LBB0_6
; %bb.4:
	cmp	w21, #130
	b.ne	LBB0_8
; %bb.5:
	bl	_arm_spe_pmu_disable_and_drain_local
	b	LBB0_8
LBB0_6:
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _PERF_AUX_FLAG_TRUNCATED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PERF_AUX_FLAG_TRUNCATED@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	bl	_arm_spe_perf_aux_output_begin
	bl	_isb
LBB0_8:
Lloh5:
	adrp	x8, _SYS_PMBSR_EL1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SYS_PMBSR_EL1@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w0, #0
	bl	_write_sysreg_s
Lloh8:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_PERF_AUX_FLAG_TRUNCATED,4,2    ; @PERF_AUX_FLAG_TRUNCATED
	.comm	_SYS_PMBSR_EL1,4,2              ; @SYS_PMBSR_EL1
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_arm_spe_pmu_irq_handler
.subsections_via_symbols
