	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_do_resume_cp
_radeon_do_resume_cp:                   ## @radeon_do_resume_cp
	.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
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_radeon_set_pcigart
	movq	%rbx, %rdi
	callq	_radeon_cp_load_microcode
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_radeon_cp_init_ring_buffer
	movq	$0, 8(%rbx)
	movq	%r14, %rdi
	callq	_radeon_do_engine_reset
	movq	_RADEON_SW_INT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_radeon_irq_set_state
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_DEBUG
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Called with no initialization\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Starting radeon_do_resume_cp()\n"

	.comm	_RADEON_SW_INT_ENABLE,4,2       ## @RADEON_SW_INT_ENABLE
L_.str.2:                               ## @.str.2
	.asciz	"radeon_do_resume_cp() complete\n"

	.comm	_RADEON_IS_AGP,4,2              ## @RADEON_IS_AGP
	.no_dead_strip	_radeon_do_resume_cp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_do_resume_cp
_radeon_do_resume_cp:                   ; @radeon_do_resume_cp
	.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
	ldr	x20, [x0]
	cbz	x20, LBB0_2
; %bb.1:
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG
	mov	x0, x20
	mov	w1, #1
	bl	_radeon_set_pcigart
	mov	x0, x20
	bl	_radeon_cp_load_microcode
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_radeon_cp_init_ring_buffer
	str	xzr, [x20, #8]
	mov	x0, x19
	bl	_radeon_do_engine_reset
Lloh2:
	adrp	x8, _RADEON_SW_INT_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RADEON_SW_INT_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_radeon_irq_set_state
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Called with no initialization\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Starting radeon_do_resume_cp()\n"

	.comm	_RADEON_SW_INT_ENABLE,4,2       ; @RADEON_SW_INT_ENABLE
l_.str.2:                               ; @.str.2
	.asciz	"radeon_do_resume_cp() complete\n"

	.comm	_RADEON_IS_AGP,4,2              ; @RADEON_IS_AGP
	.no_dead_strip	_radeon_do_resume_cp
.subsections_via_symbols
