	.file	"97802.c"
	.intel_syntax noprefix
	.text
	.globl	sum
	.type	sum, @function
sum:
.LFB6:
	.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], edi
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	imul	eax, DWORD PTR -4[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sum, .-sum
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -24[rbp], 1
.L10:
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	sum
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], 2000000
	jg	.L14
	mov	DWORD PTR -20[rbp], 1
.L9:
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	sum
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, DWORD PTR -8[rbp]
	mov	edx, eax
	mov	eax, 2000000
	sub	eax, edx
	mov	ecx, eax
	sar	ecx, 31
	xor	eax, ecx
	mov	edx, eax
	sub	edx, ecx
	mov	eax, 2000000
	sub	eax, DWORD PTR -16[rbp]
	mov	ecx, eax
	sar	ecx, 31
	xor	eax, ecx
	sub	eax, ecx
	cmp	edx, eax
	jge	.L6
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	imul	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -12[rbp], eax
.L6:
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, DWORD PTR -8[rbp]
	cmp	eax, 2000000
	jg	.L15
	add	DWORD PTR -20[rbp], 1
	jmp	.L9
.L15:
	nop
	add	DWORD PTR -24[rbp], 1
	jmp	.L10
.L14:
	nop
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"97802.c"
	.text
	.align	2
	.global	sum
	.syntax unified
	.arm
	.fpu softvfp
	.type	sum, %function
sum:
	@ 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
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r2, [fp, #-8]
	mul	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	sum, .-sum
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\012\000"
	.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, #24
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #1
	str	r3, [fp, #-28]
.L10:
	ldr	r0, [fp, #-28]
	bl	sum
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, .L16
	cmp	r3, r2
	bgt	.L14
	mov	r3, #1
	str	r3, [fp, #-24]
.L9:
	ldr	r0, [fp, #-24]
	bl	sum
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	mul	r3, r2, r3
	rsb	r3, r3, #1998848
	add	r3, r3, #1152
	eor	r2, r3, r3, asr #31
	sub	r2, r2, r3, asr #31
	ldr	r3, [fp, #-20]
	rsb	r3, r3, #1998848
	add	r3, r3, #1152
	cmp	r3, #0
	rsblt	r3, r3, #0
	cmp	r2, r3
	bge	.L6
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	mul	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	mul	r3, r2, r3
	str	r3, [fp, #-16]
.L6:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	mul	r3, r2, r3
	ldr	r2, .L16
	cmp	r3, r2
	bgt	.L15
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L9
.L15:
	nop
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	b	.L10
.L14:
	nop
	ldr	r1, [fp, #-16]
	ldr	r0, .L16+4
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	2000000
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
