	.file	"extr_drm_fb_helper.c_drm_fb_helper_setcmap.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	drm_fb_helper_setcmap
	.type	drm_fb_helper_setcmap, @function
drm_fb_helper_setcmap:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR oops_in_progress[rip], 0
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	je	.L2
	mov	r12d, DWORD PTR EBUSY[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	neg	r12d
	mov	eax, r12d
	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
.L2:
	.cfi_restore_state
	mov	r14, QWORD PTR 8[rsi]
	mov	r15, rdi
	mov	r12, rsi
	mov	rbp, QWORD PTR 8[r14]
	mov	rdi, r14
	call	mutex_lock@PLT
	mov	rdi, rbp
	call	drm_master_internal_acquire@PLT
	test	eax, eax
	jne	.L4
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
.L5:
	mov	rdi, r14
	call	mutex_unlock@PLT
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L4:
	.cfi_restore_state
	lea	r13, 4[r14]
	mov	rdi, r13
	call	mutex_lock@PLT
	mov	rax, QWORD PTR FB_VISUAL_TRUECOLOR[rip]
	cmp	QWORD PTR [r12], rax
	je	.L11
	mov	rdi, QWORD PTR 8[r14]
	call	drm_drv_uses_atomic_modeset@PLT
	mov	rsi, r12
	mov	rdi, r15
	test	rax, rax
	je	.L8
	call	setcmap_atomic@PLT
	mov	r12d, eax
.L7:
	mov	rdi, r13
	call	mutex_unlock@PLT
	mov	rdi, rbp
	call	drm_master_internal_release@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rsi, r12
	mov	rdi, r15
	call	setcmap_pseudo_palette@PLT
	mov	r12d, eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	call	setcmap_legacy@PLT
	mov	r12d, eax
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	drm_fb_helper_setcmap, .-drm_fb_helper_setcmap
	.comm	oops_in_progress,8,8
	.comm	FB_VISUAL_TRUECOLOR,8,8
	.comm	EBUSY,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_drm_fb_helper.c_drm_fb_helper_setcmap.c"
	.text
	.align	2
	.global	drm_fb_helper_setcmap
	.syntax unified
	.arm
	.fpu softvfp
	.type	drm_fb_helper_setcmap, %function
drm_fb_helper_setcmap:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L12
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	ldr	r3, .L12+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r5, [r1, #4]
	mov	r8, r0
	ldr	r6, [r5, #8]
	mov	r0, r5
	mov	r4, r1
	bl	mutex_lock
	mov	r0, r6
	bl	drm_master_internal_acquire
	cmp	r0, #0
	bne	.L4
	ldr	r3, .L12+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L5:
	mov	r0, r5
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	add	r7, r5, #4
	mov	r0, r7
	bl	mutex_lock
	ldr	r3, .L12+8
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L11
	ldr	r0, [r5, #8]
	bl	drm_drv_uses_atomic_modeset
	cmp	r0, #0
	mov	r1, r4
	mov	r0, r8
	beq	.L8
	bl	setcmap_atomic
	mov	r4, r0
.L7:
	mov	r0, r7
	bl	mutex_unlock
	mov	r0, r6
	bl	drm_master_internal_release
	b	.L5
.L11:
	mov	r1, r4
	mov	r0, r8
	bl	setcmap_pseudo_palette
	mov	r4, r0
	b	.L7
.L8:
	bl	setcmap_legacy
	mov	r4, r0
	b	.L7
.L13:
	.align	2
.L12:
	.word	oops_in_progress
	.word	EBUSY
	.word	FB_VISUAL_TRUECOLOR
	.size	drm_fb_helper_setcmap, .-drm_fb_helper_setcmap
	.comm	oops_in_progress,4,4
	.comm	FB_VISUAL_TRUECOLOR,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
