	.file	"995534.c"
	.intel_syntax noprefix
	.text
	.globl	sieve
	.type	sieve, @function
sieve:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 88
	.cfi_offset 3, -24
	mov	QWORD PTR -88[rbp], rdi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	rax, QWORD PTR -88[rbp]
	add	rax, 1
	lea	rdx, -1[rax]
	mov	QWORD PTR -56[rbp], rdx
	mov	rdx, rax
	mov	r10, rdx
	mov	r11d, 0
	mov	rdx, rax
	mov	r8, rdx
	mov	r9d, 0
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	edi, 16
	mov	edx, 0
	div	rdi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L2:
	cmp	rsp, rdx
	je	.L3
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L2
.L3:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L4
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L4:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR 8[rax], 1
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR 12[rax], 1
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, QWORD PTR -88[rbp]
	movq	rax, xmm1
	movq	xmm0, rax
	call	sqrt@PLT
	movq	rax, xmm0
	movq	xmm0, rax
	call	ceil@PLT
	cvttsd2si	rax, xmm0
	mov	QWORD PTR -40[rbp], rax
	mov	QWORD PTR -72[rbp], 5
	jmp	.L5
.L6:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	mov	DWORD PTR [rax+rdx*4], 0
	add	QWORD PTR -72[rbp], 1
.L5:
	mov	rax, QWORD PTR -72[rbp]
	cmp	rax, QWORD PTR -88[rbp]
	jl	.L6
	mov	QWORD PTR -72[rbp], 1
	jmp	.L7
.L14:
	mov	QWORD PTR -80[rbp], 1
	jmp	.L8
.L13:
	mov	rax, QWORD PTR -72[rbp]
	imul	rax, rax
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -80[rbp]
	imul	rax, rax
	add	rax, rdx
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -88[rbp]
	jg	.L9
	mov	rcx, QWORD PTR -32[rbp]
	movabs	rdx, 3074457345618258603
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax
	mov	rsi, rcx
	sar	rsi, 63
	sub	rax, rsi
	mov	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	sub	rcx, rax
	mov	rdx, rcx
	cmp	rdx, 1
	je	.L10
	mov	rcx, QWORD PTR -32[rbp]
	movabs	rdx, 3074457345618258603
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax
	mov	rsi, rcx
	sar	rsi, 63
	sub	rax, rsi
	mov	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	sub	rcx, rax
	mov	rdx, rcx
	cmp	rdx, 5
	jne	.L9
.L10:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax+rdx*4], 1
.L9:
	mov	rax, QWORD PTR -72[rbp]
	imul	rax, rax
	mov	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -80[rbp]
	imul	rax, rax
	add	rax, rdx
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -88[rbp]
	jg	.L11
	mov	rcx, QWORD PTR -32[rbp]
	movabs	rdx, 3074457345618258603
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax
	mov	rsi, rcx
	sar	rsi, 63
	sub	rax, rsi
	mov	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	sub	rcx, rax
	mov	rdx, rcx
	cmp	rdx, 7
	jne	.L11
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax+rdx*4], 1
.L11:
	mov	rax, QWORD PTR -72[rbp]
	cmp	rax, QWORD PTR -80[rbp]
	jle	.L12
	mov	rax, QWORD PTR -72[rbp]
	imul	rax, rax
	mov	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -80[rbp]
	imul	rax, rax
	mov	rcx, rax
	mov	rax, rdx
	sub	rax, rcx
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -88[rbp]
	jg	.L12
	mov	rcx, QWORD PTR -32[rbp]
	movabs	rdx, 3074457345618258603
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax
	mov	rsi, rcx
	sar	rsi, 63
	sub	rax, rsi
	mov	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	sub	rcx, rax
	mov	rdx, rcx
	cmp	rdx, 11
	jne	.L12
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax+rdx*4], 1
.L12:
	add	QWORD PTR -80[rbp], 1
.L8:
	mov	rax, QWORD PTR -80[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	jle	.L13
	add	QWORD PTR -72[rbp], 1
.L7:
	mov	rax, QWORD PTR -72[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	jle	.L14
	mov	QWORD PTR -72[rbp], 5
	jmp	.L15
.L19:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR [rax+rdx*4]
	test	eax, eax
	je	.L16
	mov	rax, QWORD PTR -72[rbp]
	imul	rax, rax
	mov	QWORD PTR -80[rbp], rax
	jmp	.L17
.L18:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -80[rbp]
	mov	DWORD PTR [rax+rdx*4], 0
	mov	rax, QWORD PTR -72[rbp]
	add	QWORD PTR -80[rbp], rax
.L17:
	mov	rax, QWORD PTR -80[rbp]
	cmp	rax, QWORD PTR -88[rbp]
	jle	.L18
.L16:
	add	QWORD PTR -72[rbp], 1
.L15:
	mov	rax, QWORD PTR -72[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	jle	.L19
	mov	QWORD PTR -72[rbp], 2
	jmp	.L20
.L24:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR [rax+rdx*4]
	test	eax, eax
	je	.L21
	add	QWORD PTR -64[rbp], 1
.L21:
	mov	rax, QWORD PTR -64[rbp]
	cmp	rax, QWORD PTR -96[rbp]
	jne	.L22
	mov	rax, QWORD PTR -72[rbp]
	jmp	.L23
.L22:
	add	QWORD PTR -72[rbp], 1
.L20:
	mov	rax, QWORD PTR -72[rbp]
	cmp	rax, QWORD PTR -88[rbp]
	jle	.L24
	mov	rax, QWORD PTR -88[rbp]
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -96[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	sieve
.L23:
	mov	rsp, rbx
	mov	rdi, QWORD PTR -24[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	sieve, .-sieve
	.section	.rodata
.LC0:
	.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
	mov	esi, 10001
	mov	edi, 1
	call	sieve
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	pop	rbp
	.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	"995534.c"
	.text
	.global	__aeabi_i2d
	.global	__aeabi_d2iz
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sieve
	.syntax unified
	.arm
	.fpu softvfp
	.type	sieve, %function
sieve:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-48]
	add	ip, r3, #1
	sub	r3, ip, #1
	str	r3, [fp, #-32]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	mov	r2, #1
	str	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	mov	r2, #1
	str	r2, [r3, #12]
	ldr	r0, [fp, #-48]
	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	ceil
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-24]
	mov	r3, #5
	str	r3, [fp, #-40]
	b	.L2
.L3:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-40]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L2:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	blt	.L3
	mov	r3, #1
	str	r3, [fp, #-40]
	b	.L4
.L11:
	mov	r3, #1
	str	r3, [fp, #-44]
	b	.L5
.L10:
	ldr	r3, [fp, #-40]
	mov	r2, r3
	mul	r2, r3, r2
	mov	r3, r2
	lsl	r2, r3, #2
	ldr	r3, [fp, #-44]
	mov	r1, r3
	mul	r1, r3, r1
	mov	r3, r1
	add	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	bgt	.L6
	ldr	r1, [fp, #-20]
	ldr	r3, .L24+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	cmp	r2, #1
	beq	.L7
	ldr	r1, [fp, #-20]
	ldr	r3, .L24+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	cmp	r2, #5
	bne	.L6
.L7:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-20]
	mov	r1, #1
	str	r1, [r3, r2, lsl #2]
.L6:
	ldr	r3, [fp, #-40]
	mul	r2, r3, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r2, r3, r2
	ldr	r3, [fp, #-44]
	mov	r1, r3
	mul	r1, r3, r1
	mov	r3, r1
	add	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	bgt	.L8
	ldr	r1, [fp, #-20]
	ldr	r3, .L24+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	cmp	r2, #7
	bne	.L8
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-20]
	mov	r1, #1
	str	r1, [r3, r2, lsl #2]
.L8:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	ble	.L9
	ldr	r3, [fp, #-40]
	mul	r2, r3, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r2, r3, r2
	ldr	r3, [fp, #-44]
	mov	r1, r3
	mul	r1, r3, r1
	mov	r3, r1
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	bgt	.L9
	ldr	r1, [fp, #-20]
	ldr	r3, .L24+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	cmp	r2, #11
	bne	.L9
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-20]
	mov	r1, #1
	str	r1, [r3, r2, lsl #2]
.L9:
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L5:
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	ble	.L10
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L4:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	ble	.L11
	mov	r3, #5
	str	r3, [fp, #-40]
	b	.L12
.L16:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-40]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	beq	.L13
	ldr	r3, [fp, #-40]
	mov	r2, r3
	mul	r2, r3, r2
	mov	r3, r2
	str	r3, [fp, #-44]
	b	.L14
.L15:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-44]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	str	r3, [fp, #-44]
.L14:
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	ble	.L15
.L13:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L12:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	ble	.L16
	mov	r3, #2
	str	r3, [fp, #-40]
	b	.L17
.L21:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-40]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L18:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	bne	.L19
	ldr	r3, [fp, #-40]
	b	.L20
.L19:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L17:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	ble	.L21
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #1
	ldr	r1, [fp, #-52]
	mov	r0, r3
	bl	sieve
	mov	r3, r0
.L20:
	mov	sp, r4
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC0
	.word	715827883
	.size	sieve, .-sieve
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%d\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	r1, .L27
	mov	r0, #1
	bl	sieve
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L27+4
	bl	printf
	nop
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	10001
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
