	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function panfrost_perfcnt_disable_locked
_panfrost_perfcnt_disable_locked:       ## @panfrost_perfcnt_disable_locked
	.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	8(%rdi), %r12
	cmpq	%rsi, 16(%r12)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	movq	%rdi, %rbx
	movq	_GPU_PRFCNT_JM_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	callq	_gpu_write
	movq	_GPU_PRFCNT_SHADER_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_gpu_write
	movq	_GPU_PRFCNT_MMU_L2_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_gpu_write
	movq	_GPU_PRFCNT_TILER_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_gpu_write
	movq	_GPU_PERFCNT_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_GPU_PERFCNT_CFG_MODE_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GPU_PERFCNT_CFG_MODE
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_gpu_write
	movq	$0, 16(%r12)
	movq	(%r12), %rdi
	movq	8(%r12), %rsi
	callq	_drm_gem_shmem_vunmap
	movq	$0, 8(%r12)
	movq	(%r12), %rdi
	callq	_drm_gem_object_put_unlocked
	movq	$0, (%r12)
	movl	(%rbx), %edi
	callq	_pm_runtime_mark_last_busy
	movl	(%rbx), %edi
	callq	_pm_runtime_put_autosuspend
LBB0_3:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GPU_PRFCNT_JM_EN,4,2           ## @GPU_PRFCNT_JM_EN
	.comm	_GPU_PRFCNT_SHADER_EN,4,2       ## @GPU_PRFCNT_SHADER_EN
	.comm	_GPU_PRFCNT_MMU_L2_EN,4,2       ## @GPU_PRFCNT_MMU_L2_EN
	.comm	_GPU_PRFCNT_TILER_EN,4,2        ## @GPU_PRFCNT_TILER_EN
	.comm	_GPU_PERFCNT_CFG,4,2            ## @GPU_PERFCNT_CFG
	.comm	_GPU_PERFCNT_CFG_MODE_OFF,4,2   ## @GPU_PERFCNT_CFG_MODE_OFF
	.no_dead_strip	_panfrost_perfcnt_disable_locked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function panfrost_perfcnt_disable_locked
_panfrost_perfcnt_disable_locked:       ; @panfrost_perfcnt_disable_locked
	.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
	ldr	x21, [x0, #8]
	ldr	x8, [x21, #16]
	cmp	x8, x1
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	mov	x19, x0
Lloh3:
	adrp	x8, _GPU_PRFCNT_JM_EN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPU_PRFCNT_JM_EN@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_gpu_write
Lloh6:
	adrp	x8, _GPU_PRFCNT_SHADER_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GPU_PRFCNT_SHADER_EN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_gpu_write
Lloh9:
	adrp	x8, _GPU_PRFCNT_MMU_L2_EN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GPU_PRFCNT_MMU_L2_EN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_gpu_write
Lloh12:
	adrp	x8, _GPU_PRFCNT_TILER_EN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GPU_PRFCNT_TILER_EN@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_gpu_write
Lloh15:
	adrp	x8, _GPU_PERFCNT_CFG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GPU_PERFCNT_CFG@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
Lloh18:
	adrp	x8, _GPU_PERFCNT_CFG_MODE_OFF@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GPU_PERFCNT_CFG_MODE_OFF@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_GPU_PERFCNT_CFG_MODE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_gpu_write
	str	xzr, [x21, #16]
	ldp	x0, x1, [x21]
	bl	_drm_gem_shmem_vunmap
	str	xzr, [x21, #8]
	ldr	x0, [x21]
	bl	_drm_gem_object_put_unlocked
	str	xzr, [x21]
	ldr	w0, [x19]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x19]
	bl	_pm_runtime_put_autosuspend
	mov	w0, #0
LBB0_3:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GPU_PRFCNT_JM_EN,4,2           ; @GPU_PRFCNT_JM_EN
	.comm	_GPU_PRFCNT_SHADER_EN,4,2       ; @GPU_PRFCNT_SHADER_EN
	.comm	_GPU_PRFCNT_MMU_L2_EN,4,2       ; @GPU_PRFCNT_MMU_L2_EN
	.comm	_GPU_PRFCNT_TILER_EN,4,2        ; @GPU_PRFCNT_TILER_EN
	.comm	_GPU_PERFCNT_CFG,4,2            ; @GPU_PERFCNT_CFG
	.comm	_GPU_PERFCNT_CFG_MODE_OFF,4,2   ; @GPU_PERFCNT_CFG_MODE_OFF
	.no_dead_strip	_panfrost_perfcnt_disable_locked
.subsections_via_symbols
