	.file	"582801.c"
	.intel_syntax noprefix
	.text
	.globl	n_cubes
	.type	n_cubes, @function
n_cubes:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	imul	rax, QWORD PTR -32[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	imul	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	add	eax, eax
	mov	DWORD PTR -4[rbp], eax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, 1
	imul	eax, edx
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, 2
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, 1
	imul	eax, edx
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	n_cubes, .-n_cubes
	.section	.rodata
.LC0:
	.string	"c: %d n: %lu max:%lu\n"
.LC1:
	.string	"min: %lu max: %lu\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	r11, -3997696[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 2384
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -4000040[rbp], 1
	mov	QWORD PTR -4000032[rbp], 20
	lea	rax, -4000016[rbp]
	mov	edx, 4000000
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -4000072[rbp], 0
	jmp	.L4
.L15:
	mov	rax, QWORD PTR -4000040[rbp]
	mov	QWORD PTR -4000064[rbp], rax
	jmp	.L5
.L14:
	mov	rax, QWORD PTR -4000064[rbp]
	mov	QWORD PTR -4000056[rbp], rax
	jmp	.L6
.L13:
	mov	rax, QWORD PTR -4000056[rbp]
	mov	QWORD PTR -4000048[rbp], rax
	jmp	.L7
.L12:
	mov	DWORD PTR -4000068[rbp], 1
.L11:
	mov	eax, DWORD PTR -4000068[rbp]
	cdqe
	mov	rcx, QWORD PTR -4000048[rbp]
	mov	rdx, QWORD PTR -4000064[rbp]
	mov	rsi, QWORD PTR -4000056[rbp]
	mov	rdi, rax
	call	n_cubes
	mov	QWORD PTR -4000024[rbp], rax
	add	DWORD PTR -4000068[rbp], 1
	cmp	QWORD PTR -4000024[rbp], 1999999
	ja	.L8
	cmp	QWORD PTR -4000024[rbp], 1000000
	jbe	.L8
	mov	rax, QWORD PTR -4000024[rbp]
	sub	rax, 1000000
	mov	edx, DWORD PTR -4000016[rbp+rax*4]
	add	edx, 1
	mov	DWORD PTR -4000016[rbp+rax*4], edx
	mov	rax, QWORD PTR -4000024[rbp]
	sub	rax, 1000000
	mov	eax, DWORD PTR -4000016[rbp+rax*4]
	cmp	eax, 1000
	je	.L9
	mov	rax, QWORD PTR -4000024[rbp]
	sub	rax, 1000000
	mov	eax, DWORD PTR -4000016[rbp+rax*4]
	cmp	eax, 1001
	jne	.L11
.L9:
	mov	rax, QWORD PTR -4000024[rbp]
	sub	rax, 1000000
	mov	eax, DWORD PTR -4000016[rbp+rax*4]
	mov	rcx, QWORD PTR -4000032[rbp]
	mov	rdx, QWORD PTR -4000024[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L11
.L8:
	add	QWORD PTR -4000048[rbp], 1
.L7:
	mov	rax, QWORD PTR -4000048[rbp]
	cmp	rax, QWORD PTR -4000032[rbp]
	jbe	.L12
	add	QWORD PTR -4000056[rbp], 1
.L6:
	mov	rax, QWORD PTR -4000056[rbp]
	cmp	rax, QWORD PTR -4000032[rbp]
	jbe	.L13
	add	QWORD PTR -4000064[rbp], 1
.L5:
	mov	rax, QWORD PTR -4000064[rbp]
	cmp	rax, QWORD PTR -4000032[rbp]
	jbe	.L14
	add	QWORD PTR -4000032[rbp], 20
	add	QWORD PTR -4000040[rbp], 20
	mov	rax, QWORD PTR -4000032[rbp]
	add	rax, 1000000
	cmp	rax, 6000000
	jbe	.L4
	mov	rdx, QWORD PTR -4000032[rbp]
	mov	rax, QWORD PTR -4000040[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4000072[rbp], 1
.L4:
	cmp	DWORD PTR -4000072[rbp], 0
	je	.L15
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"582801.c"
	.text
	.align	2
	.global	n_cubes
	.syntax unified
	.arm
	.fpu softvfp
	.type	n_cubes, %function
n_cubes:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [fp, #-20]
	mul	r2, r3, r2
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-28]
	mul	r3, r1, r3
	add	r3, r2, r3
	lsl	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	sub	r2, r2, #1
	mul	r3, r2, r3
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #2
	ldr	r2, [fp, #-16]
	sub	r2, r2, #1
	mul	r3, r2, r3
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	n_cubes, .-n_cubes
	.section	.rodata
	.align	2
.LC0:
	.ascii	"c: %d n: %lu max:%lu\012\000"
	.align	2
.LC1:
	.ascii	"min: %lu max: %lu\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4000040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #3997696
	sub	sp, sp, #2336
	sub	sp, sp, #12
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-2328]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #20
	str	r3, [r2, #-2324]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	sub	r3, r3, #2304
	sub	r3, r3, #4
	ldr	r2, .L18+4
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2320]
	b	.L4
.L15:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2328]
	str	r3, [r2, #-2340]
	b	.L5
.L14:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2340]
	str	r3, [r2, #-2336]
	b	.L6
.L13:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2336]
	str	r3, [r2, #-2332]
	b	.L7
.L12:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-2316]
.L11:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r0, [r3, #-2316]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	sub	r1, fp, #3997696
	sub	r1, r1, #12
	ldr	r3, [r3, #-2332]
	ldr	r2, [r2, #-2340]
	ldr	r1, [r1, #-2336]
	bl	n_cubes
	str	r0, [r4, #-2312]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2316]
	add	r3, r3, #1
	str	r3, [r2, #-2316]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2312]
	ldr	r2, .L18+8
	cmp	r3, r2
	bcs	.L8
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2312]
	ldr	r2, .L18+12
	cmp	r3, r2
	bls	.L8
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2312]
	sub	r3, r3, #999424
	sub	r3, r3, #576
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	mov	r1, r2
	lsl	r2, r3, #2
	add	r2, r1, r2
	ldr	r2, [r2, #-2308]
	add	r2, r2, #1
	sub	r1, fp, #3997696
	sub	r1, r1, #12
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r2, [r3, #-2308]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2312]
	sub	r3, r3, #999424
	sub	r3, r3, #576
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #-2308]
	cmp	r3, #1000
	beq	.L9
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2312]
	sub	r3, r3, #999424
	sub	r3, r3, #576
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #-2308]
	ldr	r2, .L18+16
	cmp	r3, r2
	bne	.L11
.L9:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2312]
	sub	r3, r3, #999424
	sub	r3, r3, #576
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r1, [r3, #-2308]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	ldr	r3, [r3, #-2324]
	ldr	r2, [r2, #-2312]
	ldr	r0, .L18+20
	bl	printf
	b	.L11
.L8:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2332]
	add	r3, r3, #1
	str	r3, [r2, #-2332]
.L7:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r2, [r2, #-2332]
	ldr	r3, [r3, #-2324]
	cmp	r2, r3
	bls	.L12
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2336]
	add	r3, r3, #1
	str	r3, [r2, #-2336]
.L6:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r2, [r2, #-2336]
	ldr	r3, [r3, #-2324]
	cmp	r2, r3
	bls	.L13
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2340]
	add	r3, r3, #1
	str	r3, [r2, #-2340]
.L5:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r2, [r2, #-2340]
	ldr	r3, [r3, #-2324]
	cmp	r2, r3
	bls	.L14
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2324]
	add	r3, r3, #20
	str	r3, [r2, #-2324]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2328]
	add	r3, r3, #20
	str	r3, [r2, #-2328]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2324]
	add	r3, r3, #999424
	add	r3, r3, #576
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	mov	r1, r2
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	ldr	r2, [r2, #-2320]
	str	r2, [r1, #-2320]
	ldr	r2, .L18+24
	cmp	r3, r2
	bls	.L4
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r2, [r2, #-2324]
	ldr	r1, [r3, #-2328]
	ldr	r0, .L18+28
	bl	printf
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-2320]
.L4:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2320]
	cmp	r3, #0
	beq	.L15
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC2
	.word	4000000
	.word	2000000
	.word	1000000
	.word	1001
	.word	.LC0
	.word	6000000
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
