	.file	"extr_nv40.c_nv40_fifo_context_attach.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nv40_fifo_context_attach, @function
nv40_fifo_context_attach:
.LFB0:
	.cfi_startproc
	endbr64
	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
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r12, QWORD PTR [rdi]
	mov	rdi, QWORD PTR [rsi]
	call	nv_engidx@PLT
	cmp	eax, 129
	je	.L5
	cmp	eax, 130
	je	.L6
	xor	r8d, r8d
	cmp	eax, 128
	je	.L1
	mov	r8d, DWORD PTR EINVAL[rip]
	neg	r8d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	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
.L6:
	.cfi_restore_state
	mov	DWORD PTR 12[rsp], 13024
	mov	r13d, 56
.L2:
	lea	r15, 4[r12]
	xor	esi, esi
	mov	rdi, r15
	call	spin_lock_irqsave@PLT
	mov	rdi, rbp
	call	nv_gpuobj@PLT
	mov	rdi, rbp
	mov	r14d, DWORD PTR [rax]
	call	nv_engctx@PLT
	xor	ecx, ecx
	mov	edx, 1
	mov	rdi, r12
	sar	r14d, 4
	mov	esi, 9472
	mov	DWORD PTR [rax], r14d
	call	nv_mask@PLT
	mov	esi, 12804
	mov	rdi, r12
	call	nv_rd32@PLT
	and	eax, DWORD PTR [r12]
	cmp	eax, DWORD PTR 4[rbx]
	je	.L11
.L4:
	mov	rdi, rbp
	call	nv_engctx@PLT
	mov	esi, DWORD PTR [rbx]
	mov	edi, DWORD PTR 8[r12]
	mov	edx, DWORD PTR [rax]
	add	esi, r13d
	call	nv_wo32@PLT
	mov	ecx, 1
	mov	edx, 1
	mov	rdi, r12
	mov	esi, 9472
	call	nv_mask@PLT
	xor	esi, esi
	mov	rdi, r15
	call	spin_unlock_irqrestore@PLT
	xor	r8d, r8d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	DWORD PTR 12[rsp], 13068
	mov	r13d, 84
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, rbp
	call	nv_engctx@PLT
	mov	esi, DWORD PTR 12[rsp]
	mov	rdi, r12
	mov	edx, DWORD PTR [rax]
	call	nv_wr32@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	nv40_fifo_context_attach, .-nv40_fifo_context_attach
	.comm	EINVAL,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_nv40.c_nv40_fifo_context_attach.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nv40_fifo_context_attach, %function
nv40_fifo_context_attach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r0, [r1]
	mov	r4, r1
	ldr	r6, [r5]
	bl	nv_engidx
	cmp	r0, #129
	beq	.L5
	cmp	r0, #130
	beq	.L6
	cmp	r0, #128
	beq	.L7
	ldr	r3, .L11
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L6:
	mov	r7, #56
	ldr	r9, .L11+4
.L2:
	add	r8, r6, #4
	mov	r1, #0
	mov	r0, r8
	bl	spin_lock_irqsave
	mov	r0, r4
	bl	nv_gpuobj
	mov	r3, r0
	mov	r0, r4
	ldr	r10, [r3]
	bl	nv_engctx
	asr	r10, r10, #4
	mov	r3, #0
	mov	r2, #1
	mov	r1, #9472
	str	r10, [r0]
	mov	r0, r6
	bl	nv_mask
	mov	r0, r6
	ldr	r1, .L11+8
	bl	nv_rd32
	ldr	r2, [r6]
	ldr	r3, [r5, #4]
	and	r0, r0, r2
	cmp	r0, r3
	beq	.L10
.L4:
	ldr	r1, [r5]
	mov	r0, r4
	add	r7, r7, r1
	ldr	r4, [r6, #8]
	bl	nv_engctx
	mov	r1, r7
	ldr	r2, [r0]
	mov	r0, r4
	bl	nv_wo32
	mov	r3, #1
	mov	r0, r6
	mov	r2, r3
	mov	r1, #9472
	bl	nv_mask
	mov	r0, r8
	mov	r1, #0
	bl	spin_unlock_irqrestore
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	mov	r7, #84
	ldr	r9, .L11+12
	b	.L2
.L10:
	mov	r0, r4
	bl	nv_engctx
	mov	r1, r9
	ldr	r2, [r0]
	mov	r0, r6
	bl	nv_wr32
	b	.L4
.L12:
	.align	2
.L11:
	.word	EINVAL
	.word	13024
	.word	12804
	.word	13068
	.size	nv40_fifo_context_attach, .-nv40_fifo_context_attach
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
