	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_perfmon_start              ## -- Begin function vc4_perfmon_start
	.p2align	4, 0x90
_vc4_perfmon_start:                     ## @vc4_perfmon_start
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpq	$0, (%r14)
	setne	%dil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %edi
LBB0_3:
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	jne	LBB0_10
## %bb.4:
	cmpl	$0, (%r15)
	je	LBB0_5
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_V3D_PCTRS
	movq	8(%r15), %rcx
	movl	(%rcx,%rbx,4), %esi
	movl	%eax, %edi
	callq	_V3D_WRITE
	incq	%rbx
	movl	(%r15), %edi
	cmpq	%rdi, %rbx
	jb	LBB0_7
## %bb.8:
	decl	%edi
	jmp	LBB0_9
LBB0_5:
	movl	$-1, %edi
LBB0_9:
                                        ## kill: def $edi killed $edi killed $rdi
	xorl	%esi, %esi
	callq	_GENMASK
	movl	%eax, %ebx
	movq	_V3D_PCTRC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_V3D_WRITE
	movq	_V3D_PCTRE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_V3D_PCTRE_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, %esi
	callq	_V3D_WRITE
	movq	%r15, (%r14)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V3D_PCTRC,4,2                  ## @V3D_PCTRC
	.comm	_V3D_PCTRE,4,2                  ## @V3D_PCTRE
	.comm	_V3D_PCTRE_EN,4,2               ## @V3D_PCTRE_EN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_perfmon_start              ; -- Begin function vc4_perfmon_start
	.p2align	2
_vc4_perfmon_start:                     ; @vc4_perfmon_start
	.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
	mov	x20, x0
	cbz	x1, LBB0_2
; %bb.1:
	ldr	x8, [x20]
	cmp	x8, #0
	cset	w0, ne
	bl	_WARN_ON_ONCE
	cbnz	x0, LBB0_9
	b	LBB0_3
LBB0_2:
	mov	w0, #1
	bl	_WARN_ON_ONCE
	cbnz	x0, LBB0_9
LBB0_3:
	ldr	w8, [x19]
	cbz	w8, LBB0_7
; %bb.4:
	mov	x21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_V3D_PCTRS
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x21, lsl #2]
	bl	_V3D_WRITE
	add	x21, x21, #1
	ldr	w8, [x19]
	cmp	x21, x8
	b.lo	LBB0_5
; %bb.6:
	sub	w0, w8, #1
	b	LBB0_8
LBB0_7:
	mov	w0, #-1
LBB0_8:
	mov	w1, #0
	bl	_GENMASK
	mov	x21, x0
Lloh0:
	adrp	x8, _V3D_PCTRC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V3D_PCTRC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_V3D_WRITE
Lloh3:
	adrp	x8, _V3D_PCTRE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V3D_PCTRE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _V3D_PCTRE_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V3D_PCTRE_EN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w1, w8, w21
	bl	_V3D_WRITE
	str	x19, [x20]
LBB0_9:
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_V3D_PCTRC,4,2                  ; @V3D_PCTRC
	.comm	_V3D_PCTRE,4,2                  ; @V3D_PCTRE
	.comm	_V3D_PCTRE_EN,4,2               ; @V3D_PCTRE_EN
.subsections_via_symbols
