	.file	"204910.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Podaj liczb\304\231, kt\303\263ra ma si\304\231 pojawi\304\207 w ci\304\205gu: "
.LC1:
	.string	"%lf"
	.align 8
.LC2:
	.string	"\nBaza ci\304\205gu to %10.30lf, fib(%lf, n) = %10.30lf\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
	sub	rsp, 32
	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, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR -24[rbp]
	movq	xmm0, rax
	call	findApproximateFibbonaciBaseFor
	movq	rax, xmm0
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	movq	xmm0, rax
	call	findLastFibNLessOrEqlTo
	mov	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	edi, edx
	movq	xmm0, rax
	call	fib
	movq	rdx, xmm0
	movsd	xmm0, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -16[rbp]
	movq	xmm2, rdx
	movapd	xmm1, xmm0
	movq	xmm0, rax
	lea	rdi, .LC2[rip]
	mov	eax, 3
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	fib
	.type	fib, @function
fib:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	movsd	QWORD PTR -40[rbp], xmm0
	mov	DWORD PTR -44[rbp], edi
	pxor	xmm0, xmm0
	movsd	QWORD PTR -24[rbp], xmm0
	movsd	xmm0, QWORD PTR -40[rbp]
	movsd	QWORD PTR -16[rbp], xmm0
	mov	DWORD PTR -28[rbp], 2
	jmp	.L5
.L6:
	movsd	xmm0, QWORD PTR -24[rbp]
	addsd	xmm0, QWORD PTR -16[rbp]
	movsd	QWORD PTR -8[rbp], xmm0
	movsd	xmm0, QWORD PTR -16[rbp]
	movsd	QWORD PTR -24[rbp], xmm0
	movsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR -16[rbp], xmm0
	add	DWORD PTR -28[rbp], 1
.L5:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jle	.L6
	movsd	xmm0, QWORD PTR -16[rbp]
	movq	rax, xmm0
	movq	xmm0, rax
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	fib, .-fib
	.globl	findLastFibNLessOrEqlTo
	.type	findLastFibNLessOrEqlTo, @function
findLastFibNLessOrEqlTo:
.LFB2:
	.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
	movsd	QWORD PTR -24[rbp], xmm0
	pxor	xmm0, xmm0
	ucomisd	xmm0, QWORD PTR -24[rbp]
	jp	.L9
	pxor	xmm0, xmm0
	ucomisd	xmm0, QWORD PTR -24[rbp]
	jne	.L9
	mov	eax, 0
	jmp	.L11
.L9:
	mov	DWORD PTR -4[rbp], 1
	jmp	.L12
.L13:
	add	DWORD PTR -4[rbp], 1
.L12:
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR .LC4[rip]
	mov	edi, edx
	movq	xmm0, rax
	call	fib
	movsd	xmm1, QWORD PTR -24[rbp]
	comisd	xmm1, xmm0
	jnb	.L13
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 1
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	findLastFibNLessOrEqlTo, .-findLastFibNLessOrEqlTo
	.globl	almostEqual
	.type	almostEqual, @function
almostEqual:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	movsd	QWORD PTR -8[rbp], xmm0
	movsd	QWORD PTR -16[rbp], xmm1
	movsd	QWORD PTR -24[rbp], xmm2
	movsd	xmm0, QWORD PTR -8[rbp]
	ucomisd	xmm0, QWORD PTR -16[rbp]
	jp	.L22
	movsd	xmm0, QWORD PTR -8[rbp]
	ucomisd	xmm0, QWORD PTR -16[rbp]
	je	.L16
.L22:
	movsd	xmm0, QWORD PTR -8[rbp]
	subsd	xmm0, QWORD PTR -16[rbp]
	movq	xmm1, QWORD PTR .LC5[rip]
	andpd	xmm1, xmm0
	movsd	xmm0, QWORD PTR -24[rbp]
	comisd	xmm0, xmm1
	jb	.L23
.L16:
	mov	eax, 1
	jmp	.L20
.L23:
	mov	eax, 0
.L20:
	and	eax, 1
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	almostEqual, .-almostEqual
	.section	.rodata
	.align 8
.LC8:
	.string	"Calculation precision limit reached. Futher approximation impossible due to floating point errors"
	.text
	.globl	findApproximateFibbonaciBaseFor
	.type	findApproximateFibbonaciBaseFor, @function
findApproximateFibbonaciBaseFor:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	movsd	QWORD PTR -56[rbp], xmm0
	mov	rax, QWORD PTR -56[rbp]
	movq	xmm0, rax
	call	findLastFibNLessOrEqlTo
	mov	DWORD PTR -36[rbp], eax
	movsd	xmm0, QWORD PTR .LC4[rip]
	movsd	QWORD PTR -32[rbp], xmm0
	movsd	xmm0, QWORD PTR -32[rbp]
	movsd	QWORD PTR -24[rbp], xmm0
	movsd	xmm0, QWORD PTR .LC6[rip]
	movsd	QWORD PTR -16[rbp], xmm0
	jmp	.L25
.L30:
	movsd	xmm1, QWORD PTR -32[rbp]
	movsd	xmm0, QWORD PTR .LC7[rip]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -32[rbp], xmm0
.L29:
	movsd	xmm0, QWORD PTR -24[rbp]
	addsd	xmm0, QWORD PTR -32[rbp]
	ucomisd	xmm0, QWORD PTR -24[rbp]
	jp	.L26
	ucomisd	xmm0, QWORD PTR -24[rbp]
	jne	.L26
	lea	rdi, .LC8[rip]
	call	puts@PLT
	movsd	xmm0, QWORD PTR -24[rbp]
	addsd	xmm0, QWORD PTR -32[rbp]
	jmp	.L28
.L26:
	movsd	xmm0, QWORD PTR -24[rbp]
	addsd	xmm0, QWORD PTR -32[rbp]
	movsd	QWORD PTR -24[rbp], xmm0
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	edi, edx
	movq	xmm0, rax
	call	fib
	movq	rax, xmm0
	mov	QWORD PTR -8[rbp], rax
	movsd	xmm0, QWORD PTR -56[rbp]
	comisd	xmm0, QWORD PTR -8[rbp]
	ja	.L29
	movsd	xmm0, QWORD PTR -24[rbp]
	subsd	xmm0, QWORD PTR -32[rbp]
	movsd	QWORD PTR -24[rbp], xmm0
.L25:
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	edi, edx
	movq	xmm0, rax
	call	fib
	movq	rax, xmm0
	movsd	xmm1, QWORD PTR -16[rbp]
	movsd	xmm0, QWORD PTR -56[rbp]
	movapd	xmm2, xmm1
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	almostEqual
	xor	eax, 1
	test	al, al
	jne	.L30
	movsd	xmm0, QWORD PTR -24[rbp]
	addsd	xmm0, QWORD PTR -32[rbp]
	movsd	QWORD PTR -24[rbp], xmm0
	movsd	xmm0, QWORD PTR -24[rbp]
.L28:
	movq	rax, xmm0
	movq	xmm0, rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	findApproximateFibbonaciBaseFor, .-findApproximateFibbonaciBaseFor
	.section	.rodata
	.align 8
.LC4:
	.long	0
	.long	1072693248
	.align 16
.LC5:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.align 8
.LC6:
	.long	1749644930
	.long	1027352002
	.align 8
.LC7:
	.long	-1717986918
	.long	1069128089
	.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	"204910.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Podaj liczb\304\231, kt\303\263ra ma si\304\231 poj"
	.ascii	"awi\304\207 w ci\304\205gu: \000"
	.align	2
.LC1:
	.ascii	"%lf\000"
	.align	2
.LC2:
	.ascii	"\012Baza ci\304\205gu to %10.30lf, fib(%lf, n) = %1"
	.ascii	"0.30lf\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L4+4
	bl	printf
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L4+8
	bl	__isoc99_scanf
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	findApproximateFibbonaciBaseFor
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	findLastFibNLessOrEqlTo
	mov	r3, r0
	mov	r2, r3
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	fib
	mov	r2, r0
	mov	r3, r1
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	ldr	r0, .L4+12
	bl	printf
	mov	r3, #0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.global	__aeabi_dadd
	.align	2
	.global	fib
	.syntax unified
	.arm
	.fpu softvfp
	.type	fib, %function
fib:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-44]
	str	r1, [fp, #-40]
	str	r2, [fp, #-48]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r3, #2
	str	r3, [fp, #-32]
	b	.L7
.L8:
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L7:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	ble	.L8
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	fib, .-fib
	.global	__aeabi_dcmpeq
	.global	__aeabi_dcmpge
	.align	2
	.global	findLastFibNLessOrEqlTo
	.syntax unified
	.arm
	.fpu softvfp
	.type	findLastFibNLessOrEqlTo, %function
findLastFibNLessOrEqlTo:
	@ 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, #-20]
	str	r1, [fp, #-16]
	mov	r2, #0
	mov	r3, #0
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpeq
	mov	r3, r0
	cmp	r3, #0
	beq	.L17
	mov	r3, #0
	b	.L13
.L17:
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L14
.L15:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L14:
	ldr	r2, [fp, #-8]
	mov	r0, #0
	ldr	r1, .L18
	bl	fib
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpge
	mov	r3, r0
	cmp	r3, #0
	bne	.L15
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	1072693248
	.size	findLastFibNLessOrEqlTo, .-findLastFibNLessOrEqlTo
	.global	__aeabi_dsub
	.align	2
	.global	almostEqual
	.syntax unified
	.arm
	.fpu softvfp
	.type	almostEqual, %function
almostEqual:
	@ args = 8, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpeq
	mov	r3, r0
	cmp	r3, #0
	bne	.L21
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	bic	r5, r3, #-2147483648
	mov	r2, r4
	mov	r3, r5
	ldmib	fp, {r0-r1}
	bl	__aeabi_dcmpge
	mov	r3, r0
	cmp	r3, #0
	beq	.L26
.L21:
	mov	r3, #1
	b	.L24
.L26:
	mov	r3, #0
.L24:
	and	r3, r3, #1
	and	r3, r3, #255
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	almostEqual, .-almostEqual
	.global	__aeabi_dmul
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Calculation precision limit reached. Futher approxi"
	.ascii	"mation impossible due to floating point errors\000"
	.global	__aeabi_dcmplt
	.text
	.align	2
	.global	findApproximateFibbonaciBaseFor
	.syntax unified
	.arm
	.fpu softvfp
	.type	findApproximateFibbonaciBaseFor, %function
findApproximateFibbonaciBaseFor:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-52]
	str	r1, [fp, #-48]
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	bl	findLastFibNLessOrEqlTo
	str	r0, [fp, #-40]
	mov	r2, #0
	ldr	r3, .L36
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r2, .L36+4
	ldr	r3, .L36+8
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L28
.L33:
	ldr	r2, .L36+12
	ldr	r3, .L36+16
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
.L32:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpeq
	mov	r3, r0
	cmp	r3, #0
	beq	.L35
	ldr	r0, .L36+20
	bl	puts
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	b	.L31
.L35:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-40]
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	fib
	str	r0, [fp, #-12]
	str	r1, [fp, #-8]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	bne	.L32
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
.L28:
	ldr	r2, [fp, #-40]
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	fib
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	bl	almostEqual
	mov	r3, r0
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	bne	.L33
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	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}
.L31:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	1072693248
	.word	1749644930
	.word	1027352002
	.word	-1717986918
	.word	1069128089
	.word	.LC4
	.size	findApproximateFibbonaciBaseFor, .-findApproximateFibbonaciBaseFor
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
