	.file	"238164.c"
	.intel_syntax noprefix
	.text
	.globl	mems
	.bss
	.align 32
	.type	mems, @object
	.size	mems, 8000000
mems:
	.zero	8000000
	.globl	sumB
	.align 8
	.type	sumB, @object
	.size	sumB, 8
sumB:
	.zero	8
	.text
	.globl	Clean
	.type	Clean, @function
Clean:
.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
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, mems[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	je	.L3
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, mems[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, mems[rip]
	mov	QWORD PTR [rdx+rax], 0
.L3:
	add	DWORD PTR -4[rbp], 1
.L2:
	cmp	DWORD PTR -4[rbp], 999999
	jle	.L4
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Clean, .-Clean
	.globl	ToTest
	.type	ToTest, @function
ToTest:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	cmp	DWORD PTR -8[rbp], 4095
	ja	.L6
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L7
.L6:
	cmp	DWORD PTR -4[rbp], 999999
	jle	.L8
	mov	eax, -1
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -8[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, mems[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, mems[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	je	.L9
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, QWORD PTR sumB[rip]
	add	rax, rdx
	mov	QWORD PTR sumB[rip], rax
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	mov	edi, edx
	call	ToTest
	jmp	.L7
.L9:
	mov	eax, DWORD PTR -8[rbp]
	shr	eax
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	ToTest
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	ToTest, .-ToTest
	.globl	ToTest_
	.type	ToTest_, @function
ToTest_:
.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	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 1073741824
	jmp	.L11
.L15:
	cmp	DWORD PTR -8[rbp], 999999
	jle	.L12
	mov	eax, -1
	jmp	.L13
.L12:
	mov	eax, DWORD PTR -4[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, mems[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, mems[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	je	.L14
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR sumB[rip]
	add	rax, rdx
	mov	QWORD PTR sumB[rip], rax
	add	DWORD PTR -8[rbp], 1
	jmp	.L11
.L14:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, mems[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, mems[rip]
	mov	QWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -4[rbp]
	shr	eax
	mov	DWORD PTR -4[rbp], eax
.L11:
	cmp	DWORD PTR -4[rbp], 4095
	ja	.L15
	mov	eax, DWORD PTR -8[rbp]
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	ToTest_, .-ToTest_
	.section	.rodata
.LC0:
	.string	"MaxB: %u\n"
.LC1:
	.string	"MaxKB: %u\n"
.LC2:
	.string	"MaxMB: %u\n"
.LC3:
	.string	"MaxGB: %u\n"
.LC4:
	.string	"error on index"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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	eax, 0
	call	ToTest_
	mov	DWORD PTR -4[rbp], eax
	mov	eax, 0
	call	Clean
	cmp	DWORD PTR -4[rbp], 0
	js	.L17
	mov	rax, QWORD PTR sumB[rip]
	add	rax, 8000008
	mov	QWORD PTR sumB[rip], rax
	mov	rax, QWORD PTR sumB[rip]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR sumB[rip]
	shr	rax, 10
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR sumB[rip]
	shr	rax, 20
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR sumB[rip]
	shr	rax, 30
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L18
.L17:
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L18:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"238164.c"
	.text
	.comm	mems,4000000,4
	.global	sumB
	.bss
	.align	2
	.type	sumB, %object
	.size	sumB, 4
sumB:
	.space	4
	.text
	.align	2
	.global	Clean
	.syntax unified
	.arm
	.fpu softvfp
	.type	Clean, %function
Clean:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L4:
	ldr	r2, .L5
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	beq	.L3
	ldr	r2, .L5
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r0, r3
	bl	free
	ldr	r2, .L5
	ldr	r3, [fp, #-8]
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
.L3:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-8]
	ldr	r2, .L5+4
	cmp	r3, r2
	blt	.L4
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	mems
	.word	1000000
	.size	Clean, .-Clean
	.align	2
	.global	ToTest
	.syntax unified
	.arm
	.fpu softvfp
	.type	ToTest, %function
ToTest:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #4096
	bcs	.L8
	ldr	r3, [fp, #-8]
	b	.L9
.L8:
	ldr	r3, [fp, #-8]
	ldr	r2, .L12
	cmp	r3, r2
	blt	.L10
	mvn	r3, #0
	b	.L9
.L10:
	ldr	r0, [fp, #-12]
	bl	malloc
	mov	r3, r0
	mov	r1, r3
	ldr	r2, .L12+4
	ldr	r3, [fp, #-8]
	str	r1, [r2, r3, lsl #2]
	ldr	r2, .L12+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	beq	.L11
	ldr	r3, .L12+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, .L12+8
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	ToTest
	mov	r3, r0
	b	.L9
.L11:
	ldr	r3, [fp, #-12]
	lsr	r3, r3, #1
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	ToTest
	mov	r3, r0
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	1000000
	.word	mems
	.word	sumB
	.size	ToTest, .-ToTest
	.align	2
	.global	ToTest_
	.syntax unified
	.arm
	.fpu softvfp
	.type	ToTest_, %function
ToTest_:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #1073741824
	str	r3, [fp, #-8]
	b	.L15
.L19:
	ldr	r3, [fp, #-12]
	ldr	r2, .L20
	cmp	r3, r2
	blt	.L16
	mvn	r3, #0
	b	.L17
.L16:
	ldr	r0, [fp, #-8]
	bl	malloc
	mov	r3, r0
	mov	r1, r3
	ldr	r2, .L20+4
	ldr	r3, [fp, #-12]
	str	r1, [r2, r3, lsl #2]
	ldr	r2, .L20+4
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	beq	.L18
	ldr	r3, .L20+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, .L20+8
	str	r3, [r2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L15
.L18:
	ldr	r2, .L20+4
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	mov	r0, r3
	bl	free
	ldr	r2, .L20+4
	ldr	r3, [fp, #-12]
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #1
	str	r3, [fp, #-8]
.L15:
	ldr	r3, [fp, #-8]
	cmp	r3, #4096
	bcs	.L19
	ldr	r3, [fp, #-12]
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	1000000
	.word	mems
	.word	sumB
	.size	ToTest_, .-ToTest_
	.section	.rodata
	.align	2
.LC0:
	.ascii	"MaxB: %u\012\000"
	.align	2
.LC1:
	.ascii	"MaxKB: %u\012\000"
	.align	2
.LC2:
	.ascii	"MaxMB: %u\012\000"
	.align	2
.LC3:
	.ascii	"MaxGB: %u\012\000"
	.align	2
.LC4:
	.ascii	"error on index\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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	ToTest_
	str	r0, [fp, #-8]
	bl	Clean
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L23
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r3, .L26+4
	add	r3, r2, r3
	ldr	r2, .L26
	str	r3, [r2]
	ldr	r3, .L26
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+8
	bl	printf
	ldr	r3, .L26
	ldr	r3, [r3]
	lsr	r3, r3, #10
	mov	r1, r3
	ldr	r0, .L26+12
	bl	printf
	ldr	r3, .L26
	ldr	r3, [r3]
	lsr	r3, r3, #20
	mov	r1, r3
	ldr	r0, .L26+16
	bl	printf
	ldr	r3, .L26
	ldr	r3, [r3]
	lsr	r3, r3, #30
	mov	r1, r3
	ldr	r0, .L26+20
	bl	printf
	b	.L24
.L23:
	ldr	r0, .L26+24
	bl	printf
.L24:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	sumB
	.word	4000004
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.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
