	.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	%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
	callq	_r600_pcie_gen2_enable
	cmpl	$0, 40(%r14)
	je	LBB0_3
## %bb.1:
	cmpl	$0, 36(%r14)
	je	LBB0_3
## %bb.2:
	cmpl	$0, 32(%r14)
	jne	LBB0_5
LBB0_3:
	movq	%r14, %rdi
	callq	_r600_init_microcode
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
LBB0_31:
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_32
LBB0_5:
	movq	%r14, %rdi
	callq	_r600_vram_scratch_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.6:
	movq	%r14, %rdi
	callq	_r600_mc_program
	movq	_RADEON_IS_AGP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_r600_agp_enable
LBB0_9:
	movq	%r14, %rdi
	callq	_r600_gpu_init
	movq	%r14, %rdi
	callq	_r600_blit_init
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_r600_blit_fini
	movq	24(%r14), %rax
	movq	$0, (%rax)
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_warn
LBB0_11:
	movq	%r14, %rdi
	callq	_radeon_wb_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.12:
	movq	_RADEON_RING_TYPE_GFX_INDEX@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	%r14, %rdi
	callq	_radeon_fence_driver_start_ring
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_14
LBB0_8:
	movq	%r14, %rdi
	callq	_r600_pcie_gart_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
	jmp	LBB0_9
LBB0_15:
	movq	_R600_RING_TYPE_DMA_INDEX@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	%r14, %rdi
	callq	_radeon_fence_driver_start_ring
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_14:
	movl	%ebx, %edx
	callq	_dev_err
LBB0_32:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	cmpl	$0, 16(%r14)
	je	LBB0_18
LBB0_19:
	movq	%r14, %rdi
	callq	_r600_irq_init
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	%r14, %rdi
	callq	_radeon_irq_kms_fini
	jmp	LBB0_32
LBB0_18:
	movq	%r14, %rdi
	callq	_radeon_irq_kms_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
	jmp	LBB0_19
LBB0_21:
	movq	%r14, %rdi
	callq	_r600_irq_set
	movq	8(%r14), %rax
	movq	(%r12), %rcx
	leaq	(%rax,%rcx,4), %rsi
	movl	(%rax,%rcx,4), %edx
	movq	_RADEON_WB_CP_RPTR_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_R600_CP_RB_RPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_R600_CP_RB_WPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_RADEON_CP_PACKET2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movq	%r14, %rdi
	pushq	%rax
	pushq	$1048575                        ## imm = 0xFFFFF
	pushq	$0
	callq	_radeon_ring_init
	addq	$32, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.22:
	movq	8(%r14), %rax
	movq	(%r15), %rcx
	leaq	(%rax,%rcx,4), %r12
	movl	(%rax,%rcx,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_R600_WB_DMA_RPTR_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_DMA_RB_RPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_DMA_RB_WPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_DMA_PACKET_NOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_DMA_PACKET
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	movl	%r15d, %r9d
	pushq	%rax
	pushq	$262140                         ## imm = 0x3FFFC
	pushq	$2
	callq	_radeon_ring_init
	addq	$32, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.23:
	movq	%r14, %rdi
	callq	_r600_cp_load_microcode
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.24:
	movq	%r14, %rdi
	callq	_r600_cp_resume
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.25:
	movq	%r14, %rdi
	callq	_r600_dma_resume
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.26:
	movq	%r14, %rdi
	callq	_radeon_ib_pool_init
	testl	%eax, %eax
	je	LBB0_28
## %bb.27:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_14
LBB0_28:
	movq	%r14, %rdi
	callq	_r600_audio_init
	testl	%eax, %eax
	je	LBB0_29
## %bb.30:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_31
LBB0_29:
	xorl	%ebx, %ebx
	jmp	LBB0_32
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to load firmware!\n"

	.comm	_RADEON_IS_AGP,4,2              ## @RADEON_IS_AGP
L_.str.1:                               ## @.str.1
	.asciz	"failed blitter (%d) falling back to memcpy\n"

	.comm	_RADEON_RING_TYPE_GFX_INDEX,8,3 ## @RADEON_RING_TYPE_GFX_INDEX
L_.str.2:                               ## @.str.2
	.asciz	"failed initializing CP fences (%d).\n"

	.comm	_R600_RING_TYPE_DMA_INDEX,8,3   ## @R600_RING_TYPE_DMA_INDEX
L_.str.3:                               ## @.str.3
	.asciz	"failed initializing DMA fences (%d).\n"

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

	.comm	_RADEON_WB_CP_RPTR_OFFSET,4,2   ## @RADEON_WB_CP_RPTR_OFFSET
	.comm	_R600_CP_RB_RPTR,4,2            ## @R600_CP_RB_RPTR
	.comm	_R600_CP_RB_WPTR,4,2            ## @R600_CP_RB_WPTR
	.comm	_RADEON_CP_PACKET2,4,2          ## @RADEON_CP_PACKET2
	.comm	_R600_WB_DMA_RPTR_OFFSET,4,2    ## @R600_WB_DMA_RPTR_OFFSET
	.comm	_DMA_RB_RPTR,4,2                ## @DMA_RB_RPTR
	.comm	_DMA_RB_WPTR,4,2                ## @DMA_RB_WPTR
	.comm	_DMA_PACKET_NOP,4,2             ## @DMA_PACKET_NOP
L_.str.5:                               ## @.str.5
	.asciz	"IB initialization failed (%d).\n"

L_.str.6:                               ## @.str.6
	.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, #80
	.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
	mov	x19, x0
	bl	_r600_pcie_gen2_enable
	ldr	w8, [x19, #40]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_3
; %bb.2:
	ldr	w8, [x19, #32]
	cbnz	w8, LBB0_6
LBB0_3:
	mov	x0, x19
	bl	_r600_init_microcode
	cbz	w0, LBB0_6
; %bb.4:
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
LBB0_5:
	bl	_DRM_ERROR
	b	LBB0_18
LBB0_6:
	mov	x0, x19
	bl	_r600_vram_scratch_init
	mov	x20, x0
	cbnz	w0, LBB0_18
; %bb.7:
	mov	x0, x19
	bl	_r600_mc_program
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _RADEON_IS_AGP@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RADEON_IS_AGP@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	mov	x0, x19
	tst	w9, w8
	b.eq	LBB0_14
; %bb.8:
	bl	_r600_agp_enable
LBB0_9:
	mov	x0, x19
	bl	_r600_gpu_init
	mov	x0, x19
	bl	_r600_blit_init
	cbz	w0, LBB0_11
; %bb.10:
	mov	x20, x0
	mov	x0, x19
	bl	_r600_blit_fini
	ldr	x8, [x19, #24]
	str	xzr, [x8]
	ldr	w0, [x19, #4]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_warn
LBB0_11:
	mov	x0, x19
	bl	_radeon_wb_init
	mov	x20, x0
	cbnz	w0, LBB0_18
; %bb.12:
Lloh7:
	adrp	x22, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGE
Lloh8:
	ldr	x22, [x22, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGEOFF]
	ldr	x1, [x22]
	mov	x0, x19
	bl	_radeon_fence_driver_start_ring
	cbz	w0, LBB0_15
; %bb.13:
	mov	x20, x0
	ldr	w0, [x19, #4]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_14:
	bl	_r600_pcie_gart_enable
	mov	x20, x0
	cbnz	w0, LBB0_18
	b	LBB0_9
LBB0_15:
Lloh11:
	adrp	x21, _R600_RING_TYPE_DMA_INDEX@GOTPAGE
Lloh12:
	ldr	x21, [x21, _R600_RING_TYPE_DMA_INDEX@GOTPAGEOFF]
	ldr	x1, [x21]
	mov	x0, x19
	bl	_radeon_fence_driver_start_ring
	cbz	w0, LBB0_19
; %bb.16:
	mov	x20, x0
	ldr	w0, [x19, #4]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_17:
	mov	x2, x20
	bl	_dev_err
LBB0_18:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_19:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_22
LBB0_20:
	mov	x0, x19
	bl	_r600_irq_init
	cbz	w0, LBB0_23
; %bb.21:
	mov	x20, x0
	str	x20, [sp]
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_ERROR
	mov	x0, x19
	bl	_radeon_irq_kms_fini
	b	LBB0_18
LBB0_22:
	mov	x0, x19
	bl	_radeon_irq_kms_init
	mov	x20, x0
	cbnz	w0, LBB0_18
	b	LBB0_20
LBB0_23:
	mov	x0, x19
	bl	_r600_irq_set
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x8, x9, lsl #2
	ldr	w2, [x1]
Lloh17:
	adrp	x8, _RADEON_WB_CP_RPTR_OFFSET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RADEON_WB_CP_RPTR_OFFSET@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
Lloh20:
	adrp	x8, _R600_CP_RB_RPTR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _R600_CP_RB_RPTR@GOTPAGEOFF]
Lloh22:
	ldr	w4, [x8]
Lloh23:
	adrp	x8, _R600_CP_RB_WPTR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _R600_CP_RB_WPTR@GOTPAGEOFF]
Lloh25:
	ldr	w5, [x8]
Lloh26:
	adrp	x8, _RADEON_CP_PACKET2@GOTPAGE
Lloh27:
	ldr	x8, [x8, _RADEON_CP_PACKET2@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x19
	mov	w6, #0
	mov	w7, #1048575
	bl	_radeon_ring_init
	mov	x20, x0
	cbnz	w0, LBB0_18
; %bb.24:
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x20, x8, x9, lsl #2
	ldr	w21, [x20]
Lloh29:
	adrp	x8, _R600_WB_DMA_RPTR_OFFSET@GOTPAGE
Lloh30:
	ldr	x8, [x8, _R600_WB_DMA_RPTR_OFFSET@GOTPAGEOFF]
Lloh31:
	ldr	w22, [x8]
Lloh32:
	adrp	x8, _DMA_RB_RPTR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _DMA_RB_RPTR@GOTPAGEOFF]
Lloh34:
	ldr	w23, [x8]
Lloh35:
	adrp	x8, _DMA_RB_WPTR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _DMA_RB_WPTR@GOTPAGEOFF]
Lloh37:
	ldr	w24, [x8]
Lloh38:
	adrp	x8, _DMA_PACKET_NOP@GOTPAGE
Lloh39:
	ldr	x8, [x8, _DMA_PACKET_NOP@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	bl	_DMA_PACKET
	str	w0, [sp]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	mov	w6, #2
	mov	w7, #262140
	bl	_radeon_ring_init
	mov	x20, x0
	cbnz	w0, LBB0_18
; %bb.25:
	mov	x0, x19
	bl	_r600_cp_load_microcode
	mov	x20, x0
	cbnz	w0, LBB0_18
; %bb.26:
	mov	x0, x19
	bl	_r600_cp_resume
	mov	x20, x0
	cbnz	w0, LBB0_18
; %bb.27:
	mov	x0, x19
	bl	_r600_dma_resume
	mov	x20, x0
	cbnz	w0, LBB0_18
; %bb.28:
	mov	x0, x19
	bl	_radeon_ib_pool_init
	cbz	w0, LBB0_30
; %bb.29:
	mov	x20, x0
	ldr	w0, [x19, #4]
Lloh41:
	adrp	x1, l_.str.5@PAGE
Lloh42:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_17
LBB0_30:
	mov	x0, x19
	bl	_r600_audio_init
	mov	x20, x0
	cbz	w0, LBB0_18
; %bb.31:
Lloh43:
	adrp	x0, l_.str.6@PAGE
Lloh44:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to load firmware!\n"

	.comm	_RADEON_IS_AGP,4,2              ; @RADEON_IS_AGP
l_.str.1:                               ; @.str.1
	.asciz	"failed blitter (%d) falling back to memcpy\n"

	.comm	_RADEON_RING_TYPE_GFX_INDEX,8,3 ; @RADEON_RING_TYPE_GFX_INDEX
l_.str.2:                               ; @.str.2
	.asciz	"failed initializing CP fences (%d).\n"

	.comm	_R600_RING_TYPE_DMA_INDEX,8,3   ; @R600_RING_TYPE_DMA_INDEX
l_.str.3:                               ; @.str.3
	.asciz	"failed initializing DMA fences (%d).\n"

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

	.comm	_RADEON_WB_CP_RPTR_OFFSET,4,2   ; @RADEON_WB_CP_RPTR_OFFSET
	.comm	_R600_CP_RB_RPTR,4,2            ; @R600_CP_RB_RPTR
	.comm	_R600_CP_RB_WPTR,4,2            ; @R600_CP_RB_WPTR
	.comm	_RADEON_CP_PACKET2,4,2          ; @RADEON_CP_PACKET2
	.comm	_R600_WB_DMA_RPTR_OFFSET,4,2    ; @R600_WB_DMA_RPTR_OFFSET
	.comm	_DMA_RB_RPTR,4,2                ; @DMA_RB_RPTR
	.comm	_DMA_RB_WPTR,4,2                ; @DMA_RB_WPTR
	.comm	_DMA_PACKET_NOP,4,2             ; @DMA_PACKET_NOP
l_.str.5:                               ; @.str.5
	.asciz	"IB initialization failed (%d).\n"

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

	.no_dead_strip	_r600_startup
.subsections_via_symbols
