	.file	"extr_virtgpu_kms.c_virtio_gpu_driver_open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	virtio_gpu_driver_open
	.type	virtio_gpu_driver_open, @function
virtio_gpu_driver_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	push	rbx
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	rbx, rsi
	sub	rsp, 16
	mov	r14, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR TASK_COMM_LEN[rip]
	mov	rcx, rsp
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L17:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L17
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L18
	mov	r12d, DWORD PTR [r14]
	test	r12d, r12d
	jne	.L19
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L20
	lea	rsp, -32[rbp]
	mov	eax, r12d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 4
	call	kzalloc@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	mov	r13, rax
	neg	r12d
	test	rax, rax
	je	.L1
	mov	esi, DWORD PTR current[rip]
	mov	rdi, rsp
	call	get_task_comm@PLT
	mov	rdi, rsp
	call	strlen@PLT
	mov	rdx, rsp
	mov	rdi, r14
	mov	esi, eax
	call	virtio_gpu_context_create@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L21
	mov	DWORD PTR 0[r13], eax
	xor	r12d, r12d
	mov	QWORD PTR [rbx], r13
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	or	QWORD PTR -8[rsp+rdx], 0
	mov	r12d, DWORD PTR [r14]
	test	r12d, r12d
	je	.L1
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, r13
	call	kfree@PLT
	jmp	.L1
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	virtio_gpu_driver_open, .-virtio_gpu_driver_open
	.comm	current,4,4
	.comm	TASK_COMM_LEN,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_virtgpu_kms.c_virtio_gpu_driver_open.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	virtio_gpu_driver_open
	.syntax unified
	.arm
	.fpu softvfp
	.type	virtio_gpu_driver_open, %function
virtio_gpu_driver_open:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #8
	ldr	r3, .L14
	ldr	r6, [r0]
	ldr	r3, [r3]
	ldr	r4, [r6]
	ldr	r2, .L14+4
	add	r3, r3, #7
	bic	r3, r3, #7
	cmp	r4, #0
	ldr	r2, [r2]
	str	r2, [fp, #-24]
	mov	r2,#0
	sub	sp, sp, r3
	bne	.L11
.L1:
	ldr	r3, .L14+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	mov	r0, r4
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L11:
	ldr	r3, .L14+8
	mov	r7, r1
	mov	r0, #4
	ldr	r1, [r3]
	bl	kzalloc
	subs	r5, r0, #0
	beq	.L13
	ldr	r3, .L14+12
	mov	r0, sp
	ldr	r1, [r3]
	bl	get_task_comm
	mov	r0, sp
	bl	strlen
	mov	r2, sp
	mov	r1, r0
	mov	r0, r6
	bl	virtio_gpu_context_create
	subs	r4, r0, #0
	strge	r4, [r5]
	movge	r4, #0
	strge	r5, [r7]
	bge	.L1
	mov	r0, r5
	bl	kfree
	b	.L1
.L13:
	ldr	r3, .L14+16
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L12:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	TASK_COMM_LEN
	.word	.LC0
	.word	GFP_KERNEL
	.word	current
	.word	ENOMEM
	.size	virtio_gpu_driver_open, .-virtio_gpu_driver_open
	.comm	current,4,4
	.comm	TASK_COMM_LEN,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
