	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rarch_perf_register            ## -- Begin function rarch_perf_register
	.p2align	4, 0x90
_rarch_perf_register:                   ## @rarch_perf_register
	.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	%rdi, %rbx
	movq	_RARCH_CTL_IS_PERFCNT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_rarch_ctl
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$0, (%rbx)
	jne	LBB0_4
## %bb.2:
	movq	_perf_ptr_rarch@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movq	_MAX_COUNTERS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jge	LBB0_4
## %bb.3:
	movq	_perf_counters_rarch@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	leaq	1(%rax), %rsi
	movq	%rsi, (%rcx)
	movq	%rbx, (%rdx,%rax,8)
	movl	$1, (%rbx)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RARCH_CTL_IS_PERFCNT_ENABLE,4,2 ## @RARCH_CTL_IS_PERFCNT_ENABLE
	.comm	_perf_ptr_rarch,8,3             ## @perf_ptr_rarch
	.comm	_MAX_COUNTERS,8,3               ## @MAX_COUNTERS
	.comm	_perf_counters_rarch,8,3        ## @perf_counters_rarch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rarch_perf_register            ; -- Begin function rarch_perf_register
	.p2align	2
_rarch_perf_register:                   ; @rarch_perf_register
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _RARCH_CTL_IS_PERFCNT_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RARCH_CTL_IS_PERFCNT_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_rarch_ctl
	cbz	w0, LBB0_4
; %bb.1:
	ldr	w8, [x19]
	cbnz	w8, LBB0_4
; %bb.2:
Lloh3:
	adrp	x9, _perf_ptr_rarch@GOTPAGE
Lloh4:
	ldr	x9, [x9, _perf_ptr_rarch@GOTPAGEOFF]
	ldr	x8, [x9]
Lloh5:
	adrp	x10, _MAX_COUNTERS@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MAX_COUNTERS@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ge	LBB0_4
; %bb.3:
Lloh8:
	adrp	x10, _perf_counters_rarch@GOTPAGE
Lloh9:
	ldr	x10, [x10, _perf_counters_rarch@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	add	x11, x8, #1
	str	x11, [x9]
	str	x19, [x10, x8, lsl #3]
	mov	w8, #1
	str	w8, [x19]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_RARCH_CTL_IS_PERFCNT_ENABLE,4,2 ; @RARCH_CTL_IS_PERFCNT_ENABLE
	.comm	_perf_ptr_rarch,8,3             ; @perf_ptr_rarch
	.comm	_MAX_COUNTERS,8,3               ; @MAX_COUNTERS
	.comm	_perf_counters_rarch,8,3        ; @perf_counters_rarch
.subsections_via_symbols
