	.file	"587335.c"
	.intel_syntax noprefix
	.text
	.globl	known_primes
	.bss
	.align 32
	.type	known_primes, @object
	.size	known_primes, 4000000
known_primes:
	.zero	4000000
	.globl	solved_to
	.align 4
	.type	solved_to, @object
	.size	solved_to, 4
solved_to:
	.zero	4
	.globl	divisor_counter
	.align 4
	.type	divisor_counter, @object
	.size	divisor_counter, 4
divisor_counter:
	.zero	4
	.globl	number
	.align 4
	.type	number, @object
	.size	number, 4
number:
	.zero	4
	.globl	result
	.align 4
	.type	result, @object
	.size	result, 4
result:
	.zero	4
	.section	.rodata
.LC0:
	.string	"2"
.LC1:
	.string	"3"
.LC2:
	.string	"entering main() forloop"
.LC3:
	.string	"number: %u\n"
.LC4:
	.string	"%u\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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 divisor_counter[rip], 1
	mov	DWORD PTR known_primes[rip], 2
	mov	DWORD PTR known_primes[rip+4], 3
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	DWORD PTR result[rip], 0
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	DWORD PTR number[rip], 3
	jmp	.L2
.L4:
	mov	eax, DWORD PTR number[rip]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR number[rip]
	mov	edi, eax
	mov	eax, 0
	call	prime
	mov	DWORD PTR result[rip], eax
	mov	eax, DWORD PTR result[rip]
	cmp	eax, 1
	jne	.L3
	mov	eax, DWORD PTR number[rip]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR solved_to[rip]
	lea	eax, 1[rdx]
	mov	DWORD PTR solved_to[rip], eax
	mov	eax, DWORD PTR number[rip]
	mov	edx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, known_primes[rip]
	mov	DWORD PTR [rcx+rdx], eax
.L3:
	mov	eax, DWORD PTR number[rip]
	add	eax, 2
	mov	DWORD PTR number[rip], eax
.L2:
	mov	eax, DWORD PTR number[rip]
	cmp	eax, 999999
	jbe	.L4
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC5:
	.string	"inside prime()"
.LC6:
	.string	"divisor_counter: %u\n"
.LC7:
	.string	"prime/first_divisor : %u\n"
.LC8:
	.string	"divisor: %u\n"
.LC9:
	.string	"holder: %u\n"
	.text
	.globl	prime
	.type	prime, @function
prime:
.LFB1:
	.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
	mov	DWORD PTR -12[rbp], 1
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 1
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L7
.L11:
	mov	eax, DWORD PTR divisor_counter[rip]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR divisor_counter[rip]
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, known_primes[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 0
	div	ecx
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR divisor_counter[rip]
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, known_primes[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 0
	div	ecx
	cmp	eax, 1
	jbe	.L8
	mov	eax, DWORD PTR divisor_counter[rip]
	add	eax, 1
	mov	DWORD PTR divisor_counter[rip], eax
.L8:
	mov	eax, DWORD PTR divisor_counter[rip]
	mov	edx, DWORD PTR -12[rbp]
	sub	eax, edx
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, known_primes[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -4[rbp], eax
	mov	ecx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 0
	div	ecx
	mov	eax, edx
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -8[rbp], 0
	jne	.L9
	mov	eax, 0
	jmp	.L10
.L9:
	add	DWORD PTR -12[rbp], 1
.L7:
	mov	eax, DWORD PTR -20[rbp]
	shr	eax
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -12[rbp]
	cmp	edx, eax
	ja	.L11
	mov	eax, 1
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	prime, .-prime
	.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	"587335.c"
	.text
	.comm	known_primes,4000000,4
	.comm	solved_to,4,4
	.comm	divisor_counter,4,4
	.comm	number,4,4
	.comm	result,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"2\000"
	.align	2
.LC1:
	.ascii	"3\000"
	.align	2
.LC2:
	.ascii	"entering main() forloop\000"
	.align	2
.LC3:
	.ascii	"number: %u\012\000"
	.align	2
.LC4:
	.ascii	"%u\012\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
	ldr	r3, .L6
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, .L6+4
	mov	r2, #2
	str	r2, [r3]
	ldr	r3, .L6+4
	mov	r2, #3
	str	r2, [r3, #4]
	ldr	r0, .L6+8
	bl	puts
	ldr	r0, .L6+12
	bl	puts
	ldr	r3, .L6+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, .L6+20
	bl	puts
	ldr	r3, .L6+24
	mov	r2, #3
	str	r2, [r3]
	b	.L2
.L4:
	ldr	r3, .L6+24
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L6+28
	bl	printf
	ldr	r3, .L6+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	prime
	mov	r3, r0
	ldr	r2, .L6+16
	str	r3, [r2]
	ldr	r3, .L6+16
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L3
	ldr	r3, .L6+24
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L6+32
	bl	printf
	ldr	r3, .L6+36
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L6+36
	str	r2, [r1]
	ldr	r2, .L6+24
	ldr	r2, [r2]
	ldr	r1, .L6+4
	str	r2, [r1, r3, lsl #2]
.L3:
	ldr	r3, .L6+24
	ldr	r3, [r3]
	add	r3, r3, #2
	ldr	r2, .L6+24
	str	r3, [r2]
.L2:
	ldr	r3, .L6+24
	ldr	r3, [r3]
	ldr	r2, .L6+40
	cmp	r3, r2
	bcc	.L4
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	divisor_counter
	.word	known_primes
	.word	.LC0
	.word	.LC1
	.word	result
	.word	.LC2
	.word	number
	.word	.LC3
	.word	.LC4
	.word	solved_to
	.word	1000000
	.size	main, .-main
	.section	.rodata
	.align	2
.LC5:
	.ascii	"inside prime()\000"
	.align	2
.LC6:
	.ascii	"divisor_counter: %u\012\000"
	.global	__aeabi_uidiv
	.align	2
.LC7:
	.ascii	"prime/first_divisor : %u\012\000"
	.global	__aeabi_uidivmod
	.align	2
.LC8:
	.ascii	"divisor: %u\012\000"
	.align	2
.LC9:
	.ascii	"holder: %u\012\000"
	.text
	.align	2
	.global	prime
	.syntax unified
	.arm
	.fpu softvfp
	.type	prime, %function
prime:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	mov	r3, #1
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #1
	str	r3, [fp, #-8]
	ldr	r0, .L14
	bl	puts
	b	.L9
.L13:
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L14+8
	bl	printf
	ldr	r3, .L14+4
	ldr	r3, [r3]
	ldr	r2, .L14+12
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	__aeabi_uidiv
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+16
	bl	printf
	ldr	r3, .L14+4
	ldr	r3, [r3]
	ldr	r2, .L14+12
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	__aeabi_uidiv
	mov	r3, r0
	cmp	r3, #1
	bls	.L10
	ldr	r3, .L14+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L14+4
	str	r3, [r2]
.L10:
	ldr	r3, .L14+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	ldr	r2, .L14+12
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_uidivmod
	mov	r3, r1
	str	r3, [fp, #-12]
	ldr	r1, [fp, #-8]
	ldr	r0, .L14+20
	bl	printf
	ldr	r1, [fp, #-12]
	ldr	r0, .L14+24
	bl	printf
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L11
	mov	r3, #0
	b	.L12
.L11:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L9:
	ldr	r3, [fp, #-24]
	lsr	r3, r3, #1
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bhi	.L13
	mov	r3, #1
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC5
	.word	divisor_counter
	.word	.LC6
	.word	known_primes
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	prime, .-prime
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
