	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_v5_0_ring_get_wptr
_sdma_v5_0_ring_get_wptr:               ## @sdma_v5_0_ring_get_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	cmpq	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	movq	(%r14), %r14
	movq	(%rbx), %rbx
	movl	(%r14,%rbx,4), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movl	(%r14,%rbx,4), %esi
	sarl	$2, %esi
	movl	%esi, (%r14,%rbx,4)
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movl	(%r14,%rbx,4), %eax
	jmp	LBB0_3
LBB0_2:
	movl	8(%rbx), %esi
	movq	_mmSDMA0_GFX_RB_WPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_sdma_v5_0_get_reg_offset
	movl	%eax, %edi
	callq	_RREG32
	movl	%eax, %r15d
	sarl	$2, %r15d
	movl	8(%rbx), %esi
	movq	_mmSDMA0_GFX_RB_WPTR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_sdma_v5_0_get_reg_offset
	movl	%eax, %edi
	callq	_RREG32
	sarl	$2, %eax
	movl	8(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
                                        ## implicit-def: $eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wptr/doorbell before shift == 0x%016llx\n"

L_.str.1:                               ## @.str.1
	.asciz	"wptr/doorbell after shift == 0x%016llx\n"

	.comm	_mmSDMA0_GFX_RB_WPTR,4,2        ## @mmSDMA0_GFX_RB_WPTR
	.comm	_mmSDMA0_GFX_RB_WPTR_HI,4,2     ## @mmSDMA0_GFX_RB_WPTR_HI
L_.str.2:                               ## @.str.2
	.asciz	"wptr [%i]high== 0x%08x low==0x%08x\n"

	.no_dead_strip	_sdma_v5_0_ring_get_wptr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_v5_0_ring_get_wptr
_sdma_v5_0_ring_get_wptr:               ; @sdma_v5_0_ring_get_wptr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	ldp	x8, x20, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x20, [x20]
	ldr	x8, [x19]
	lsl	x19, x8, #2
	ldr	w1, [x20, x19]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w8, [x20, x19]
	asr	w1, w8, #2
	str	w1, [x20, x19]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w0, [x20, x19]
	b	LBB0_3
LBB0_2:
	ldr	w1, [x19, #8]
Lloh4:
	adrp	x8, _mmSDMA0_GFX_RB_WPTR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _mmSDMA0_GFX_RB_WPTR@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_sdma_v5_0_get_reg_offset
	bl	_RREG32
	asr	w21, w0, #2
	ldr	w1, [x19, #8]
Lloh7:
	adrp	x8, _mmSDMA0_GFX_RB_WPTR_HI@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mmSDMA0_GFX_RB_WPTR_HI@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_sdma_v5_0_get_reg_offset
	bl	_RREG32
	asr	w8, w0, #2
	ldr	w1, [x19, #8]
	stp	x8, x21, [sp]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG
                                        ; implicit-def: $w0
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wptr/doorbell before shift == 0x%016llx\n"

l_.str.1:                               ; @.str.1
	.asciz	"wptr/doorbell after shift == 0x%016llx\n"

	.comm	_mmSDMA0_GFX_RB_WPTR,4,2        ; @mmSDMA0_GFX_RB_WPTR
	.comm	_mmSDMA0_GFX_RB_WPTR_HI,4,2     ; @mmSDMA0_GFX_RB_WPTR_HI
l_.str.2:                               ; @.str.2
	.asciz	"wptr [%i]high== 0x%08x low==0x%08x\n"

	.no_dead_strip	_sdma_v5_0_ring_get_wptr
.subsections_via_symbols
