	.file	"extr_radeon_kms.c_radeon_driver_open_kms.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	radeon_driver_open_kms
	.type	radeon_driver_open_kms, @function
radeon_driver_open_kms:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR [rdi]
	mov	rax, QWORD PTR CHIP_CAYMAN[rip]
	mov	QWORD PTR [rsi], 0
	cmp	QWORD PTR 0[rbp], rax
	jge	.L8
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	rbx, rsi
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 4
	call	kzalloc@PLT
	xor	edi, edi
	test	rax, rax
	mov	r13, rax
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	je	.L3
	mov	r12d, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	rsi, r13
	mov	rdi, rbp
	call	radeon_vm_init@PLT
	mov	edx, DWORD PTR 8[rbp]
	mov	rsi, r13
	mov	rdi, rbp
	call	radeon_vm_bo_add@PLT
	mov	edx, DWORD PTR RADEON_VA_IB_OFFSET[rip]
	mov	ecx, DWORD PTR RADEON_VM_PAGE_READABLE[rip]
	mov	rdi, rbp
	mov	rsi, rax
	or	ecx, DWORD PTR RADEON_VM_PAGE_SNOOPED[rip]
	call	radeon_vm_bo_set_addr@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L9
	mov	QWORD PTR [rbx], r13
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdi, rbp
	mov	rsi, r13
	call	radeon_vm_fini@PLT
	mov	rdi, r13
	call	kfree@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	radeon_driver_open_kms, .-radeon_driver_open_kms
	.comm	RADEON_VM_PAGE_SNOOPED,4,4
	.comm	RADEON_VM_PAGE_READABLE,4,4
	.comm	RADEON_VA_IB_OFFSET,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	CHIP_CAYMAN,8,8
	.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_radeon_kms.c_radeon_driver_open_kms.c"
	.text
	.align	2
	.global	radeon_driver_open_kms
	.syntax unified
	.arm
	.fpu softvfp
	.type	radeon_driver_open_kms, %function
radeon_driver_open_kms:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r3, #0
	mov	r4, r1
	ldr	r5, [r0]
	ldr	r2, .L9
	ldr	r1, [r5]
	ldr	r2, [r2]
	sub	sp, sp, #8
	cmp	r1, r2
	str	r3, [r4]
	bge	.L8
.L1:
	mov	r0, r3
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L8:
	ldr	r3, .L9+4
	mov	r0, #4
	ldr	r1, [r3]
	bl	kzalloc
	mov	r6, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	unlikely
	cmp	r0, #0
	beq	.L3
	ldr	r3, .L9+8
	ldr	r3, [r3]
	rsb	r3, r3, #0
	mov	r0, r3
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L3:
	mov	r1, r6
	mov	r0, r5
	bl	radeon_vm_init
	mov	r1, r6
	ldr	r2, [r5, #4]
	mov	r0, r5
	bl	radeon_vm_bo_add
	ldr	r2, .L9+12
	ldr	r3, .L9+16
	ldr	ip, [r2]
	ldr	r3, [r3]
	ldr	r2, .L9+20
	mov	r1, r0
	orr	r3, ip, r3
	mov	r0, r5
	ldr	r2, [r2]
	bl	radeon_vm_bo_set_addr
	subs	r3, r0, #0
	streq	r6, [r4]
	beq	.L1
	mov	r1, r6
	mov	r0, r5
	str	r3, [sp, #4]
	bl	radeon_vm_fini
	mov	r0, r6
	bl	kfree
	ldr	r3, [sp, #4]
	b	.L1
.L10:
	.align	2
.L9:
	.word	CHIP_CAYMAN
	.word	GFP_KERNEL
	.word	ENOMEM
	.word	RADEON_VM_PAGE_READABLE
	.word	RADEON_VM_PAGE_SNOOPED
	.word	RADEON_VA_IB_OFFSET
	.size	radeon_driver_open_kms, .-radeon_driver_open_kms
	.comm	RADEON_VM_PAGE_SNOOPED,4,4
	.comm	RADEON_VM_PAGE_READABLE,4,4
	.comm	RADEON_VA_IB_OFFSET,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	CHIP_CAYMAN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
