	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_v4_0_page_stop
_sdma_v4_0_page_stop:                   ## @sdma_v4_0_page_stop
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 8(%rdi)
	jle	LBB0_6
## %bb.1:
	movq	%rdi, %r14
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_mmSDMA0_PAGE_RB_CNTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_RREG32_SDMA
	movq	_SDMA0_PAGE_RB_CNTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_RB_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_WREG32_SDMA
	movq	_mmSDMA0_PAGE_IB_CNTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_RREG32_SDMA
	movq	_SDMA0_PAGE_IB_CNTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_IB_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_WREG32_SDMA
	movl	$0, (%r13,%rbx,4)
	incq	%rbx
	movslq	8(%r14), %rax
	addq	$4, %r15
	cmpq	%rax, %rbx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %r13
	leaq	(%r15,%r13), %rax
	cmpq	(%r14), %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_amdgpu_ttm_set_buffer_funcs_status
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_5
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_MAX_SDMA_INSTANCES,4,2  ## @AMDGPU_MAX_SDMA_INSTANCES
	.comm	_mmSDMA0_PAGE_RB_CNTL,4,2       ## @mmSDMA0_PAGE_RB_CNTL
	.comm	_SDMA0_PAGE_RB_CNTL,4,2         ## @SDMA0_PAGE_RB_CNTL
	.comm	_RB_ENABLE,4,2                  ## @RB_ENABLE
	.comm	_mmSDMA0_PAGE_IB_CNTL,4,2       ## @mmSDMA0_PAGE_IB_CNTL
	.comm	_SDMA0_PAGE_IB_CNTL,4,2         ## @SDMA0_PAGE_IB_CNTL
	.comm	_IB_ENABLE,4,2                  ## @IB_ENABLE
	.no_dead_strip	_sdma_v4_0_page_stop
.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_stop
_sdma_v4_0_page_stop:                   ; @sdma_v4_0_page_stop
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0, #8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x21, #0
	mov	x20, #0
	mov	w26, #0
Lloh0:
	adrp	x22, _mmSDMA0_PAGE_RB_CNTL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _mmSDMA0_PAGE_RB_CNTL@GOTPAGEOFF]
Lloh2:
	adrp	x24, _RB_ENABLE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _RB_ENABLE@GOTPAGEOFF]
Lloh4:
	adrp	x25, _mmSDMA0_PAGE_IB_CNTL@GOTPAGE
Lloh5:
	ldr	x25, [x25, _mmSDMA0_PAGE_IB_CNTL@GOTPAGEOFF]
Lloh6:
	adrp	x27, _SDMA0_PAGE_IB_CNTL@GOTPAGE
Lloh7:
	ldr	x27, [x27, _SDMA0_PAGE_IB_CNTL@GOTPAGEOFF]
Lloh8:
	adrp	x28, _IB_ENABLE@GOTPAGE
Lloh9:
	ldr	x28, [x28, _IB_ENABLE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x22]
	mov	x0, x20
	bl	_RREG32_SDMA
Lloh10:
	adrp	x8, _SDMA0_PAGE_RB_CNTL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SDMA0_PAGE_RB_CNTL@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w2, [x24]
	mov	w3, #0
	bl	_REG_SET_FIELD
	mov	x2, x0
	ldr	w1, [x22]
	mov	x0, x20
	bl	_WREG32_SDMA
	ldr	w1, [x25]
	mov	x0, x20
	bl	_RREG32_SDMA
	ldr	w1, [x27]
	ldr	w2, [x28]
	mov	w3, #0
	bl	_REG_SET_FIELD
	mov	x2, x0
	ldr	w1, [x25]
	mov	x0, x20
	bl	_WREG32_SDMA
	str	wzr, [x23, x20, lsl #2]
	add	x20, x20, #1
	ldrsw	x8, [x19, #8]
	add	x21, x21, #4
	cmp	x20, x8
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x19, #16]
	ldr	x8, [x19]
	add	x9, x23, x21
	cmp	x9, x8
	ccmp	w26, #0, #0, eq
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	w1, #0
	bl	_amdgpu_ttm_set_buffer_funcs_status
	mov	w26, #1
	b	LBB0_2
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_MAX_SDMA_INSTANCES,4,2  ; @AMDGPU_MAX_SDMA_INSTANCES
	.comm	_mmSDMA0_PAGE_RB_CNTL,4,2       ; @mmSDMA0_PAGE_RB_CNTL
	.comm	_SDMA0_PAGE_RB_CNTL,4,2         ; @SDMA0_PAGE_RB_CNTL
	.comm	_RB_ENABLE,4,2                  ; @RB_ENABLE
	.comm	_mmSDMA0_PAGE_IB_CNTL,4,2       ; @mmSDMA0_PAGE_IB_CNTL
	.comm	_SDMA0_PAGE_IB_CNTL,4,2         ; @SDMA0_PAGE_IB_CNTL
	.comm	_IB_ENABLE,4,2                  ; @IB_ENABLE
	.no_dead_strip	_sdma_v4_0_page_stop
.subsections_via_symbols
