	.file	"extr_radeon_cursor.c_radeon_crtc_cursor_set.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"bad cursor width or height %d x %d\n"
	.align 8
.LC1:
	.string	"Cannot find cursor object %x for crtc %d\n"
	.text
	.p2align 4
	.globl	radeon_crtc_cursor_set
	.type	radeon_crtc_cursor_set, @function
radeon_crtc_cursor_set:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r8
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	to_radeon_crtc@PLT
	mov	rbx, rax
	test	rbp, rbp
	je	.L22
	cmp	QWORD PTR CURSOR_WIDTH[rip], r12
	jl	.L4
	cmp	QWORD PTR CURSOR_HEIGHT[rip], r13
	jge	.L5
.L4:
	mov	rdx, r13
	mov	rsi, r12
	lea	rdi, .LC0[rip]
	call	DRM_ERROR@PLT
	mov	r14d, DWORD PTR EINVAL[rip]
	neg	r14d
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdi, QWORD PTR [r15]
	mov	rdx, rbp
	mov	rsi, r14
	mov	rax, QWORD PTR [rdi]
	mov	QWORD PTR 8[rsp], rax
	call	drm_gem_object_lookup@PLT
	test	rax, rax
	je	.L24
	mov	rdi, rax
	mov	QWORD PTR [rsp], rax
	call	gem_to_radeon_bo@PLT
	xor	esi, esi
	mov	rdi, rax
	mov	rbp, rax
	call	radeon_bo_reserve@PLT
	xor	edi, edi
	test	eax, eax
	mov	r14d, eax
	setne	dil
	call	unlikely@PLT
	mov	r8, QWORD PTR [rsp]
	test	rax, rax
	je	.L25
.L8:
	mov	rdi, r8
	call	drm_gem_object_unreference_unlocked@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rdi, r15
	call	radeon_hide_cursor@PLT
	xor	r8d, r8d
.L3:
	mov	rdi, QWORD PTR 8[rbx]
	test	rdi, rdi
	je	.L10
	mov	QWORD PTR [rsp], r8
	call	gem_to_radeon_bo@PLT
	xor	esi, esi
	mov	rdi, rax
	mov	rbp, rax
	call	radeon_bo_reserve@PLT
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	likely@PLT
	mov	r8, QWORD PTR [rsp]
	test	rax, rax
	jne	.L26
.L11:
	mov	rdi, QWORD PTR 8[rbx]
	mov	QWORD PTR [rsp], r8
	call	drm_gem_object_unreference_unlocked@PLT
	mov	r8, QWORD PTR [rsp]
.L10:
	mov	QWORD PTR 8[rbx], r8
	xor	r14d, r14d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rdi, QWORD PTR 8[rsp]
	call	ASIC_IS_AVIVO@PLT
	xor	edx, edx
	mov	esi, DWORD PTR RADEON_GEM_DOMAIN_VRAM[rip]
	mov	rdi, rbp
	test	rax, rax
	lea	rcx, 20[rsp]
	sete	dl
	sal	edx, 27
	call	radeon_bo_pin_restricted@PLT
	mov	rdi, rbp
	mov	r14d, eax
	call	radeon_bo_unreserve@PLT
	test	r14d, r14d
	mov	r8, QWORD PTR [rsp]
	jne	.L8
	mov	QWORD PTR 24[rbx], r12
	mov	esi, 1
	mov	rdi, r15
	mov	QWORD PTR 16[rbx], r13
	call	radeon_lock_cursor@PLT
	mov	r8, QWORD PTR [rsp]
	mov	edx, DWORD PTR 20[rsp]
	mov	rdi, r15
	mov	rsi, r8
	call	radeon_set_cursor@PLT
	mov	rdi, r15
	call	radeon_show_cursor@PLT
	xor	esi, esi
	mov	rdi, r15
	call	radeon_lock_cursor@PLT
	mov	r8, QWORD PTR [rsp]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rdx, QWORD PTR [rbx]
	mov	rsi, rbp
	lea	rdi, .LC1[rip]
	call	DRM_ERROR@PLT
	mov	r14d, DWORD PTR ENOENT[rip]
	neg	r14d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rdi, rbp
	call	radeon_bo_unpin@PLT
	mov	rdi, rbp
	call	radeon_bo_unreserve@PLT
	mov	r8, QWORD PTR [rsp]
	jmp	.L11
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	radeon_crtc_cursor_set, .-radeon_crtc_cursor_set
	.comm	RADEON_GEM_DOMAIN_VRAM,4,4
	.comm	ENOENT,4,4
	.comm	EINVAL,4,4
	.comm	CURSOR_WIDTH,8,8
	.comm	CURSOR_HEIGHT,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_cursor.c_radeon_crtc_cursor_set.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"bad cursor width or height %d x %d\012\000"
	.align	2
.LC1:
	.ascii	"Cannot find cursor object %x for crtc %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	radeon_crtc_cursor_set
	.syntax unified
	.arm
	.fpu softvfp
	.type	radeon_crtc_cursor_set, %function
radeon_crtc_cursor_set:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r3
	ldr	r3, .L26
	sub	sp, sp, #20
	mov	r4, r2
	mov	r8, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r7, r0
	ldr	r9, [sp, #56]
	bl	to_radeon_crtc
	cmp	r4, #0
	mov	r6, r0
	beq	.L21
	ldr	r3, .L26+4
	ldr	r3, [r3]
	cmp	r3, r5
	blt	.L4
	ldr	r3, .L26+8
	ldr	r3, [r3]
	cmp	r3, r9
	bge	.L5
.L4:
	mov	r2, r9
	mov	r1, r5
	ldr	r0, .L26+12
	bl	DRM_ERROR
	ldr	r3, .L26+16
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	ldr	r0, [r7]
	mov	r1, r8
	mov	r2, r4
	ldr	r10, [r0]
	bl	drm_gem_object_lookup
	subs	r8, r0, #0
	beq	.L23
	bl	gem_to_radeon_bo
	mov	r1, #0
	mov	fp, r0
	bl	radeon_bo_reserve
	mov	r4, r0
	subs	r0, r0, #0
	movne	r0, #1
	bl	unlikely
	subs	r2, r0, #0
	str	r2, [sp, #4]
	beq	.L24
.L8:
	mov	r0, r8
	bl	drm_gem_object_unreference_unlocked
	b	.L1
.L21:
	mov	r0, r7
	bl	radeon_hide_cursor
	mov	r8, r4
.L3:
	ldr	r0, [r6, #4]
	cmp	r0, #0
	beq	.L10
	bl	gem_to_radeon_bo
	mov	r1, #0
	mov	r4, r0
	bl	radeon_bo_reserve
	clz	r0, r0
	lsr	r0, r0, #5
	bl	likely
	cmp	r0, #0
	bne	.L25
.L11:
	ldr	r0, [r6, #4]
	bl	drm_gem_object_unreference_unlocked
.L10:
	mov	r4, #0
	str	r8, [r6, #4]
	b	.L1
.L24:
	ldr	r3, .L26+20
	mov	r0, r10
	ldr	r4, [r3]
	bl	ASIC_IS_AVIVO
	cmp	r0, #0
	mov	r1, r4
	ldr	r2, [sp, #4]
	add	r3, sp, #8
	moveq	r2, #134217728
	mov	r0, fp
	bl	radeon_bo_pin_restricted
	mov	r4, r0
	mov	r0, fp
	bl	radeon_bo_unreserve
	cmp	r4, #0
	bne	.L8
	mov	r1, #1
	mov	r0, r7
	str	r5, [r6, #12]
	str	r9, [r6, #8]
	bl	radeon_lock_cursor
	mov	r1, r8
	ldr	r2, [sp, #8]
	mov	r0, r7
	bl	radeon_set_cursor
	mov	r0, r7
	bl	radeon_show_cursor
	mov	r1, r4
	mov	r0, r7
	bl	radeon_lock_cursor
	b	.L3
.L23:
	mov	r1, r4
	ldr	r2, [r6]
	ldr	r0, .L26+24
	bl	DRM_ERROR
	ldr	r3, .L26+28
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L25:
	mov	r0, r4
	bl	radeon_bo_unpin
	mov	r0, r4
	bl	radeon_bo_unreserve
	b	.L11
.L22:
	bl	__stack_chk_fail
.L27:
	.align	2
.L26:
	.word	.LC2
	.word	CURSOR_WIDTH
	.word	CURSOR_HEIGHT
	.word	.LC0
	.word	EINVAL
	.word	RADEON_GEM_DOMAIN_VRAM
	.word	.LC1
	.word	ENOENT
	.size	radeon_crtc_cursor_set, .-radeon_crtc_cursor_set
	.comm	RADEON_GEM_DOMAIN_VRAM,4,4
	.comm	ENOENT,4,4
	.comm	EINVAL,4,4
	.comm	CURSOR_WIDTH,4,4
	.comm	CURSOR_HEIGHT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
