	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si_cp_start
_si_cp_start:                           ## @si_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, %rbx
	movq	_RADEON_RING_TYPE_GFX_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	shlq	$2, %r15
	addq	(%rdi), %r15
	movq	%r15, %rsi
	movl	$11, %edx
	callq	_radeon_ring_lock
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movq	_PACKET3_ME_INITIALIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$5, %esi
	callq	_PACKET3
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_radeon_ring_write
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movl	8(%rbx), %esi
	decl	%esi
	movq	%r15, %rdi
	callq	_radeon_ring_write
	movl	$1, %edi
	callq	_PACKET3_ME_INITIALIZE_DEVICE_ID
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movq	_PACKET3_SET_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_PACKET3
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	_CE_PARTITION_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PACKET3_BASE_INDEX
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	%r15, %rdi
	movl	$49152, %esi                    ## imm = 0xC000
	callq	_radeon_ring_write
	movq	%r15, %rdi
	movl	$57344, %esi                    ## imm = 0xE000
	callq	_radeon_ring_write
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_radeon_ring_unlock_commit
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_si_cp_enable
	movq	_si_default_size@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	addl	$10, %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_radeon_ring_lock
	testl	%eax, %eax
	je	LBB0_2
LBB0_8:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%eax, %r12d
	callq	_DRM_ERROR
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_PACKET3_PREAMBLE_CNTL@GOTPCREL(%rip), %rax
	movq	%rax, %r12
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET3
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	_PACKET3_PREAMBLE_BEGIN_CLEAR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_radeon_ring_write
	cmpl	$0, (%r14)
	jle	LBB0_5
## %bb.3:
	xorl	%r13d, %r13d
	movq	_si_default_state@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movl	(%rax,%r13,4), %esi
	movq	%r15, %rdi
	callq	_radeon_ring_write
	incq	%r13
	movslq	(%r14), %rax
	cmpq	%rax, %r13
	jl	LBB0_4
LBB0_5:
	movl	(%r12), %edi
	xorl	%esi, %esi
	callq	_PACKET3
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	_PACKET3_PREAMBLE_END_CLEAR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_radeon_ring_write
	movq	_PACKET3_CLEAR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET3
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movq	_PACKET3_SET_CONTEXT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_PACKET3
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	%r15, %rdi
	movl	$790, %esi                      ## imm = 0x316
	callq	_radeon_ring_write
	movq	%r15, %rdi
	movl	$14, %esi
	callq	_radeon_ring_write
	movq	%r15, %rdi
	movl	$16, %esi
	callq	_radeon_ring_write
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_radeon_ring_unlock_commit
	movq	_RADEON_RING_TYPE_GFX_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CAYMAN_RING_TYPE_CP2_INDEX@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	movl	$0, %r12d
	jl	LBB0_9
## %bb.6:
	movslq	%eax, %r13
	leaq	-1(%r13), %r15
	shlq	$2, %r13
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rbx
	addq	%r13, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$2, %edx
	callq	_radeon_ring_lock
	movq	_PACKET3_CLEAR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET3_COMPUTE
	movq	%rbx, %rdi
	movl	%eax, %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	_CAYMAN_RING_TYPE_CP2_INDEX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	incq	%r15
	addq	$4, %r13
	cmpq	%rax, %r15
	jl	LBB0_7
	jmp	LBB0_9
	.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	_PACKET3_SET_BASE,4,2           ## @PACKET3_SET_BASE
	.comm	_CE_PARTITION_BASE,4,2          ## @CE_PARTITION_BASE
	.comm	_si_default_size,4,2            ## @si_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	_si_default_state,8,3           ## @si_default_state
	.comm	_PACKET3_PREAMBLE_END_CLEAR_STATE,4,2 ## @PACKET3_PREAMBLE_END_CLEAR_STATE
	.comm	_PACKET3_CLEAR_STATE,4,2        ## @PACKET3_CLEAR_STATE
	.comm	_PACKET3_SET_CONTEXT_REG,4,2    ## @PACKET3_SET_CONTEXT_REG
	.comm	_CAYMAN_RING_TYPE_CP2_INDEX,4,2 ## @CAYMAN_RING_TYPE_CP2_INDEX
	.no_dead_strip	_si_cp_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si_cp_start
_si_cp_start:                           ; @si_cp_start
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x22, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x20, x8, x9, lsl #2
	mov	x1, x20
	mov	w2, #11
	bl	_radeon_ring_lock
	mov	x21, x0
	cbnz	w0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _PACKET3_ME_INITIALIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PACKET3_ME_INITIALIZE@GOTPAGEOFF]
Lloh4:
	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, #8]
	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
Lloh5:
	adrp	x8, _PACKET3_SET_BASE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PACKET3_SET_BASE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	w1, #2
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
Lloh8:
	adrp	x8, _CE_PARTITION_BASE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CE_PARTITION_BASE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_PACKET3_BASE_INDEX
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #49152
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #57344
	bl	_radeon_ring_write
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_ring_unlock_commit
	mov	x0, x19
	mov	w1, #1
	bl	_si_cp_enable
Lloh11:
	adrp	x23, _si_default_size@GOTPAGE
Lloh12:
	ldr	x23, [x23, _si_default_size@GOTPAGEOFF]
	ldr	w8, [x23]
	add	w2, w8, #10
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_ring_lock
	mov	x21, x0
	cbz	w0, LBB0_4
LBB0_2:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DRM_ERROR
LBB0_3:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh15:
	adrp	x21, _PACKET3_PREAMBLE_CNTL@GOTPAGE
Lloh16:
	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
Lloh17:
	adrp	x8, _PACKET3_PREAMBLE_BEGIN_CLEAR_STATE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PACKET3_PREAMBLE_BEGIN_CLEAR_STATE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_radeon_ring_write
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x24, #0
Lloh20:
	adrp	x25, _si_default_state@GOTPAGE
Lloh21:
	ldr	x25, [x25, _si_default_state@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	ldr	w1, [x8, x24, lsl #2]
	mov	x0, x20
	bl	_radeon_ring_write
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, 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
Lloh22:
	adrp	x8, _PACKET3_PREAMBLE_END_CLEAR_STATE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PACKET3_PREAMBLE_END_CLEAR_STATE@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_radeon_ring_write
Lloh25:
	adrp	x23, _PACKET3_CLEAR_STATE@GOTPAGE
Lloh26:
	ldr	x23, [x23, _PACKET3_CLEAR_STATE@GOTPAGEOFF]
	ldr	w0, [x23]
	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
Lloh27:
	adrp	x8, _PACKET3_SET_CONTEXT_REG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PACKET3_SET_CONTEXT_REG@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	mov	w1, #2
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x20
	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
	ldr	x8, [x22]
Lloh30:
	adrp	x22, _CAYMAN_RING_TYPE_CP2_INDEX@GOTPAGE
Lloh31:
	ldr	x22, [x22, _CAYMAN_RING_TYPE_CP2_INDEX@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w9, w8
	b.lt	LBB0_3
; %bb.8:
	sxtw	x8, w8
	sub	x21, x8, #1
	lsl	x24, x8, #2
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x20, x8, x24
	mov	x0, x19
	mov	x1, x20
	mov	w2, #2
	bl	_radeon_ring_lock
	ldr	w0, [x23]
	mov	w1, #0
	bl	_PACKET3_COMPUTE
	mov	x1, x0
	mov	x0, x20
	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
	ldrsw	x8, [x22]
	add	x21, x21, #1
	add	x24, x24, #4
	cmp	x21, x8
	b.lt	LBB0_9
; %bb.10:
	mov	w21, #0
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.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	_PACKET3_SET_BASE,4,2           ; @PACKET3_SET_BASE
	.comm	_CE_PARTITION_BASE,4,2          ; @CE_PARTITION_BASE
	.comm	_si_default_size,4,2            ; @si_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	_si_default_state,8,3           ; @si_default_state
	.comm	_PACKET3_PREAMBLE_END_CLEAR_STATE,4,2 ; @PACKET3_PREAMBLE_END_CLEAR_STATE
	.comm	_PACKET3_CLEAR_STATE,4,2        ; @PACKET3_CLEAR_STATE
	.comm	_PACKET3_SET_CONTEXT_REG,4,2    ; @PACKET3_SET_CONTEXT_REG
	.comm	_CAYMAN_RING_TYPE_CP2_INDEX,4,2 ; @CAYMAN_RING_TYPE_CP2_INDEX
	.no_dead_strip	_si_cp_start
.subsections_via_symbols
