	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cayman_gfx_set_wptr            ## -- Begin function cayman_gfx_set_wptr
	.p2align	4, 0x90
_cayman_gfx_set_wptr:                   ## @cayman_gfx_set_wptr
	.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	(%rsi), %rax
	movq	_RADEON_RING_TYPE_GFX_INDEX@GOTPCREL(%rip), %rcx
	movq	_CAYMAN_RING_TYPE_CP1_INDEX@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_1
## %bb.2:
	movq	_CP_RB1_WPTR@GOTPCREL(%rip), %rbx
	cmpq	(%rcx), %rax
	je	LBB0_4
	jmp	LBB0_5
LBB0_1:
	movq	_CP_RB2_WPTR@GOTPCREL(%rip), %rbx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_4:
	movq	_CP_RB0_WPTR@GOTPCREL(%rip), %rbx
LBB0_5:
	movl	(%rbx), %edi
	movl	8(%rsi), %esi
	callq	_WREG32
	movl	(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_RREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_RING_TYPE_GFX_INDEX,8,3 ## @RADEON_RING_TYPE_GFX_INDEX
	.comm	_CP_RB0_WPTR,4,2                ## @CP_RB0_WPTR
	.comm	_CAYMAN_RING_TYPE_CP1_INDEX,8,3 ## @CAYMAN_RING_TYPE_CP1_INDEX
	.comm	_CP_RB1_WPTR,4,2                ## @CP_RB1_WPTR
	.comm	_CP_RB2_WPTR,4,2                ## @CP_RB2_WPTR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cayman_gfx_set_wptr            ; -- Begin function cayman_gfx_set_wptr
	.p2align	2
_cayman_gfx_set_wptr:                   ; @cayman_gfx_set_wptr
	.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
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _CAYMAN_RING_TYPE_CP1_INDEX@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CAYMAN_RING_TYPE_CP1_INDEX@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x11, _CP_RB2_WPTR@GOTPAGE
Lloh7:
	ldr	x11, [x11, _CP_RB2_WPTR@GOTPAGEOFF]
Lloh8:
	adrp	x12, _CP_RB1_WPTR@GOTPAGE
Lloh9:
	ldr	x12, [x12, _CP_RB1_WPTR@GOTPAGEOFF]
	cmp	x8, x10
	csel	x10, x12, x11, eq
Lloh10:
	adrp	x11, _CP_RB0_WPTR@GOTPAGE
Lloh11:
	ldr	x11, [x11, _CP_RB0_WPTR@GOTPAGEOFF]
	cmp	x8, x9
	csel	x19, x11, x10, eq
	ldr	w0, [x19]
	ldr	w1, [x1, #8]
	bl	_WREG32
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_RREG32
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_RING_TYPE_GFX_INDEX,8,3 ; @RADEON_RING_TYPE_GFX_INDEX
	.comm	_CP_RB0_WPTR,4,2                ; @CP_RB0_WPTR
	.comm	_CAYMAN_RING_TYPE_CP1_INDEX,8,3 ; @CAYMAN_RING_TYPE_CP1_INDEX
	.comm	_CP_RB1_WPTR,4,2                ; @CP_RB1_WPTR
	.comm	_CP_RB2_WPTR,4,2                ; @CP_RB2_WPTR
.subsections_via_symbols
