	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hisi_uncore_pmu_event_init     ## -- Begin function hisi_uncore_pmu_event_init
	.p2align	4, 0x90
_hisi_uncore_pmu_event_init:            ## @hisi_uncore_pmu_event_init
	.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
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	8(%rdi), %rax
	movq	24(%rdi), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	movq	%rdi, %rbx
	callq	_is_sampling_event
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_PERF_ATTACH_TASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_6
LBB0_5:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	cmpl	$0, 4(%rbx)
	js	LBB0_7
## %bb.8:
	movq	%rbx, %rdi
	callq	_hisi_validate_event_group
	testl	%eax, %eax
	je	LBB0_7
## %bb.9:
	movq	24(%rbx), %rdi
	callq	_to_hisi_pmu
	movq	16(%rbx), %rcx
	cmpq	(%rax), %rcx
	jg	LBB0_7
## %bb.10:
	movl	8(%rax), %eax
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.11:
	movl	$-1, 32(%rbx)
	movq	%rcx, 40(%rbx)
	movl	%eax, 4(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_PERF_ATTACH_TASK,4,2           ## @PERF_ATTACH_TASK
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hisi_uncore_pmu_event_init     ; -- Begin function hisi_uncore_pmu_event_init
	.p2align	2
_hisi_uncore_pmu_event_init:            ; @hisi_uncore_pmu_event_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #8]
	ldr	x9, [x0, #24]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_is_sampling_event
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _PERF_ATTACH_TASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PERF_ATTACH_TASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
LBB0_3:
Lloh3:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _ENOENT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w8, [x19, #4]
	tbnz	w8, #31, LBB0_12
; %bb.8:
	mov	x0, x19
	bl	_hisi_validate_event_group
	cbz	w0, LBB0_12
; %bb.9:
	ldr	x0, [x19, #24]
	bl	_to_hisi_pmu
	ldr	x8, [x19, #16]
	ldr	x9, [x0]
	cmp	x8, x9
	b.gt	LBB0_12
; %bb.10:
	ldr	w9, [x0, #8]
	cmn	w9, #1
	b.eq	LBB0_12
; %bb.11:
	mov	w0, #0
	mov	w10, #-1
	str	w10, [x19, #32]
	str	x8, [x19, #40]
	str	w9, [x19, #4]
	b	LBB0_6
LBB0_12:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_PERF_ATTACH_TASK,4,2           ; @PERF_ATTACH_TASK
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
