	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rs690_init                     ## -- Begin function rs690_init
	.p2align	4, 0x90
_rs690_init:                            ## @rs690_init
	.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
	callq	_rv515_vga_render_disable
	movq	%rbx, %rdi
	callq	_radeon_scratch_init
	movq	%rbx, %rdi
	callq	_radeon_surface_init
	movq	%rbx, %rdi
	callq	_r100_restore_sanity
	movq	%rbx, %rdi
	callq	_radeon_get_bios
	testl	%eax, %eax
	je	LBB0_1
LBB0_3:
	cmpq	$0, 16(%rbx)
	je	LBB0_14
## %bb.4:
	movq	%rbx, %rdi
	callq	_radeon_atombios_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.5:
	movq	%rbx, %rdi
	callq	_radeon_asic_reset
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	4(%rbx), %r14d
	movq	_R_000E40_RBBM_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movl	%eax, %r15d
	movq	_R_0007C0_CP_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_dev_warn
LBB0_7:
	movq	%rbx, %rdi
	callq	_radeon_boot_test_post_card
	testl	%eax, %eax
	je	LBB0_2
## %bb.8:
	movl	8(%rbx), %edi
	callq	_radeon_get_clock_info
	movq	%rbx, %rdi
	callq	_rs690_mc_init
	movq	%rbx, %rdi
	callq	_rv515_debugfs
	movq	%rbx, %rdi
	callq	_radeon_fence_driver_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:
	movq	%rbx, %rdi
	callq	_radeon_bo_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	movq	%rbx, %rdi
	callq	_rs400_gart_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movq	%rbx, %rdi
	callq	_rs600_set_safe_registers
	movq	%rbx, %rdi
	callq	_radeon_pm_init
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	callq	_rs690_startup
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	4(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_r100_cp_fini
	movq	%rbx, %rdi
	callq	_radeon_wb_fini
	movq	%rbx, %rdi
	callq	_radeon_ib_pool_fini
	movq	%rbx, %rdi
	callq	_rs400_gart_fini
	movq	%rbx, %rdi
	callq	_radeon_irq_kms_fini
	movl	$0, (%rbx)
	jmp	LBB0_13
LBB0_1:
	movq	%rbx, %rdi
	callq	_ASIC_IS_AVIVO
	testq	%rax, %rax
	jne	LBB0_2
	jmp	LBB0_3
LBB0_14:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Expecting atombios for RV515 GPU\n"

L_.str.1:                               ## @.str.1
	.asciz	"GPU reset failed ! (0xE40=0x%08X, 0x7C0=0x%08X)\n"

	.comm	_R_000E40_RBBM_STATUS,4,2       ## @R_000E40_RBBM_STATUS
	.comm	_R_0007C0_CP_STAT,4,2           ## @R_0007C0_CP_STAT
L_.str.2:                               ## @.str.2
	.asciz	"Disabling GPU acceleration\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rs690_init                     ; -- Begin function rs690_init
	.p2align	2
_rs690_init:                            ; @rs690_init
	.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
	mov	x19, x0
	bl	_rv515_vga_render_disable
	mov	x0, x19
	bl	_radeon_scratch_init
	mov	x0, x19
	bl	_radeon_surface_init
	mov	x0, x19
	bl	_r100_restore_sanity
	mov	x0, x19
	bl	_radeon_get_bios
	cbz	w0, LBB0_11
LBB0_1:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_12
; %bb.2:
	mov	x0, x19
	bl	_radeon_atombios_init
	cbnz	w0, LBB0_14
; %bb.3:
	mov	x0, x19
	bl	_radeon_asic_reset
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w20, [x19, #4]
Lloh0:
	adrp	x8, _R_000E40_RBBM_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R_000E40_RBBM_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_RREG32
	mov	x21, x0
Lloh3:
	adrp	x8, _R_0007C0_CP_STAT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _R_0007C0_CP_STAT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_RREG32
	mov	x3, x0
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_warn
LBB0_5:
	mov	x0, x19
	bl	_radeon_boot_test_post_card
	cbz	w0, LBB0_13
; %bb.6:
	ldr	w0, [x19, #8]
	bl	_radeon_get_clock_info
	mov	x0, x19
	bl	_rs690_mc_init
	mov	x0, x19
	bl	_rv515_debugfs
	mov	x0, x19
	bl	_radeon_fence_driver_init
	cbnz	w0, LBB0_14
; %bb.7:
	mov	x0, x19
	bl	_radeon_bo_init
	cbnz	w0, LBB0_14
; %bb.8:
	mov	x0, x19
	bl	_rs400_gart_init
	cbnz	w0, LBB0_14
; %bb.9:
	mov	x0, x19
	bl	_rs600_set_safe_registers
	mov	x0, x19
	bl	_radeon_pm_init
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_rs690_startup
	cbz	w0, LBB0_14
; %bb.10:
	ldr	w0, [x19, #4]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_r100_cp_fini
	mov	x0, x19
	bl	_radeon_wb_fini
	mov	x0, x19
	bl	_radeon_ib_pool_fini
	mov	x0, x19
	bl	_rs400_gart_fini
	mov	x0, x19
	bl	_radeon_irq_kms_fini
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_14
LBB0_11:
	mov	x0, x19
	bl	_ASIC_IS_AVIVO
	cbnz	x0, LBB0_13
	b	LBB0_1
LBB0_12:
	ldr	w0, [x19, #4]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_13:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Expecting atombios for RV515 GPU\n"

l_.str.1:                               ; @.str.1
	.asciz	"GPU reset failed ! (0xE40=0x%08X, 0x7C0=0x%08X)\n"

	.comm	_R_000E40_RBBM_STATUS,4,2       ; @R_000E40_RBBM_STATUS
	.comm	_R_0007C0_CP_STAT,4,2           ; @R_0007C0_CP_STAT
l_.str.2:                               ; @.str.2
	.asciz	"Disabling GPU acceleration\n"

.subsections_via_symbols
