	.file	"14201190.c"
	.intel_syntax noprefix
	.text
	.globl	mdf
	.bss
	.align 32
	.type	mdf, @object
	.size	mdf, 32
mdf:
	.zero	32
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"Unkown opt (%c)\n"
.LC2:
	.string	"p:f:t:"
	.text
	.globl	parse_args
	.type	parse_args, @function
parse_args:
.LFB6:
	.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	jmp	.L2
.L7:
	movsx	eax, BYTE PTR -1[rbp]
	cmp	eax, 116
	je	.L3
	cmp	eax, 116
	jg	.L4
	cmp	eax, 102
	je	.L5
	cmp	eax, 112
	je	.L6
	jmp	.L4
.L5:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR mdf[rip], rax
	mov	rdx, QWORD PTR optarg[rip]
	mov	rax, QWORD PTR mdf[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR mdf[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR mdf[rip+8], eax
	jmp	.L2
.L6:
	mov	rax, QWORD PTR optarg[rip]
	lea	rdx, mdf[rip+28]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	jmp	.L2
.L3:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR mdf[rip+16], rax
	mov	rdx, QWORD PTR optarg[rip]
	mov	rax, QWORD PTR mdf[rip+16]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR mdf[rip+16]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR mdf[rip+24], eax
	jmp	.L2
.L4:
	movsx	edx, BYTE PTR -1[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L2:
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	lea	rdx, .LC2[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	BYTE PTR -1[rbp], al
	cmp	BYTE PTR -1[rbp], -1
	jne	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	parse_args, .-parse_args
	.section	.rodata
.LC3:
	.string	"[heap]"
	.text
	.globl	is_heap
	.type	is_heap, @function
is_heap:
.LFB7:
	.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	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, -6[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L9
	mov	eax, 1
	jmp	.L10
.L9:
	mov	eax, 0
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	is_heap, .-is_heap
	.section	.rodata
.LC4:
	.string	"[stack]"
	.text
	.globl	is_stack
	.type	is_stack, @function
is_stack:
.LFB8:
	.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	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, -7[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L12
	mov	eax, 1
	jmp	.L13
.L12:
	mov	eax, 0
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	is_stack, .-is_stack
	.section	.rodata
.LC5:
	.string	"[fseek] %s (errno: %d)\n"
.LC6:
	.string	"[fwrite] %s (errno: %d)\n"
	.text
	.globl	replace
	.type	replace, @function
replace:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	cmp	eax, -1
	jne	.L15
	call	__errno_location@PLT
	mov	ebx, DWORD PTR [rax]
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, ebx
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L16
.L15:
	mov	eax, DWORD PTR mdf[rip+24]
	movsx	rsi, eax
	mov	rax, QWORD PTR mdf[rip+16]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	cmp	rax, 1
	je	.L17
	call	__errno_location@PLT
	mov	ebx, DWORD PTR [rax]
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, ebx
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L16
.L17:
	mov	eax, 0
.L16:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	replace, .-replace
	.section	.rodata
.LC7:
	.string	"mem heap is too large\n"
.LC8:
	.string	"[fread] %s (errno: %d)\n"
	.text
	.globl	trace_mem
	.type	trace_mem, @function
trace_mem:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -48[rbp]
	sub	edx, eax
	mov	rax, QWORD PTR -64[rbp]
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 268435456
	jle	.L19
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L20
.L19:
	mov	rax, QWORD PTR mdf[rip]
	test	rax, rax
	je	.L21
	mov	rax, QWORD PTR mdf[rip+16]
	test	rax, rax
	jne	.L22
.L21:
	mov	eax, 0
	jmp	.L20
.L22:
	mov	rdx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rcx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	cmp	eax, -1
	jne	.L23
	call	__errno_location@PLT
	mov	ebx, DWORD PTR [rax]
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, ebx
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L20
.L23:
	mov	eax, DWORD PTR -28[rbp]
	add	eax, 1
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	eax, DWORD PTR -28[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 1
	je	.L24
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	call	__errno_location@PLT
	mov	ebx, DWORD PTR [rax]
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, ebx
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L20
.L24:
	mov	DWORD PTR -32[rbp], 0
	jmp	.L25
.L27:
	mov	eax, DWORD PTR mdf[rip+8]
	movsx	rdx, eax
	mov	eax, DWORD PTR -32[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rcx, rax
	mov	rax, QWORD PTR mdf[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcmp@PLT
	test	eax, eax
	jne	.L26
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rdx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -48[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	replace
	jmp	.L20
.L26:
	add	DWORD PTR -32[rbp], 1
.L25:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L27
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L20:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	trace_mem, .-trace_mem
	.section	.rodata
.LC9:
	.string	"/proc/%d/maps"
.LC10:
	.string	"/proc/%d/mem"
.LC11:
	.string	"r"
.LC12:
	.string	"r+"
.LC13:
	.string	"%llx-%llx %s %lx %*s %*s%[^\n]"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 224
	mov	DWORD PTR -212[rbp], edi
	mov	QWORD PTR -224[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -224[rbp]
	mov	eax, DWORD PTR -212[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	parse_args
	mov	edi, 18
	call	malloc@PLT
	mov	QWORD PTR -208[rbp], rax
	mov	edx, DWORD PTR mdf[rip+28]
	mov	rax, QWORD PTR -208[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	edi, 17
	call	malloc@PLT
	mov	QWORD PTR -200[rbp], rax
	mov	edx, DWORD PTR mdf[rip+28]
	mov	rax, QWORD PTR -200[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -208[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR -200[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -184[rbp], rax
	jmp	.L29
.L30:
	lea	rax, -176[rbp]
	add	rax, 32
	mov	rdi, rax
	call	is_heap
	cmp	eax, 1
	jne	.L29
	mov	rdx, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	mov	rax, QWORD PTR -176[rbp]
	mov	rsi, rax
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, rdx
	mov	rdx, rdi
	mov	rdi, rax
	call	trace_mem
.L29:
	lea	rax, -176[rbp]
	lea	r8, 24[rax]
	lea	rax, -176[rbp]
	lea	rdi, 16[rax]
	lea	rax, -176[rbp]
	lea	rcx, 8[rax]
	lea	rdx, -176[rbp]
	mov	rax, QWORD PTR -192[rbp]
	sub	rsp, 8
	lea	rsi, -176[rbp]
	add	rsi, 32
	push	rsi
	mov	r9, r8
	mov	r8, rdi
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	add	rsp, 16
	cmp	eax, -1
	jne	.L30
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -208[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	"14201190.c"
	.text
	.comm	mdf,20,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"Unkown opt (%c)\012\000"
	.align	2
.LC2:
	.ascii	"p:f:t:\000"
	.text
	.align	2
	.global	parse_args
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_args, %function
parse_args:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	b	.L2
.L8:
	cmp	r3, #116
	bgt	.L4
	cmp	r3, #102
	beq	.L5
	cmp	r3, #112
	beq	.L6
	b	.L4
.L5:
	ldr	r3, .L9
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L9+4
	str	r2, [r3]
	ldr	r3, .L9+4
	ldr	r3, [r3]
	ldr	r2, .L9
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r3, .L9+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L9+4
	str	r2, [r3, #4]
	b	.L2
.L6:
	ldr	r3, .L9
	ldr	r3, [r3]
	ldr	r2, .L9+8
	ldr	r1, .L9+12
	mov	r0, r3
	bl	__isoc99_sscanf
	b	.L2
.L3:
	ldr	r3, .L9
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L9+4
	str	r2, [r3, #8]
	ldr	r3, .L9+4
	ldr	r3, [r3, #8]
	ldr	r2, .L9
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r3, .L9+4
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L9+4
	str	r2, [r3, #12]
	b	.L2
.L4:
	ldr	r3, .L9+16
	ldr	r3, [r3]
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	ldr	r1, .L9+20
	mov	r0, r3
	bl	fprintf
.L2:
	ldr	r2, .L9+24
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	getopt
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #116
	beq	.L3
	b	.L8
.L10:
	.align	2
.L9:
	.word	optarg
	.word	mdf
	.word	mdf+16
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.size	parse_args, .-parse_args
	.section	.rodata
	.align	2
.LC3:
	.ascii	"[heap]\000"
	.text
	.align	2
	.global	is_heap
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_heap, %function
is_heap:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #6
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L14
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	mov	r3, #1
	b	.L13
.L12:
	mov	r3, #0
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC3
	.size	is_heap, .-is_heap
	.section	.rodata
	.align	2
.LC4:
	.ascii	"[stack]\000"
	.text
	.align	2
	.global	is_stack
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_stack, %function
is_stack:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #7
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L19
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	mov	r3, #1
	b	.L18
.L17:
	mov	r3, #0
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC4
	.size	is_stack, .-is_stack
	.section	.rodata
	.align	2
.LC5:
	.ascii	"[fseek] %s (errno: %d)\012\000"
	.align	2
.LC6:
	.ascii	"[fwrite] %s (errno: %d)\012\000"
	.text
	.align	2
	.global	replace
	.syntax unified
	.arm
	.fpu softvfp
	.type	replace, %function
replace:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	fseek
	mov	r3, r0
	cmn	r3, #1
	bne	.L22
	ldr	r3, .L25
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r5, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r5
	ldr	r1, .L25+4
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L23
.L22:
	ldr	r3, .L25+8
	ldr	r0, [r3, #8]
	ldr	r3, .L25+8
	ldr	r3, [r3, #12]
	mov	r1, r3
	ldr	r3, [fp, #-16]
	mov	r2, #1
	bl	fwrite
	mov	r3, r0
	cmp	r3, #1
	beq	.L24
	ldr	r3, .L25
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r5, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r5
	ldr	r1, .L25+12
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L23
.L24:
	mov	r3, #0
.L23:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L26:
	.align	2
.L25:
	.word	stderr
	.word	.LC5
	.word	mdf
	.word	.LC6
	.size	replace, .-replace
	.section	.rodata
	.align	2
.LC7:
	.ascii	"mem heap is too large\012\000"
	.align	2
.LC8:
	.ascii	"[fread] %s (errno: %d)\012\000"
	.text
	.align	2
	.global	trace_mem
	.syntax unified
	.arm
	.fpu softvfp
	.type	trace_mem, %function
trace_mem:
	@ args = 12, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #32
	str	r0, [fp, #-40]
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	ldr	r2, [fp, #4]
	ldr	r3, [fp, #-52]
	sub	r2, r2, r3
	ldr	r3, [fp, #12]
	sub	r3, r2, r3
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #268435456
	ble	.L28
	ldr	r3, .L37
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L37+4
	bl	fwrite
	mvn	r3, #0
	b	.L29
.L28:
	ldr	r3, .L37+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L30
	ldr	r3, .L37+8
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L31
.L30:
	mov	r3, #0
	b	.L29
.L31:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #12]
	add	r3, r2, r3
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	fseek
	mov	r3, r0
	cmn	r3, #1
	bne	.L32
	ldr	r3, .L37
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r5, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r5
	ldr	r1, .L37+12
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L29
.L32:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r1, [fp, #-28]
	ldr	r3, [fp, #-40]
	mov	r2, #1
	ldr	r0, [fp, #-24]
	bl	fread
	mov	r3, r0
	cmp	r3, #1
	beq	.L33
	ldr	r0, [fp, #-24]
	bl	free
	ldr	r3, .L37
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r5, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r5
	ldr	r1, .L37+16
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L29
.L33:
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L34
.L36:
	ldr	r3, .L37+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, .L37+8
	ldr	r2, [r2, #4]
	mov	r1, r3
	bl	memcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L35
	ldr	r0, [fp, #-24]
	bl	free
	ldr	r3, [fp, #12]
	mov	r0, r3
	asr	r1, r0, #31
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	adds	r4, r0, r2
	adc	r5, r1, r3
	ldr	r3, [fp, #-32]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r6, r4, r2
	adc	r7, r5, r3
	mov	r2, r6
	mov	r3, r7
	ldr	r0, [fp, #-40]
	bl	replace
	mov	r3, r0
	b	.L29
.L35:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L34:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L36
	ldr	r0, [fp, #-24]
	bl	free
	mov	r3, #0
.L29:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L38:
	.align	2
.L37:
	.word	stderr
	.word	.LC7
	.word	mdf
	.word	.LC5
	.word	.LC8
	.size	trace_mem, .-trace_mem
	.section	.rodata
	.align	2
.LC9:
	.ascii	"/proc/%d/maps\000"
	.align	2
.LC10:
	.ascii	"/proc/%d/mem\000"
	.align	2
.LC11:
	.ascii	"r\000"
	.align	2
.LC12:
	.ascii	"r+\000"
	.align	2
.LC13:
	.ascii	"%llx-%llx %s %lx %*s %*s%[^\012]\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 184
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #200
	str	r0, [fp, #-192]
	str	r1, [fp, #-196]
	ldr	r3, .L44
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, [fp, #-196]
	ldr	r0, [fp, #-192]
	bl	parse_args
	mov	r0, #18
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-188]
	ldr	r3, .L44+4
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r1, .L44+8
	ldr	r0, [fp, #-188]
	bl	sprintf
	mov	r0, #17
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-184]
	ldr	r3, .L44+4
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r1, .L44+12
	ldr	r0, [fp, #-184]
	bl	sprintf
	ldr	r1, .L44+16
	ldr	r0, [fp, #-188]
	bl	fopen
	str	r0, [fp, #-180]
	ldr	r1, .L44+20
	ldr	r0, [fp, #-184]
	bl	fopen
	str	r0, [fp, #-176]
	b	.L40
.L41:
	sub	r3, fp, #172
	add	r3, r3, #24
	mov	r0, r3
	bl	is_heap
	mov	r3, r0
	cmp	r3, #1
	bne	.L40
	sub	r3, fp, #172
	ldmia	r3, {r2-r3}
	mov	r4, r2
	mov	r5, r3
	sub	r3, fp, #164
	ldmia	r3, {r2-r3}
	ldr	r1, [fp, #-152]
	str	r1, [sp, #8]
	stm	sp, {r2-r3}
	mov	r2, r4
	mov	r3, r5
	ldr	r0, [fp, #-176]
	bl	trace_mem
.L40:
	sub	r3, fp, #172
	add	r1, r3, #8
	sub	r2, fp, #172
	sub	r3, fp, #172
	add	r3, r3, #24
	str	r3, [sp, #8]
	sub	r3, fp, #172
	add	r3, r3, #20
	str	r3, [sp, #4]
	sub	r3, fp, #172
	add	r3, r3, #16
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L44+24
	ldr	r0, [fp, #-180]
	bl	__isoc99_fscanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L41
	ldr	r0, [fp, #-176]
	bl	fclose
	ldr	r0, [fp, #-180]
	bl	fclose
	ldr	r0, [fp, #-184]
	bl	free
	ldr	r0, [fp, #-188]
	bl	free
	mov	r3, #0
	ldr	r2, .L44
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L43
	bl	__stack_chk_fail
.L43:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC14
	.word	mdf
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
