	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cayman_cp_start
_cayman_cp_start:                       ## @cayman_cp_start
	.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
	movq	%rdi, %r14
	movq	_RADEON_RING_TYPE_GFX_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	shlq	$2, %rbx
	addq	8(%rdi), %rbx
	movq	%rbx, %rsi
	movl	$7, %edx
	callq	_radeon_ring_lock
	testl	%eax, %eax
	jne	LBB0_1
## %bb.2:
	movq	_PACKET3_ME_INITIALIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$5, %esi
	callq	_PACKET3
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movl	(%r14), %esi
	decl	%esi
	movq	%rbx, %rdi
	callq	_radeon_ring_write
	movl	$1, %edi
	callq	_PACKET3_ME_INITIALIZE_DEVICE_ID
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_radeon_ring_unlock_commit
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_cayman_cp_enable
	movq	_cayman_default_size@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	addl	$19, %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_radeon_ring_lock
	testl	%eax, %eax
	je	LBB0_3
LBB0_1:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_PACKET3_PREAMBLE_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_PACKET3
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	_PACKET3_PREAMBLE_BEGIN_CLEAR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_radeon_ring_write
	cmpl	$0, (%r12)
	jle	LBB0_6
## %bb.4:
	xorl	%r13d, %r13d
	movq	_cayman_default_state@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax,%r13,4), %esi
	movq	%rbx, %rdi
	callq	_radeon_ring_write
	incq	%r13
	movslq	(%r12), %rax
	cmpq	%rax, %r13
	jl	LBB0_5
LBB0_6:
	movq	_PACKET3_PREAMBLE_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET3
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	_PACKET3_PREAMBLE_END_CLEAR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_radeon_ring_write
	movq	_PACKET3_CLEAR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET3
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	$-1073582336, %esi              ## imm = 0xC0026F00
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	$-1073516800, %esi              ## imm = 0xC0036F00
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	$3012, %esi                     ## imm = 0xBC4
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	$-1073583872, %esi              ## imm = 0xC0026900
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	$790, %esi                      ## imm = 0x316
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	$14, %esi
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_radeon_ring_write
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_radeon_ring_unlock_commit
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_RING_TYPE_GFX_INDEX,8,3 ## @RADEON_RING_TYPE_GFX_INDEX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"radeon: cp failed to lock ring (%d).\n"

	.comm	_PACKET3_ME_INITIALIZE,4,2      ## @PACKET3_ME_INITIALIZE
	.comm	_cayman_default_size,4,2        ## @cayman_default_size
	.comm	_PACKET3_PREAMBLE_CNTL,4,2      ## @PACKET3_PREAMBLE_CNTL
	.comm	_PACKET3_PREAMBLE_BEGIN_CLEAR_STATE,4,2 ## @PACKET3_PREAMBLE_BEGIN_CLEAR_STATE
	.comm	_cayman_default_state,8,3       ## @cayman_default_state
	.comm	_PACKET3_PREAMBLE_END_CLEAR_STATE,4,2 ## @PACKET3_PREAMBLE_END_CLEAR_STATE
	.comm	_PACKET3_CLEAR_STATE,4,2        ## @PACKET3_CLEAR_STATE
	.no_dead_strip	_cayman_cp_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cayman_cp_start
_cayman_cp_start:                       ; @cayman_cp_start
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x20, x8, x9, lsl #2
	mov	x1, x20
	mov	w2, #7
	bl	_radeon_ring_lock
	cbnz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _PACKET3_ME_INITIALIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PACKET3_ME_INITIALIZE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #5
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #1
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #0
	bl	_radeon_ring_write
	ldr	w8, [x19]
	sub	w1, w8, #1
	mov	x0, x20
	bl	_radeon_ring_write
	mov	w0, #1
	bl	_PACKET3_ME_INITIALIZE_DEVICE_ID
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #0
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #0
	bl	_radeon_ring_write
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_ring_unlock_commit
	mov	x0, x19
	mov	w1, #1
	bl	_cayman_cp_enable
Lloh6:
	adrp	x22, _cayman_default_size@GOTPAGE
Lloh7:
	ldr	x22, [x22, _cayman_default_size@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w2, w8, #19
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_ring_lock
	cbz	w0, LBB0_4
LBB0_2:
	mov	x21, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DRM_ERROR
LBB0_3:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh10:
	adrp	x21, _PACKET3_PREAMBLE_CNTL@GOTPAGE
Lloh11:
	ldr	x21, [x21, _PACKET3_PREAMBLE_CNTL@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w1, #0
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
Lloh12:
	adrp	x8, _PACKET3_PREAMBLE_BEGIN_CLEAR_STATE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PACKET3_PREAMBLE_BEGIN_CLEAR_STATE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_radeon_ring_write
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x23, #0
Lloh15:
	adrp	x24, _cayman_default_state@GOTPAGE
Lloh16:
	ldr	x24, [x24, _cayman_default_state@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	w1, [x8, x23, lsl #2]
	mov	x0, x20
	bl	_radeon_ring_write
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.lt	LBB0_6
LBB0_7:
	ldr	w0, [x21]
	mov	w1, #0
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
Lloh17:
	adrp	x8, _PACKET3_PREAMBLE_END_CLEAR_STATE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PACKET3_PREAMBLE_END_CLEAR_STATE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_radeon_ring_write
Lloh20:
	adrp	x8, _PACKET3_CLEAR_STATE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PACKET3_CLEAR_STATE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #0
	bl	_radeon_ring_write
	mov	w8, #26880
	movk	w8, #49154, lsl #16
	orr	w1, w8, #0x600
	mov	x0, x20
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #0
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #0
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #0
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #28416
	movk	w1, #49155, lsl #16
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #3012
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #-1
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #-1
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #-1
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #26880
	movk	w1, #49154, lsl #16
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #790
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #14
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #16
	bl	_radeon_ring_write
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_ring_unlock_commit
	mov	w21, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_RING_TYPE_GFX_INDEX,8,3 ; @RADEON_RING_TYPE_GFX_INDEX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"radeon: cp failed to lock ring (%d).\n"

	.comm	_PACKET3_ME_INITIALIZE,4,2      ; @PACKET3_ME_INITIALIZE
	.comm	_cayman_default_size,4,2        ; @cayman_default_size
	.comm	_PACKET3_PREAMBLE_CNTL,4,2      ; @PACKET3_PREAMBLE_CNTL
	.comm	_PACKET3_PREAMBLE_BEGIN_CLEAR_STATE,4,2 ; @PACKET3_PREAMBLE_BEGIN_CLEAR_STATE
	.comm	_cayman_default_state,8,3       ; @cayman_default_state
	.comm	_PACKET3_PREAMBLE_END_CLEAR_STATE,4,2 ; @PACKET3_PREAMBLE_END_CLEAR_STATE
	.comm	_PACKET3_CLEAR_STATE,4,2        ; @PACKET3_CLEAR_STATE
	.no_dead_strip	_cayman_cp_start
.subsections_via_symbols
