	.file	"extr_r100.c_r100_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Expecting combios for RS400/RS480 GPU\n"
	.align 8
.LC1:
	.string	"GPU reset failed ! (0xE40=0x%08X, 0x7C0=0x%08X)\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"Disabling GPU acceleration\n"
	.text
	.p2align 4
	.globl	r100_init
	.type	r100_init, @function
r100_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	r100_debugfs@PLT
	mov	rdi, rbx
	call	r100_vga_render_disable@PLT
	mov	rdi, rbx
	call	radeon_scratch_init@PLT
	mov	rdi, rbx
	call	radeon_surface_init@PLT
	mov	rdi, rbx
	call	r100_restore_sanity@PLT
	mov	rdi, rbx
	call	radeon_get_bios@PLT
	test	eax, eax
	je	.L31
	cmp	QWORD PTR 16[rbx], 0
	jne	.L32
.L4:
	mov	rdi, rbx
	call	radeon_combios_init@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L33
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	mov	rdi, rbx
	call	radeon_asic_reset@PLT
	test	rax, rax
	jne	.L34
.L5:
	mov	rdi, rbx
	call	radeon_boot_test_post_card@PLT
	test	eax, eax
	jne	.L6
.L28:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L35:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	mov	rdi, rbx
	call	ASIC_IS_AVIVO@PLT
	test	rax, rax
	jne	.L28
	cmp	QWORD PTR 16[rbx], 0
	je	.L4
.L32:
	mov	edi, DWORD PTR 8[rbx]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, rbx
	call	r100_errata@PLT
	mov	edi, DWORD PTR 12[rbx]
	call	radeon_get_clock_info@PLT
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR RADEON_IS_AGP[rip], eax
	jne	.L36
.L8:
	mov	rdi, rbx
	call	r100_mc_init@PLT
	mov	rdi, rbx
	call	radeon_fence_driver_init@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	rdi, rbx
	call	radeon_bo_init@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR RADEON_IS_PCI[rip], eax
	je	.L12
	mov	rdi, rbx
	call	r100_pci_gart_init@PLT
	test	eax, eax
	jne	.L37
.L12:
	mov	rdi, rbx
	call	r100_set_safe_registers@PLT
	mov	DWORD PTR 4[rbx], 1
	mov	rdi, rbx
	call	r100_startup@PLT
	test	eax, eax
	jne	.L11
	xor	r12d, r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	mov	edi, DWORD PTR R_0007C0_CP_STAT[rip]
	call	RREG32@PLT
	mov	edi, DWORD PTR R_000E40_RBBM_STATUS[rip]
	mov	r12d, eax
	call	RREG32@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	ecx, r12d
	lea	rsi, .LC1[rip]
	mov	edx, eax
	call	dev_warn@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L36:
	mov	rdi, rbx
	call	radeon_agp_init@PLT
	test	eax, eax
	je	.L8
	mov	rdi, rbx
	call	radeon_agp_disable@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edi, DWORD PTR 8[rbx]
	lea	rsi, .LC2[rip]
	call	dev_err@PLT
	mov	rdi, rbx
	call	r100_cp_fini@PLT
	mov	rdi, rbx
	call	radeon_wb_fini@PLT
	mov	rdi, rbx
	call	radeon_ib_pool_fini@PLT
	mov	rdi, rbx
	call	radeon_irq_kms_fini@PLT
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR RADEON_IS_PCI[rip], eax
	jne	.L38
.L13:
	mov	DWORD PTR 4[rbx], 0
	jmp	.L1
.L37:
	mov	r12d, eax
	jmp	.L1
.L38:
	mov	rdi, rbx
	call	r100_pci_gart_fini@PLT
	jmp	.L13
	.cfi_endproc
.LFE0:
	.size	r100_init, .-r100_init
	.comm	R_000E40_RBBM_STATUS,4,4
	.comm	R_0007C0_CP_STAT,4,4
	.comm	RADEON_IS_PCI,4,4
	.comm	RADEON_IS_AGP,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_r100.c_r100_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Expecting combios for RS400/RS480 GPU\012\000"
	.align	2
.LC1:
	.ascii	"GPU reset failed ! (0xE40=0x%08X, 0x7C0=0x%08X)\012"
	.ascii	"\000"
	.align	2
.LC2:
	.ascii	"Disabling GPU acceleration\012\000"
	.text
	.align	2
	.global	r100_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	r100_init, %function
r100_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	r100_debugfs
	mov	r0, r4
	bl	r100_vga_render_disable
	mov	r0, r4
	bl	radeon_scratch_init
	mov	r0, r4
	bl	radeon_surface_init
	mov	r0, r4
	bl	r100_restore_sanity
	mov	r0, r4
	bl	radeon_get_bios
	cmp	r0, #0
	beq	.L31
	ldr	r3, [r4, #16]
	cmp	r3, #0
	bne	.L32
.L4:
	mov	r0, r4
	bl	radeon_combios_init
	subs	r5, r0, #0
	beq	.L33
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L33:
	mov	r0, r4
	bl	radeon_asic_reset
	cmp	r0, #0
	bne	.L34
.L5:
	mov	r0, r4
	bl	radeon_boot_test_post_card
	cmp	r0, #0
	bne	.L6
.L28:
	ldr	r3, .L38
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L35:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L31:
	mov	r0, r4
	bl	ASIC_IS_AVIVO
	cmp	r0, #0
	bne	.L28
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L4
.L32:
	ldr	r0, [r4, #8]
	ldr	r1, .L38+4
	bl	dev_err
	ldr	r3, .L38
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L35
.L6:
	mov	r0, r4
	bl	r100_errata
	ldr	r0, [r4, #12]
	bl	radeon_get_clock_info
	ldr	r3, .L38+8
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L36
.L8:
	mov	r0, r4
	bl	r100_mc_init
	mov	r0, r4
	bl	radeon_fence_driver_init
	subs	r5, r0, #0
	bne	.L1
	mov	r0, r4
	bl	radeon_bo_init
	subs	r5, r0, #0
	bne	.L1
	ldr	r6, .L38+12
	ldr	r2, [r4]
	ldr	r3, [r6]
	tst	r2, r3
	beq	.L12
	mov	r0, r4
	bl	r100_pci_gart_init
	cmp	r0, #0
	bne	.L14
.L12:
	mov	r0, r4
	bl	r100_set_safe_registers
	mov	r3, #1
	mov	r0, r4
	str	r3, [r4, #4]
	bl	r100_startup
	cmp	r0, #0
	bne	.L11
.L14:
	mov	r5, r0
	b	.L1
.L34:
	ldr	r3, .L38+16
	ldr	r6, [r4, #8]
	ldr	r0, [r3]
	bl	RREG32
	ldr	r3, .L38+20
	mov	r5, r0
	ldr	r0, [r3]
	bl	RREG32
	mov	r2, r5
	mov	r3, r0
	ldr	r1, .L38+24
	mov	r0, r6
	bl	dev_warn
	b	.L5
.L36:
	mov	r0, r4
	bl	radeon_agp_init
	cmp	r0, #0
	beq	.L8
	mov	r0, r4
	bl	radeon_agp_disable
	b	.L8
.L11:
	ldr	r1, .L38+28
	ldr	r0, [r4, #8]
	bl	dev_err
	mov	r0, r4
	bl	r100_cp_fini
	mov	r0, r4
	bl	radeon_wb_fini
	mov	r0, r4
	bl	radeon_ib_pool_fini
	mov	r0, r4
	bl	radeon_irq_kms_fini
	ldr	r3, [r6]
	ldr	r2, [r4]
	tst	r2, r3
	bne	.L37
.L13:
	mov	r3, #0
	str	r3, [r4, #4]
	b	.L1
.L37:
	mov	r0, r4
	bl	r100_pci_gart_fini
	b	.L13
.L39:
	.align	2
.L38:
	.word	EINVAL
	.word	.LC0
	.word	RADEON_IS_AGP
	.word	RADEON_IS_PCI
	.word	R_000E40_RBBM_STATUS
	.word	R_0007C0_CP_STAT
	.word	.LC1
	.word	.LC2
	.size	r100_init, .-r100_init
	.comm	R_000E40_RBBM_STATUS,4,4
	.comm	R_0007C0_CP_STAT,4,4
	.comm	RADEON_IS_PCI,4,4
	.comm	RADEON_IS_AGP,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
