	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function panfrost_perfcnt_dump_locked
_panfrost_perfcnt_dump_locked:          ## @panfrost_perfcnt_dump_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	callq	_reinit_completion
	movq	(%rbx), %rax
	movq	8(%rax), %rax
	movl	(%rax), %edx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	movq	_GPU_PERFCNT_BASE_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gpu_write
	movq	_GPU_PERFCNT_BASE_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gpu_write
	movq	_GPU_INT_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GPU_IRQ_CLEAN_CACHES_COMPLETED@GOTPCREL(%rip), %rax
	movq	_GPU_IRQ_PERFCNT_SAMPLE_COMPLETED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_gpu_write
	movq	_GPU_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GPU_CMD_PERFCNT_SAMPLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_gpu_write
	movq	(%rbx), %rbx
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_interruptible_timeout
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	xorl	%esi, %esi
	subl	(%rcx), %esi
	testl	%eax, %eax
	cmovnsl	%edx, %eax
	cmovel	%esi, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GPU_PERFCNT_BASE_LO,4,2        ## @GPU_PERFCNT_BASE_LO
	.comm	_GPU_PERFCNT_BASE_HI,4,2        ## @GPU_PERFCNT_BASE_HI
	.comm	_GPU_INT_CLEAR,4,2              ## @GPU_INT_CLEAR
	.comm	_GPU_IRQ_CLEAN_CACHES_COMPLETED,4,2 ## @GPU_IRQ_CLEAN_CACHES_COMPLETED
	.comm	_GPU_IRQ_PERFCNT_SAMPLE_COMPLETED,4,2 ## @GPU_IRQ_PERFCNT_SAMPLE_COMPLETED
	.comm	_GPU_CMD,4,2                    ## @GPU_CMD
	.comm	_GPU_CMD_PERFCNT_SAMPLE,4,2     ## @GPU_CMD_PERFCNT_SAMPLE
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_panfrost_perfcnt_dump_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_dump_locked
_panfrost_perfcnt_dump_locked:          ; @panfrost_perfcnt_dump_locked
	.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
	ldr	x0, [x0]
	bl	_reinit_completion
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh2:
	ldr	w9, [x9]
	lsl	w2, w8, w9
Lloh3:
	adrp	x8, _GPU_PERFCNT_BASE_LO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPU_PERFCNT_BASE_LO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gpu_write
Lloh6:
	adrp	x8, _GPU_PERFCNT_BASE_HI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GPU_PERFCNT_BASE_HI@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gpu_write
Lloh9:
	adrp	x8, _GPU_INT_CLEAR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GPU_INT_CLEAR@GOTPAGEOFF]
Lloh11:
	adrp	x9, _GPU_IRQ_CLEAN_CACHES_COMPLETED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _GPU_IRQ_CLEAN_CACHES_COMPLETED@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	ldr	w8, [x9]
Lloh15:
	adrp	x9, _GPU_IRQ_PERFCNT_SAMPLE_COMPLETED@GOTPAGE
Lloh16:
	ldr	x9, [x9, _GPU_IRQ_PERFCNT_SAMPLE_COMPLETED@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_gpu_write
Lloh18:
	adrp	x8, _GPU_CMD@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GPU_CMD@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _GPU_CMD_PERFCNT_SAMPLE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GPU_CMD_PERFCNT_SAMPLE@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_gpu_write
	ldr	x19, [x19]
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x19
	bl	_wait_for_completion_interruptible_timeout
	cmp	w0, #0
	csel	w8, w0, wzr, lt
Lloh24:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	csneg	w0, w8, w9, ne
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GPU_PERFCNT_BASE_LO,4,2        ; @GPU_PERFCNT_BASE_LO
	.comm	_GPU_PERFCNT_BASE_HI,4,2        ; @GPU_PERFCNT_BASE_HI
	.comm	_GPU_INT_CLEAR,4,2              ; @GPU_INT_CLEAR
	.comm	_GPU_IRQ_CLEAN_CACHES_COMPLETED,4,2 ; @GPU_IRQ_CLEAN_CACHES_COMPLETED
	.comm	_GPU_IRQ_PERFCNT_SAMPLE_COMPLETED,4,2 ; @GPU_IRQ_PERFCNT_SAMPLE_COMPLETED
	.comm	_GPU_CMD,4,2                    ; @GPU_CMD
	.comm	_GPU_CMD_PERFCNT_SAMPLE,4,2     ; @GPU_CMD_PERFCNT_SAMPLE
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_panfrost_perfcnt_dump_locked
.subsections_via_symbols
