	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r600_startup
_r600_startup:                          ## @r600_startup
	.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, %r14
	callq	_r600_pcie_gen2_enable
	movq	%r14, %rdi
	callq	_r600_vram_scratch_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.1:
	movq	%r14, %rdi
	callq	_r600_mc_program
	movq	_RADEON_IS_AGP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_r600_agp_enable
LBB0_4:
	movq	%r14, %rdi
	callq	_r600_gpu_init
	movq	%r14, %rdi
	callq	_radeon_wb_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.5:
	movq	_RADEON_RING_TYPE_GFX_INDEX@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	%r14, %rdi
	callq	_radeon_fence_driver_start_ring
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
LBB0_7:
	movl	%ebx, %edx
	callq	_dev_err
	jmp	LBB0_20
LBB0_3:
	movq	%r14, %rdi
	callq	_r600_pcie_gart_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r14, %rdi
	callq	_r600_uvd_start
	cmpl	$0, 16(%r14)
	je	LBB0_9
LBB0_10:
	movq	%r14, %rdi
	callq	_r600_irq_init
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	%r14, %rdi
	callq	_radeon_irq_kms_fini
	jmp	LBB0_20
LBB0_9:
	movq	%r14, %rdi
	callq	_radeon_irq_kms_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
	jmp	LBB0_10
LBB0_12:
	movq	%r14, %rdi
	callq	_r600_irq_set
	movq	8(%r14), %rax
	movq	(%r15), %rcx
	leaq	(%rax,%rcx,4), %rsi
	movl	(%rax,%rcx,4), %edx
	movq	_RADEON_WB_CP_RPTR_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_RADEON_CP_PACKET2@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	callq	_radeon_ring_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.13:
	movq	%r14, %rdi
	callq	_r600_cp_load_microcode
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.14:
	movq	%r14, %rdi
	callq	_r600_cp_resume
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.15:
	movq	%r14, %rdi
	callq	_r600_uvd_resume
	movq	%r14, %rdi
	callq	_radeon_ib_pool_init
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_7
LBB0_17:
	movq	%r14, %rdi
	callq	_radeon_audio_init
	testl	%eax, %eax
	je	LBB0_18
## %bb.19:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_20
LBB0_18:
	xorl	%ebx, %ebx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_IS_AGP,4,2              ## @RADEON_IS_AGP
	.comm	_RADEON_RING_TYPE_GFX_INDEX,8,3 ## @RADEON_RING_TYPE_GFX_INDEX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed initializing CP fences (%d).\n"

L_.str.1:                               ## @.str.1
	.asciz	"radeon: IH init failed (%d).\n"

	.comm	_RADEON_WB_CP_RPTR_OFFSET,4,2   ## @RADEON_WB_CP_RPTR_OFFSET
	.comm	_RADEON_CP_PACKET2,4,2          ## @RADEON_CP_PACKET2
L_.str.2:                               ## @.str.2
	.asciz	"IB initialization failed (%d).\n"

L_.str.3:                               ## @.str.3
	.asciz	"radeon: audio init failed\n"

	.no_dead_strip	_r600_startup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r600_startup
_r600_startup:                          ; @r600_startup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_r600_pcie_gen2_enable
	mov	x0, x19
	bl	_r600_vram_scratch_init
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_r600_mc_program
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _RADEON_IS_AGP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RADEON_IS_AGP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	x0, x19
	tst	w9, w8
	b.eq	LBB0_7
; %bb.2:
	bl	_r600_agp_enable
LBB0_3:
	mov	x0, x19
	bl	_r600_gpu_init
	mov	x0, x19
	bl	_radeon_wb_init
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.4:
Lloh3:
	adrp	x21, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGE
Lloh4:
	ldr	x21, [x21, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGEOFF]
	ldr	x1, [x21]
	mov	x0, x19
	bl	_radeon_fence_driver_start_ring
	cbz	w0, LBB0_9
; %bb.5:
	mov	x20, x0
	ldr	w0, [x19, #4]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
LBB0_6:
	mov	x2, x20
	bl	_dev_err
	b	LBB0_8
LBB0_7:
	bl	_r600_pcie_gart_enable
	mov	x20, x0
	cbz	w0, LBB0_3
LBB0_8:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
LBB0_9:
	mov	x0, x19
	bl	_r600_uvd_start
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_12
LBB0_10:
	mov	x0, x19
	bl	_r600_irq_init
	cbz	w0, LBB0_13
; %bb.11:
	mov	x20, x0
	str	x20, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	mov	x0, x19
	bl	_radeon_irq_kms_fini
	b	LBB0_8
LBB0_12:
	mov	x0, x19
	bl	_radeon_irq_kms_init
	mov	x20, x0
	cbnz	w0, LBB0_8
	b	LBB0_10
LBB0_13:
	mov	x0, x19
	bl	_r600_irq_set
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x8, x9, lsl #2
	ldr	w2, [x1]
Lloh9:
	adrp	x8, _RADEON_WB_CP_RPTR_OFFSET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RADEON_WB_CP_RPTR_OFFSET@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x8, _RADEON_CP_PACKET2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RADEON_CP_PACKET2@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
	mov	x0, x19
	bl	_radeon_ring_init
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.14:
	mov	x0, x19
	bl	_r600_cp_load_microcode
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.15:
	mov	x0, x19
	bl	_r600_cp_resume
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.16:
	mov	x0, x19
	bl	_r600_uvd_resume
	mov	x0, x19
	bl	_radeon_ib_pool_init
	cbz	w0, LBB0_18
; %bb.17:
	mov	x20, x0
	ldr	w0, [x19, #4]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_18:
	mov	x0, x19
	bl	_radeon_audio_init
	mov	x20, x0
	cbz	w0, LBB0_8
; %bb.19:
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_IS_AGP,4,2              ; @RADEON_IS_AGP
	.comm	_RADEON_RING_TYPE_GFX_INDEX,8,3 ; @RADEON_RING_TYPE_GFX_INDEX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed initializing CP fences (%d).\n"

l_.str.1:                               ; @.str.1
	.asciz	"radeon: IH init failed (%d).\n"

	.comm	_RADEON_WB_CP_RPTR_OFFSET,4,2   ; @RADEON_WB_CP_RPTR_OFFSET
	.comm	_RADEON_CP_PACKET2,4,2          ; @RADEON_CP_PACKET2
l_.str.2:                               ; @.str.2
	.asciz	"IB initialization failed (%d).\n"

l_.str.3:                               ; @.str.3
	.asciz	"radeon: audio init failed\n"

	.no_dead_strip	_r600_startup
.subsections_via_symbols
