	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cik_sdma_hdp_flush_ring_emit
_cik_sdma_hdp_flush_ring_emit:          ## @cik_sdma_hdp_flush_ring_emit
	.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
	movslq	%esi, %r14
	leaq	(,%r14,4), %rbx
	addq	(%rdi), %rbx
	movl	$1, %edi
	callq	_SDMA_POLL_REG_MEM_EXTRA_OP
	movl	%eax, %r15d
	movl	$3, %edi
	callq	_SDMA_POLL_REG_MEM_EXTRA_FUNC
	movq	_R600_RING_TYPE_DMA_INDEX@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_1
## %bb.2:
	movq	_SDMA0@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_SDMA1@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %r14d
	orl	%r15d, %eax
	movq	_SDMA_OPCODE_POLL_REG_MEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_SDMA_PACKET
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	_GPU_HDP_FLUSH_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_radeon_ring_write
	movq	_GPU_HDP_FLUSH_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	$268369930, %esi                ## imm = 0xFFF000A
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_radeon_ring_write              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_R600_RING_TYPE_DMA_INDEX,4,2   ## @R600_RING_TYPE_DMA_INDEX
	.comm	_SDMA0,4,2                      ## @SDMA0
	.comm	_SDMA1,4,2                      ## @SDMA1
	.comm	_SDMA_OPCODE_POLL_REG_MEM,4,2   ## @SDMA_OPCODE_POLL_REG_MEM
	.comm	_GPU_HDP_FLUSH_DONE,4,2         ## @GPU_HDP_FLUSH_DONE
	.comm	_GPU_HDP_FLUSH_REQ,4,2          ## @GPU_HDP_FLUSH_REQ
	.no_dead_strip	_cik_sdma_hdp_flush_ring_emit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cik_sdma_hdp_flush_ring_emit
_cik_sdma_hdp_flush_ring_emit:          ; @cik_sdma_hdp_flush_ring_emit
	.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, x1
	ldr	x22, [x0]
	mov	w0, #1
	bl	_SDMA_POLL_REG_MEM_EXTRA_OP
	mov	x20, x0
	mov	w0, #3
	bl	_SDMA_POLL_REG_MEM_EXTRA_FUNC
Lloh0:
	adrp	x8, _R600_RING_TYPE_DMA_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R600_RING_TYPE_DMA_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SDMA0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SDMA0@GOTPAGEOFF]
Lloh5:
	adrp	x10, _SDMA1@GOTPAGE
Lloh6:
	ldr	x10, [x10, _SDMA1@GOTPAGEOFF]
	cmp	w8, w19
	csel	x8, x9, x10, eq
	ldr	w21, [x8]
	orr	w2, w0, w20
	add	x19, x22, w19, sxtw #2
Lloh7:
	adrp	x8, _SDMA_OPCODE_POLL_REG_MEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SDMA_OPCODE_POLL_REG_MEM@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_SDMA_PACKET
	mov	x1, x0
	mov	x0, x19
	bl	_radeon_ring_write
Lloh10:
	adrp	x8, _GPU_HDP_FLUSH_DONE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GPU_HDP_FLUSH_DONE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_radeon_ring_write
Lloh13:
	adrp	x8, _GPU_HDP_FLUSH_REQ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GPU_HDP_FLUSH_REQ@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_radeon_ring_write
	mov	x0, x19
	mov	x1, x21
	bl	_radeon_ring_write
	mov	x0, x19
	mov	x1, x21
	bl	_radeon_ring_write
	mov	x0, x19
	mov	w1, #10
	movk	w1, #4095, lsl #16
	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	_radeon_ring_write
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_R600_RING_TYPE_DMA_INDEX,4,2   ; @R600_RING_TYPE_DMA_INDEX
	.comm	_SDMA0,4,2                      ; @SDMA0
	.comm	_SDMA1,4,2                      ; @SDMA1
	.comm	_SDMA_OPCODE_POLL_REG_MEM,4,2   ; @SDMA_OPCODE_POLL_REG_MEM
	.comm	_GPU_HDP_FLUSH_DONE,4,2         ; @GPU_HDP_FLUSH_DONE
	.comm	_GPU_HDP_FLUSH_REQ,4,2          ; @GPU_HDP_FLUSH_REQ
	.no_dead_strip	_cik_sdma_hdp_flush_ring_emit
.subsections_via_symbols
