	.file	"856525.c"
	.intel_syntax noprefix
	.text
	.globl	p
	.bss
	.align 32
	.type	p, @object
	.size	p, 40000
p:
	.zero	40000
	.globl	count
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.text
	.globl	is_prime
	.type	is_prime, @function
is_prime:
.LFB0:
	.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, p[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	cdq
	idiv	ecx
	mov	eax, edx
	test	eax, eax
	jne	.L3
	mov	eax, 0
	jmp	.L4
.L3:
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, p[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jle	.L5
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, p[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -4[rbp], eax
	jge	.L6
.L5:
	mov	eax, DWORD PTR count[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR count[rip], edx
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, p[rip]
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, 1
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	is_prime, .-is_prime
	.section	.rodata
.LC0:
	.string	"Input a number: "
.LC1:
	.string	"%d"
	.align 8
.LC2:
	.string	"n must be between 2 and 10000\n"
.LC3:
	.string	" %d"
	.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
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, 1
	jle	.L8
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, 10000
	jle	.L9
.L8:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 30
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L14
.L9:
	mov	DWORD PTR -12[rbp], 2
	jmp	.L11
.L13:
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	is_prime
	test	eax, eax
	je	.L12
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L12:
	add	DWORD PTR -12[rbp], 1
.L11:
	mov	eax, DWORD PTR -16[rbp]
	cmp	DWORD PTR -12[rbp], eax
	jle	.L13
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 0
.L14:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	"856525.c"
	.text
	.comm	p,40000,4
	.global	count
	.bss
	.align	2
	.type	count, %object
	.size	count, 4
count:
	.space	4
	.global	__aeabi_i2d
	.global	__aeabi_d2iz
	.global	__aeabi_idivmod
	.text
	.align	2
	.global	is_prime
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_prime, %function
is_prime:
	@ 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, .L7
	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
	bne	.L3
	mov	r3, #0
	b	.L4
.L3:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r2, .L7
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	ble	.L5
	ldr	r2, .L7
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L6
.L5:
	ldr	r3, .L7+4
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L7+4
	str	r2, [r1]
	ldr	r1, .L7
	ldr	r2, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
	mov	r3, #1
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	p
	.word	count
	.size	is_prime, .-is_prime
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Input a number: \000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"n must be between 2 and 10000\012\000"
	.align	2
.LC3:
	.ascii	" %d\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L18+4
	bl	printf
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L18+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L10
	ldr	r3, [fp, #-16]
	ldr	r2, .L18+12
	cmp	r3, r2
	ble	.L11
.L10:
	ldr	r3, .L18+16
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, #1
	ldr	r0, .L18+20
	bl	fwrite
	mov	r3, #1
	b	.L16
.L11:
	mov	r3, #2
	str	r3, [fp, #-12]
	b	.L13
.L15:
	ldr	r0, [fp, #-12]
	bl	is_prime
	mov	r3, r0
	cmp	r3, #0
	beq	.L14
	ldr	r1, [fp, #-12]
	ldr	r0, .L18+24
	bl	printf
.L14:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L13:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	ble	.L15
	mov	r0, #10
	bl	putchar
	mov	r3, #0
.L16:
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	10000
	.word	stderr
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
