	.file	"extr_drm_context.c_drm_legacy_addctx.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"Not enough free contexts.\n"
.LC2:
	.string	"out of memory\n"
	.text
	.p2align 4
	.globl	drm_legacy_addctx
	.type	drm_legacy_addctx, @function
drm_legacy_addctx:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rsi
	mov	esi, DWORD PTR DRIVER_KMS_LEGACY_CONTEXT[rip]
	call	drm_core_check_feature@PLT
	test	eax, eax
	jne	.L2
	mov	esi, DWORD PTR DRIVER_LEGACY[rip]
	mov	rdi, rbp
	call	drm_core_check_feature@PLT
	mov	r12d, DWORD PTR EOPNOTSUPP[rip]
	neg	r12d
	test	eax, eax
	je	.L1
.L2:
	mov	rdi, rbp
	call	drm_legacy_ctxbitmap_next@PLT
	cmp	DWORD PTR DRM_KERNEL_CONTEXT[rip], eax
	mov	r12d, eax
	je	.L9
.L4:
	xor	eax, eax
	mov	esi, r12d
	lea	rdi, .LC0[rip]
	call	DRM_DEBUG@PLT
	test	r12d, r12d
	js	.L10
	mov	DWORD PTR [rbx], r12d
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 16
	call	kmalloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L11
	lea	r14, 4[rax]
	mov	rdi, r14
	call	INIT_LIST_HEAD@PLT
	mov	eax, DWORD PTR [rbx]
	mov	QWORD PTR 8[r12], r13
	mov	rdi, rbp
	mov	DWORD PTR [r12], eax
	xor	r12d, r12d
	call	mutex_lock@PLT
	lea	rsi, 4[rbp]
	mov	rdi, r14
	call	list_add@PLT
	mov	rdi, rbp
	call	mutex_unlock@PLT
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	DRM_DEBUG@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdi, rbp
	call	drm_legacy_ctxbitmap_next@PLT
	mov	r12d, eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	DRM_DEBUG@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	drm_legacy_addctx, .-drm_legacy_addctx
	.comm	GFP_KERNEL,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	ENOMEM,4,4
	.comm	DRM_KERNEL_CONTEXT,4,4
	.comm	DRIVER_LEGACY,4,4
	.comm	DRIVER_KMS_LEGACY_CONTEXT,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_context.c_drm_legacy_addctx.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%d\012\000"
	.align	2
.LC1:
	.ascii	"Not enough free contexts.\012\000"
	.align	2
.LC2:
	.ascii	"out of memory\012\000"
	.text
	.align	2
	.global	drm_legacy_addctx
	.syntax unified
	.arm
	.fpu softvfp
	.type	drm_legacy_addctx, %function
drm_legacy_addctx:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L13
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	ldr	r1, [r3]
	mov	r7, r2
	mov	r5, r0
	bl	drm_core_check_feature
	cmp	r0, #0
	bne	.L2
	ldr	r3, .L13+4
	mov	r0, r5
	ldr	r1, [r3]
	bl	drm_core_check_feature
	cmp	r0, #0
	beq	.L9
.L2:
	mov	r0, r5
	bl	drm_legacy_ctxbitmap_next
	ldr	r3, .L13+8
	mov	r4, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L10
.L4:
	mov	r1, r4
	ldr	r0, .L13+12
	bl	DRM_DEBUG
	cmp	r4, #0
	blt	.L11
	ldr	r3, .L13+16
	str	r4, [r6]
	mov	r0, #12
	ldr	r1, [r3]
	bl	kmalloc
	subs	r4, r0, #0
	beq	.L12
	add	r8, r4, #4
	mov	r0, r8
	bl	INIT_LIST_HEAD
	ldr	r3, [r6]
	str	r7, [r4, #8]
	str	r3, [r4]
	mov	r4, #0
	mov	r0, r5
	bl	mutex_lock
	add	r1, r5, #4
	mov	r0, r8
	bl	list_add
	mov	r0, r5
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r0, .L13+20
	bl	DRM_DEBUG
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	ldr	r3, .L13+24
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	mov	r0, r5
	bl	drm_legacy_ctxbitmap_next
	mov	r4, r0
	b	.L4
.L12:
	ldr	r0, .L13+28
	bl	DRM_DEBUG
	ldr	r3, .L13+32
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	.align	2
.L13:
	.word	DRIVER_KMS_LEGACY_CONTEXT
	.word	DRIVER_LEGACY
	.word	DRM_KERNEL_CONTEXT
	.word	.LC0
	.word	GFP_KERNEL
	.word	.LC1
	.word	EOPNOTSUPP
	.word	.LC2
	.word	ENOMEM
	.size	drm_legacy_addctx, .-drm_legacy_addctx
	.comm	GFP_KERNEL,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	ENOMEM,4,4
	.comm	DRM_KERNEL_CONTEXT,4,4
	.comm	DRIVER_LEGACY,4,4
	.comm	DRIVER_KMS_LEGACY_CONTEXT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
