	.file	"894613.c"
	.intel_syntax noprefix
	.text
	.globl	mems
	.bss
	.align 8
	.type	mems, @object
	.size	mems, 8
mems:
	.zero	8
	.globl	status
	.align 32
	.type	status, @object
	.size	status, 128
status:
	.zero	128
	.section	.rodata
.LC0:
	.string	"cat /proc/%d/status"
	.text
	.globl	Init
	.type	Init, @function
Init:
.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, 16
	call	getpid@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, eax
	lea	rsi, .LC0[rip]
	lea	rdi, status[rip]
	mov	eax, 0
	call	sprintf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Init, .-Init
	.globl	Clean
	.type	Clean, @function
Clean:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR mems[rip]
	test	rax, rax
	je	.L4
	mov	rax, QWORD PTR mems[rip]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR mems[rip], 0
.L4:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Clean, .-Clean
	.section	.rodata
.LC1:
	.string	"Status::%s\n"
	.text
	.globl	LogStatus
	.type	LogStatus, @function
LogStatus:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, status[rip]
	call	system@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	LogStatus, .-LogStatus
	.globl	ToWrite
	.type	ToWrite, @function
ToWrite:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -4[rbp]
	cdq
	shr	edx, 24
	add	eax, edx
	movzx	eax, al
	sub	eax, edx
	mov	ecx, eax
	mov	rdx, QWORD PTR mems[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 4096
	mov	DWORD PTR -4[rbp], eax
.L7:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, 268435455
	jbe	.L8
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	ToWrite, .-ToWrite
	.section	.rodata
.LC2:
	.string	"Begninning"
	.align 8
.LC3:
	.string	"After malloc 256MB, before write"
.LC4:
	.string	"After Write"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	Init
	lea	rdi, .LC2[rip]
	call	LogStatus
	mov	edi, 268435456
	call	malloc@PLT
	mov	QWORD PTR mems[rip], rax
	lea	rdi, .LC3[rip]
	call	LogStatus
	mov	eax, 0
	call	ToWrite
	lea	rdi, .LC4[rip]
	call	LogStatus
	mov	eax, 0
	call	Clean
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"894613.c"
	.text
	.comm	mems,4,4
	.comm	status,128,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"cat /proc/%d/status\000"
	.text
	.align	2
	.global	Init
	.syntax unified
	.arm
	.fpu softvfp
	.type	Init, %function
Init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	getpid
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, .L2
	ldr	r0, .L2+4
	bl	sprintf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.word	status
	.size	Init, .-Init
	.align	2
	.global	Clean
	.syntax unified
	.arm
	.fpu softvfp
	.type	Clean, %function
Clean:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L7
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L7
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L7
	mov	r2, #0
	str	r2, [r3]
.L6:
	nop
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	mems
	.size	Clean, .-Clean
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Status::%s\012\000"
	.text
	.align	2
	.global	LogStatus
	.syntax unified
	.arm
	.fpu softvfp
	.type	LogStatus, %function
LogStatus:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L10
	bl	printf
	ldr	r0, .L10+4
	bl	system
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC1
	.word	status
	.size	LogStatus, .-LogStatus
	.align	2
	.global	ToWrite
	.syntax unified
	.arm
	.fpu softvfp
	.type	ToWrite, %function
ToWrite:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L13
.L14:
	ldr	r3, [fp, #-8]
	rsbs	r2, r3, #0
	and	r3, r3, #255
	and	r2, r2, #255
	rsbpl	r3, r2, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	add	r2, r1, r2
	and	r3, r3, #255
	strb	r3, [r2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4096
	str	r3, [fp, #-8]
.L13:
	ldr	r3, [fp, #-8]
	cmn	r3, #-268435455
	bls	.L14
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L16:
	.align	2
.L15:
	.word	mems
	.size	ToWrite, .-ToWrite
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Begninning\000"
	.align	2
.LC3:
	.ascii	"After malloc 256MB, before write\000"
	.align	2
.LC4:
	.ascii	"After Write\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	Init
	ldr	r0, .L19
	bl	LogStatus
	mov	r0, #268435456
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L19+4
	str	r2, [r3]
	ldr	r0, .L19+8
	bl	LogStatus
	bl	ToWrite
	ldr	r0, .L19+12
	bl	LogStatus
	bl	Clean
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC2
	.word	mems
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
