	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cik_compute_get_rptr           ## -- Begin function cik_compute_get_rptr
	.p2align	4, 0x90
_cik_compute_get_rptr:                  ## @cik_compute_get_rptr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	cmpq	$0, 16(%rdi)
	je	LBB0_3
## %bb.1:
	movl	(%rbx), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	movq	8(%r14), %rax
	sarl	$2, %ecx
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %eax
	jmp	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	12(%rbx), %esi
	movl	4(%rbx), %ecx
	movl	8(%rbx), %edx
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	callq	_cik_srbm_select
	movq	_CP_HQD_PQ_RPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movl	%eax, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_cik_srbm_select
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CP_HQD_PQ_RPTR,4,2             ## @CP_HQD_PQ_RPTR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cik_compute_get_rptr           ; -- Begin function cik_compute_get_rptr
	.p2align	2
_cik_compute_get_rptr:                  ; @cik_compute_get_rptr
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w9, [x20]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #2
	ldr	w0, [x8, w9, sxtw #2]
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_mutex_lock
	ldp	w2, w1, [x20, #8]
	ldr	w3, [x20, #4]
	mov	x0, x19
	mov	w4, #0
	bl	_cik_srbm_select
Lloh0:
	adrp	x8, _CP_HQD_PQ_RPTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CP_HQD_PQ_RPTR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_RREG32
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_cik_srbm_select
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CP_HQD_PQ_RPTR,4,2             ; @CP_HQD_PQ_RPTR
.subsections_via_symbols
