	.file	"extr_ctxnv40.c_nv40_grctx_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	nv40_grctx_init
	.type	nv40_grctx_init, @function
nv40_grctx_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	mov	edi, 1024
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 56
	.cfi_def_cfa_offset 96
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	kmalloc@PLT
	pxor	xmm0, xmm0
	mov	QWORD PTR 32[rsp], r12
	mov	QWORD PTR [rsp], rax
	mov	rbp, rax
	mov	eax, DWORD PTR NOUVEAU_GRCTX_PROG[rip]
	movups	XMMWORD PTR 8[rsp], xmm0
	mov	DWORD PTR 28[rsp], eax
	mov	eax, DWORD PTR ENOMEM[rip]
	mov	DWORD PTR 24[rsp], 0
	mov	DWORD PTR 8[rsp], 256
	neg	eax
	test	rbp, rbp
	je	.L1
	mov	rdi, rsp
	call	nv40_grctx_generate@PLT
	xor	edx, edx
	mov	esi, 4195108
	mov	rdi, r12
	call	nv_wr32@PLT
	cmp	QWORD PTR 16[rsp], 0
	je	.L4
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdx, QWORD PTR 0[rbp+rbx*8]
	mov	esi, 4195112
	mov	rdi, r12
	add	rbx, 1
	call	nv_wr32@PLT
	cmp	QWORD PTR 16[rsp], rbx
	ja	.L5
.L4:
	mov	eax, DWORD PTR 24[rsp]
	mov	rdi, rbp
	sal	eax, 2
	cdqe
	mov	QWORD PTR 0[r13], rax
	call	kfree@PLT
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L10
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nv40_grctx_init, .-nv40_grctx_init
	.comm	NOUVEAU_GRCTX_PROG,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_ctxnv40.c_nv40_grctx_init.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	nv40_grctx_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	nv40_grctx_init, %function
nv40_grctx_init:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L15
	mov	r9, r1
	ldr	r1, [r3]
	ldr	r3, .L15+4
	sub	sp, sp, #36
	mov	r6, r0
	mov	r0, #1024
	mov	r4, #0
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bl	kmalloc
	mov	r3, #256
	ldr	r2, .L15+8
	cmp	r0, r4
	ldr	r2, [r2]
	str	r6, [sp, #24]
	str	r0, [sp, #4]
	str	r2, [sp, #20]
	str	r4, [sp, #12]
	str	r4, [sp, #16]
	str	r3, [sp, #8]
	beq	.L13
	mov	r7, r0
	add	r0, sp, #4
	bl	nv40_grctx_generate
	mov	r2, r4
	mov	r0, r6
	ldr	r1, .L15+12
	bl	nv_wr32
	ldr	r3, [sp, #12]
	cmp	r3, #0
	beq	.L4
	ldr	r8, .L15+16
	sub	r5, r7, #4
.L5:
	mov	r1, r8
	mov	r0, r6
	ldr	r2, [r5, #4]!
	bl	nv_wr32
	ldr	r3, [sp, #12]
	add	r4, r4, #1
	cmp	r3, r4
	bhi	.L5
.L4:
	ldr	r3, [sp, #16]
	mov	r0, r7
	lsl	r3, r3, #2
	str	r3, [r9]
	bl	kfree
	mov	r0, #0
.L1:
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L13:
	ldr	r3, .L15+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	GFP_KERNEL
	.word	.LC0
	.word	NOUVEAU_GRCTX_PROG
	.word	4195108
	.word	4195112
	.word	ENOMEM
	.size	nv40_grctx_init, .-nv40_grctx_init
	.comm	NOUVEAU_GRCTX_PROG,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
