	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rs690_startup
_rs690_startup:                         ## @rs690_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_rs690_mc_program
	movq	%rbx, %rdi
	callq	_rv515_clock_startup
	movq	%rbx, %rdi
	callq	_rs690_gpu_init
	movq	%rbx, %rdi
	callq	_rs400_gart_enable
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.1:
	movq	%rbx, %rdi
	callq	_radeon_wb_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.2:
	movq	_RADEON_RING_TYPE_GFX_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_radeon_fence_driver_start_ring
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_5:
	cmpl	$0, 8(%rbx)
	je	LBB0_6
LBB0_7:
	movq	%rbx, %rdi
	callq	_rs600_irq_set
	movq	_RADEON_HOST_PATH_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	movl	$1048576, %esi                  ## imm = 0x100000
	callq	_r100_cp_init
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_6:
	movq	%rbx, %rdi
	callq	_radeon_irq_kms_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_7
LBB0_9:
	movq	%rbx, %rdi
	callq	_radeon_ib_pool_init
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_4:
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_14:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	movq	%rbx, %rdi
	callq	_radeon_audio_init
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_12:
	xorl	%r14d, %r14d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_RING_TYPE_GFX_INDEX,4,2 ## @RADEON_RING_TYPE_GFX_INDEX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed initializing CP fences (%d).\n"

	.comm	_RADEON_HOST_PATH_CNTL,4,2      ## @RADEON_HOST_PATH_CNTL
L_.str.1:                               ## @.str.1
	.asciz	"failed initializing CP (%d).\n"

L_.str.2:                               ## @.str.2
	.asciz	"IB initialization failed (%d).\n"

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

	.no_dead_strip	_rs690_startup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rs690_startup
_rs690_startup:                         ; @rs690_startup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	bl	_rs690_mc_program
	mov	x0, x19
	bl	_rv515_clock_startup
	mov	x0, x19
	bl	_rs690_gpu_init
	mov	x0, x19
	bl	_rs400_gart_enable
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.1:
	mov	x0, x19
	bl	_radeon_wb_init
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.2:
Lloh0:
	adrp	x8, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_radeon_fence_driver_start_ring
	cbz	w0, LBB0_5
; %bb.3:
	mov	x20, x0
	ldr	w0, [x19]
	str	x20, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	bl	_dev_err
	b	LBB0_12
LBB0_5:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_rs600_irq_set
Lloh5:
	adrp	x8, _RADEON_HOST_PATH_CNTL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RADEON_HOST_PATH_CNTL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_RREG32
	str	w0, [x19, #4]
	mov	x0, x19
	mov	w1, #1048576
	bl	_r100_cp_init
	cbz	w0, LBB0_9
; %bb.7:
	mov	x20, x0
	ldr	w0, [x19]
	str	x20, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_8:
	mov	x0, x19
	bl	_radeon_irq_kms_init
	mov	x20, x0
	cbnz	w0, LBB0_12
	b	LBB0_6
LBB0_9:
	mov	x0, x19
	bl	_radeon_ib_pool_init
	cbz	w0, LBB0_13
; %bb.10:
	mov	x20, x0
	ldr	w0, [x19]
	str	x20, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_11:
	bl	_dev_err
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_13:
	mov	x0, x19
	bl	_radeon_audio_init
	mov	x20, x0
	cbz	w0, LBB0_12
; %bb.14:
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_RING_TYPE_GFX_INDEX,4,2 ; @RADEON_RING_TYPE_GFX_INDEX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed initializing CP fences (%d).\n"

	.comm	_RADEON_HOST_PATH_CNTL,4,2      ; @RADEON_HOST_PATH_CNTL
l_.str.1:                               ; @.str.1
	.asciz	"failed initializing CP (%d).\n"

l_.str.2:                               ; @.str.2
	.asciz	"IB initialization failed (%d).\n"

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

	.no_dead_strip	_rs690_startup
.subsections_via_symbols
