	.file	"extr_uvmm.c_nvkm_uvmm_mthd_page.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nvkm_uvmm_mthd_page, @function
nvkm_uvmm_mthd_page:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r8, rdi
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR [r8]
	mov	edi, DWORD PTR ENOSYS[rip]
	mov	QWORD PTR 8[rsp], rsi
	mov	rax, QWORD PTR [rax]
	neg	edi
	mov	DWORD PTR 4[rsp], edx
	mov	rbp, QWORD PTR [rax]
	cmp	QWORD PTR 8[rbp], 0
	je	.L2
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L3:
	add	rbx, 1
	mov	rax, rbx
	sal	rax, 4
	cmp	QWORD PTR 8[rbp+rax], 0
	jne	.L3
	lea	rdx, 4[rsp]
	lea	rsi, 8[rsp]
	xor	r9d, r9d
	xor	r8d, r8d
	push	QWORD PTR 24[r12]
	.cfi_def_cfa_offset 56
	xor	ecx, ecx
	push	QWORD PTR 16[r12]
	.cfi_def_cfa_offset 64
	push	QWORD PTR 8[r12]
	.cfi_def_cfa_offset 72
	push	QWORD PTR [r12]
	.cfi_def_cfa_offset 80
	call	nvif_unpack@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 48
	test	eax, eax
	jne	.L4
	mov	rdx, QWORD PTR [r12]
	cmp	rdx, rbx
	jnb	.L7
	sal	rdx, 4
	add	rbp, rdx
	mov	rcx, QWORD PTR 8[rbp]
	mov	rdx, QWORD PTR 0[rbp]
	mov	QWORD PTR 24[r12], rcx
	xor	ecx, ecx
	test	QWORD PTR NVKM_VMM_PAGE_SPARSE[rip], rdx
	setne	cl
	mov	DWORD PTR 8[r12], ecx
	xor	ecx, ecx
	test	QWORD PTR NVKM_VMM_PAGE_VRAM[rip], rdx
	setne	cl
	mov	DWORD PTR 12[r12], ecx
	xor	ecx, ecx
	test	QWORD PTR NVKM_VMM_PAGE_HOST[rip], rdx
	setne	cl
	test	QWORD PTR NVKM_VMM_PAGE_COMP[rip], rdx
	setne	dl
	mov	DWORD PTR 16[r12], ecx
	movzx	edx, dl
	mov	DWORD PTR 20[r12], edx
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	lea	rdx, 4[rsp]
	lea	rsi, 8[rsp]
	xor	r9d, r9d
	xor	r8d, r8d
	push	QWORD PTR 24[r12]
	.cfi_def_cfa_offset 56
	xor	ecx, ecx
	push	QWORD PTR 16[r12]
	.cfi_def_cfa_offset 64
	push	QWORD PTR 8[r12]
	.cfi_def_cfa_offset 72
	push	QWORD PTR [r12]
	.cfi_def_cfa_offset 80
	call	nvif_unpack@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 48
	test	eax, eax
	jne	.L4
.L7:
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	eax, DWORD PTR ENOSYS[rip]
	add	rsp, 16
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	nvkm_uvmm_mthd_page, .-nvkm_uvmm_mthd_page
	.comm	NVKM_VMM_PAGE_VRAM,8,8
	.comm	NVKM_VMM_PAGE_SPARSE,8,8
	.comm	NVKM_VMM_PAGE_HOST,8,8
	.comm	NVKM_VMM_PAGE_COMP,8,8
	.comm	ENOSYS,4,4
	.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_uvmm.c_nvkm_uvmm_mthd_page.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nvkm_uvmm_mthd_page, %function
nvkm_uvmm_mthd_page:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [r3]
	ldr	r7, .L14
	ldr	r6, [r3]
	ldr	r0, [r7]
	ldr	r3, [r6, #4]
	sub	sp, sp, #40
	cmp	r3, #0
	mov	r5, r1
	str	r1, [sp, #36]
	str	r2, [sp, #32]
	rsb	r8, r0, #0
	beq	.L2
	mov	r4, #0
	add	r2, r6, #4
.L3:
	add	r4, r4, #1
	ldr	r3, [r2, r4, lsl #3]
	cmp	r3, #0
	bne	.L3
	mov	ip, sp
	str	r3, [sp, #28]
	str	r3, [sp, #24]
	str	r3, [sp, #20]
	add	lr, r5, #4
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	mov	r0, r8
	str	r3, [ip]
	ldr	r3, [r5]
	add	r2, sp, #32
	add	r1, sp, #36
	bl	nvif_unpack
	cmp	r0, #0
	bne	.L4
	ldr	r2, [r5]
	cmp	r2, r4
	bcs	.L7
	ldr	r3, .L14+4
	ldr	ip, .L14+8
	ldr	r1, [r3]
	ldr	r3, [r6, r2, lsl #3]
	ldr	ip, [ip]
	tst	r3, r1
	ldr	r1, .L14+12
	ldr	lr, .L14+16
	ldr	r1, [r1]
	ldr	r4, [lr]
	movne	lr, #1
	moveq	lr, #0
	tst	r3, ip
	movne	ip, #1
	moveq	ip, #0
	tst	r3, r1
	movne	r1, #1
	moveq	r1, #0
	tst	r3, r4
	movne	r3, #1
	moveq	r3, #0
	add	r6, r6, r2, lsl #3
	ldr	r2, [r6, #4]
	str	lr, [r5, #4]
	str	r2, [r5, #20]
	str	ip, [r5, #8]
	str	r1, [r5, #12]
	str	r3, [r5, #16]
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	ip, sp
	str	r3, [sp, #28]
	str	r3, [sp, #24]
	str	r3, [sp, #20]
	add	lr, r1, #4
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	mov	r0, r8
	str	r3, [ip]
	ldr	r3, [r5]
	add	r2, sp, #32
	add	r1, sp, #36
	bl	nvif_unpack
	cmp	r0, #0
	bne	.L4
.L7:
	ldr	r3, .L14+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r0, [r7]
	rsb	r0, r0, #0
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	.align	2
.L14:
	.word	ENOSYS
	.word	NVKM_VMM_PAGE_SPARSE
	.word	NVKM_VMM_PAGE_VRAM
	.word	NVKM_VMM_PAGE_HOST
	.word	NVKM_VMM_PAGE_COMP
	.word	EINVAL
	.size	nvkm_uvmm_mthd_page, .-nvkm_uvmm_mthd_page
	.comm	NVKM_VMM_PAGE_VRAM,4,4
	.comm	NVKM_VMM_PAGE_SPARSE,4,4
	.comm	NVKM_VMM_PAGE_HOST,4,4
	.comm	NVKM_VMM_PAGE_COMP,4,4
	.comm	ENOSYS,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
