	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_v4_0_page_ring_set_wptr
_sdma_v4_0_page_ring_set_wptr:          ## @sdma_v4_0_page_ring_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	cmpq	$0, 24(%rdi)
	je	LBB0_2
## %bb.1:
	movq	32(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %edi
	movl	8(%rbx), %esi
	shll	$2, %esi
	callq	_WRITE_ONCE
	movl	8(%rbx), %esi
	movl	16(%rbx), %edi
	shll	$2, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WDOORBELL64                    ## TAILCALL
LBB0_2:
	movl	8(%rbx), %r14d
	movl	12(%rbx), %r15d
	shll	$2, %r14d
	movq	_mmSDMA0_PAGE_RB_WPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r14d, %edi
	callq	_lower_32_bits
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_WREG32_SDMA
	movl	12(%rbx), %r15d
	movq	_mmSDMA0_PAGE_RB_WPTR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r14d, %edi
	callq	_upper_32_bits
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32_SDMA                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mmSDMA0_PAGE_RB_WPTR,4,2       ## @mmSDMA0_PAGE_RB_WPTR
	.comm	_mmSDMA0_PAGE_RB_WPTR_HI,4,2    ## @mmSDMA0_PAGE_RB_WPTR_HI
	.no_dead_strip	_sdma_v4_0_page_ring_set_wptr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_v4_0_page_ring_set_wptr
_sdma_v4_0_page_ring_set_wptr:          ; @sdma_v4_0_page_ring_set_wptr
	.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
	mov	x19, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldr	x9, [x19]
	ldr	w0, [x8, x9, lsl #2]
	ldr	w8, [x19, #8]
	lsl	w1, w8, #2
	bl	_WRITE_ONCE
	ldr	w0, [x19, #16]
	ldr	w8, [x19, #8]
	lsl	w1, w8, #2
	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
	b	_WDOORBELL64
LBB0_2:
	ldp	w8, w20, [x19, #8]
	lsl	w21, w8, #2
Lloh0:
	adrp	x8, _mmSDMA0_PAGE_RB_WPTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mmSDMA0_PAGE_RB_WPTR@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_lower_32_bits
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_WREG32_SDMA
	ldr	w19, [x19, #12]
Lloh3:
	adrp	x8, _mmSDMA0_PAGE_RB_WPTR_HI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mmSDMA0_PAGE_RB_WPTR_HI@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	mov	x0, x21
	bl	_upper_32_bits
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	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
	b	_WREG32_SDMA
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_mmSDMA0_PAGE_RB_WPTR,4,2       ; @mmSDMA0_PAGE_RB_WPTR
	.comm	_mmSDMA0_PAGE_RB_WPTR_HI,4,2    ; @mmSDMA0_PAGE_RB_WPTR_HI
	.no_dead_strip	_sdma_v4_0_page_ring_set_wptr
.subsections_via_symbols
