	.file	"849525.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"This program calculates the square root of the given number.\n"
	.align 8
.LC1:
	.string	"Enter an integer number between 0 and %d : "
.LC2:
	.string	"%d"
	.align 8
.LC3:
	.string	"Enter the number of iterations : "
.LC4:
	.string	"The predecessor is %d.\n"
	.align 8
.LC5:
	.string	"The estimated squareroot of %d is %5.3f.\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 1
	lea	rdi, .LC0[rip]
	call	puts@PLT
.L2:
	mov	esi, 100
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	findPredecessor
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -16[rbp]
	mov	ecx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	estimateSqrt
	movq	rax, xmm0
	mov	edx, DWORD PTR -20[rbp]
	movq	xmm0, rax
	mov	esi, edx
	lea	rdi, .LC5[rip]
	mov	eax, 1
	call	printf@PLT
	jmp	.L2
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	findPredecessor
	.type	findPredecessor, @function
findPredecessor:
.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	.L5
.L6:
	add	DWORD PTR -4[rbp], 1
.L5:
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, eax
	cmp	DWORD PTR -20[rbp], eax
	jge	.L6
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 1
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	findPredecessor, .-findPredecessor
	.globl	estimateSqrt
	.type	estimateSqrt, @function
estimateSqrt:
.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, 48
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -28[rbp], edx
	mov	DWORD PTR -16[rbp], 0
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L9
.L12:
	pxor	xmm3, xmm3
	cvtsi2sd	xmm3, DWORD PTR -20[rbp]
	movsd	QWORD PTR -40[rbp], xmm3
	call	rand@PLT
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	movsd	xmm1, QWORD PTR .LC6[rip]
	divsd	xmm0, xmm1
	addsd	xmm0, QWORD PTR -40[rbp]
	movsd	QWORD PTR -8[rbp], xmm0
	movsd	xmm0, QWORD PTR -8[rbp]
	movapd	xmm1, xmm0
	mulsd	xmm1, xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, DWORD PTR -24[rbp]
	comisd	xmm0, xmm1
	jbe	.L10
	add	DWORD PTR -16[rbp], 1
.L10:
	add	DWORD PTR -12[rbp], 1
.L9:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L12
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, DWORD PTR -20[rbp]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, DWORD PTR -16[rbp]
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, DWORD PTR -28[rbp]
	divsd	xmm0, xmm2
	addsd	xmm0, xmm1
	movq	rax, xmm0
	movq	xmm0, rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	estimateSqrt, .-estimateSqrt
	.section	.rodata
	.align 8
.LC6:
	.long	0
	.long	1105199104
	.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	"849525.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"This program calculates the square root of the give"
	.ascii	"n number.\012\000"
	.align	2
.LC1:
	.ascii	"Enter an integer number between 0 and %d : \000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"Enter the number of iterations : \000"
	.align	2
.LC4:
	.ascii	"The predecessor is %d.\012\000"
	.align	2
.LC5:
	.ascii	"The estimated squareroot of %d is %5.3f.\012\000"
	.align	2
.LC6:
	.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	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #1
	str	r3, [fp, #-24]
	ldr	r0, .L4+4
	bl	puts
.L2:
	mov	r1, #100
	ldr	r0, .L4+8
	bl	printf
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L4+12
	bl	__isoc99_scanf
	ldr	r0, .L4+16
	bl	printf
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L4+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-28]
	mov	r0, r3
	bl	findPredecessor
	str	r0, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, .L4+20
	bl	printf
	ldr	r4, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	estimateSqrt
	mov	r2, r0
	mov	r3, r1
	mov	r1, r4
	ldr	r0, .L4+24
	bl	printf
	b	.L2
.L5:
	.align	2
.L4:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.align	2
	.global	findPredecessor
	.syntax unified
	.arm
	.fpu softvfp
	.type	findPredecessor, %function
findPredecessor:
	@ 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	.L7
.L8:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L7:
	ldr	r3, [fp, #-8]
	mov	r2, r3
	mul	r2, r3, r2
	mov	r3, r2
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bge	.L8
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	findPredecessor, .-findPredecessor
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.global	__aeabi_dadd
	.global	__aeabi_dmul
	.global	__aeabi_dcmplt
	.align	2
	.global	estimateSqrt
	.syntax unified
	.arm
	.fpu softvfp
	.type	estimateSqrt, %function
estimateSqrt:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #32
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L11
.L14:
	ldr	r0, [fp, #-40]
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	bl	rand
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L17
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r0, [fp, #-44]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L12:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L11:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	blt	.L14
	ldr	r0, [fp, #-40]
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-36]
	bl	__aeabi_i2d
	mov	r6, r0
	mov	r7, r1
	ldr	r0, [fp, #-48]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L18:
	.align	2
.L17:
	.word	1105199104
	.size	estimateSqrt, .-estimateSqrt
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
