	.file	"450960.c"
	.intel_syntax noprefix
	.text
	.globl	primes
	.bss
	.align 32
	.type	primes, @object
	.size	primes, 4004
primes:
	.zero	4004
	.text
	.globl	genprime
	.type	genprime, @function
genprime:
.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
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, DWORD PTR -20[rbp]
	movq	rax, xmm1
	movq	xmm0, rax
	call	sqrt@PLT
	cvttsd2si	eax, xmm0
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L6:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, primes[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	cdq
	idiv	ecx
	mov	eax, edx
	test	eax, eax
	je	.L7
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	eax, DWORD PTR primes[rip+4000]
	cmp	DWORD PTR -8[rbp], eax
	jge	.L5
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, primes[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -4[rbp], eax
	jge	.L6
.L5:
	mov	eax, DWORD PTR primes[rip+4000]
	lea	edx, 1[rax]
	mov	DWORD PTR primes[rip+4000], edx
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, primes[rip]
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	jmp	.L1
.L7:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	genprime, .-genprime
	.globl	isprime
	.type	isprime, @function
isprime:
.LFB7:
	.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 -20[rbp], edi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L9
.L13:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, primes[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L10
	mov	eax, 1
	jmp	.L11
.L10:
	add	DWORD PTR -4[rbp], 1
.L9:
	mov	eax, DWORD PTR primes[rip+4000]
	cmp	DWORD PTR -4[rbp], eax
	jge	.L12
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, primes[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -20[rbp], eax
	jge	.L13
.L12:
	mov	eax, 0
.L11:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	isprime, .-isprime
	.globl	countprimes
	.type	countprimes, @function
countprimes:
.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, 24
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L15
.L16:
	add	DWORD PTR -8[rbp], 1
	add	DWORD PTR -4[rbp], 1
.L15:
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, eax
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, DWORD PTR -4[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	mov	edi, eax
	call	isprime
	test	eax, eax
	jne	.L16
	mov	eax, DWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	countprimes, .-countprimes
	.section	.rodata
.LC0:
	.string	"%d %d %d\n"
.LC1:
	.string	"%d\n"
	.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, 32
	mov	DWORD PTR primes[rip], 2
	mov	DWORD PTR primes[rip+4], 3
	mov	DWORD PTR primes[rip+8], 5
	mov	DWORD PTR primes[rip+4000], 3
	mov	DWORD PTR -16[rbp], 3
	jmp	.L19
.L20:
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	genprime
	add	DWORD PTR -16[rbp], 2
.L19:
	cmp	DWORD PTR -16[rbp], 1000
	jle	.L20
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -12[rbp], -999
	jmp	.L21
.L25:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L22
.L24:
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	edi, eax
	call	countprimes
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jle	.L23
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -20[rbp], eax
.L23:
	add	DWORD PTR -8[rbp], 1
.L22:
	cmp	DWORD PTR -8[rbp], 1000
	jle	.L24
	add	DWORD PTR -12[rbp], 1
.L21:
	cmp	DWORD PTR -12[rbp], 999
	jle	.L25
	mov	ecx, DWORD PTR -20[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -24[rbp]
	imul	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	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	"450960.c"
	.text
	.comm	primes,4004,4
	.global	__aeabi_i2d
	.global	__aeabi_d2iz
	.global	__aeabi_idivmod
	.align	2
	.global	genprime
	.syntax unified
	.arm
	.fpu softvfp
	.type	genprime, %function
genprime:
	@ 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	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L6:
	ldr	r2, .L8
	ldr	r3, [fp, #-12]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-16]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, .L8
	ldr	r3, [r3, #4000]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L5
	ldr	r2, .L8
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L6
.L5:
	ldr	r3, .L8
	ldr	r3, [r3, #4000]
	add	r2, r3, #1
	ldr	r1, .L8
	str	r2, [r1, #4000]
	ldr	r1, .L8
	ldr	r2, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
	b	.L1
.L7:
	nop
.L1:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	primes
	.size	genprime, .-genprime
	.align	2
	.global	isprime
	.syntax unified
	.arm
	.fpu softvfp
	.type	isprime, %function
isprime:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L11
.L15:
	ldr	r2, .L16
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L12
	mov	r3, #1
	b	.L13
.L12:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L11:
	ldr	r3, .L16
	ldr	r3, [r3, #4000]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L14
	ldr	r2, .L16
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bge	.L15
.L14:
	mov	r3, #0
.L13:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L17:
	.align	2
.L16:
	.word	primes
	.size	isprime, .-isprime
	.align	2
	.global	countprimes
	.syntax unified
	.arm
	.fpu softvfp
	.type	countprimes, %function
countprimes:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L19
.L20:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L19:
	ldr	r3, [fp, #-8]
	mul	r2, r3, r3
	ldr	r3, [fp, #-16]
	ldr	r1, [fp, #-8]
	mul	r3, r1, r3
	add	r2, r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r0, r3
	bl	isprime
	mov	r3, r0
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	countprimes, .-countprimes
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d %d %d\012\000"
	.align	2
.LC1:
	.ascii	"%d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L31
	mov	r2, #2
	str	r2, [r3]
	ldr	r3, .L31
	mov	r2, #3
	str	r2, [r3, #4]
	ldr	r3, .L31
	mov	r2, #5
	str	r2, [r3, #8]
	ldr	r3, .L31
	mov	r2, #3
	str	r2, [r3, #4000]
	mov	r3, #3
	str	r3, [fp, #-20]
	b	.L23
.L24:
	ldr	r0, [fp, #-20]
	bl	genprime
	ldr	r3, [fp, #-20]
	add	r3, r3, #2
	str	r3, [fp, #-20]
.L23:
	ldr	r3, [fp, #-20]
	cmp	r3, #1000
	ble	.L24
	mov	r3, #0
	str	r3, [fp, #-32]
	ldr	r3, .L31+4
	str	r3, [fp, #-16]
	b	.L25
.L29:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L26
.L28:
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	countprimes
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	ble	.L27
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-24]
.L27:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L26:
	ldr	r3, [fp, #-12]
	cmp	r3, #1000
	ble	.L28
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L25:
	ldr	r3, [fp, #-16]
	cmp	r3, #1000
	blt	.L29
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-32]
	ldr	r0, .L31+8
	bl	printf
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	mul	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L31+12
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	primes
	.word	-999
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
