	.file	"352848.c"
	.intel_syntax noprefix
	.text
	.globl	fibCacheRec
	.type	fibCacheRec, @function
fibCacheRec:
.LFB6:
	.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, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L2
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	fibCacheRec
	mov	rbx, rax
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, -2[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	fibCacheRec
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	sal	rax, 3
	lea	rcx, -8[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	add	rdx, rbx
	mov	QWORD PTR [rax], rdx
.L2:
	mov	rax, QWORD PTR -24[rbp]
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fibCacheRec, .-fibCacheRec
	.globl	fibCache
	.type	fibCache, @function
fibCache:
.LFB7:
	.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, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 1
	cmp	rax, 3
	ja	.L5
	mov	eax, 1
	jmp	.L6
.L5:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, rax
	sub	rdx, 1
	mov	QWORD PTR -40[rbp], rdx
	mov	r10, rax
	mov	r11d, 0
	mov	r8, rax
	mov	r9d, 0
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L7:
	cmp	rsp, rdx
	je	.L8
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L7
.L8:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L9
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L9:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], 1
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR 8[rax], 1
	mov	QWORD PTR -48[rbp], 2
	jmp	.L10
.L11:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	QWORD PTR [rax+rdx*8], 0
	add	QWORD PTR -48[rbp], 1
.L10:
	mov	rax, QWORD PTR -48[rbp]
	cmp	rax, QWORD PTR -56[rbp]
	jb	.L11
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fibCacheRec
.L6:
	mov	rsp, rbx
	mov	rsi, QWORD PTR -24[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fibCache, .-fibCache
	.globl	goldenRatio
	.type	goldenRatio, @function
goldenRatio:
.LFB8:
	.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, 72
	.cfi_offset 3, -24
	mov	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, 1
	cmp	rax, 3
	ja	.L15
	movsd	xmm1, QWORD PTR .LC0[rip]
	jmp	.L16
.L15:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, rax
	sub	rdx, 1
	mov	QWORD PTR -48[rbp], rdx
	mov	r10, rax
	mov	r11d, 0
	mov	r8, rax
	mov	r9d, 0
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L17:
	cmp	rsp, rdx
	je	.L18
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L17
.L18:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L19
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L19:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], 1
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 8[rax], 1
	mov	QWORD PTR -56[rbp], 2
	jmp	.L20
.L21:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax+rdx*8], 0
	add	QWORD PTR -56[rbp], 1
.L20:
	mov	rax, QWORD PTR -56[rbp]
	cmp	rax, QWORD PTR -72[rbp]
	jb	.L21
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fibCacheRec
	test	rax, rax
	js	.L22
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L23
.L22:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L23:
	movsd	QWORD PTR -32[rbp], xmm0
	mov	rax, QWORD PTR -72[rbp]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	fibCacheRec
	test	rax, rax
	js	.L24
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L25
.L24:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L25:
	movsd	xmm1, QWORD PTR -32[rbp]
	divsd	xmm1, xmm0
.L16:
	mov	rsp, rbx
	movq	rax, xmm1
	mov	rsi, QWORD PTR -24[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	movq	xmm0, rax
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	goldenRatio, .-goldenRatio
	.section	.rodata
	.align 8
.LC1:
	.string	"fib(%zu) is %zu, golden ratio %.20g, control %.20g\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -28[rbp], 1
	jmp	.L29
.L30:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtoull@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	goldenRatio
	movq	rax, xmm0
	mov	QWORD PTR -16[rbp], rax
	movsd	xmm0, QWORD PTR -16[rbp]
	addsd	xmm0, xmm0
	movsd	xmm1, QWORD PTR .LC0[rip]
	subsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	movsd	xmm0, QWORD PTR -8[rbp]
	mulsd	xmm0, xmm0
	movsd	QWORD PTR -56[rbp], xmm0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fibCache
	mov	rcx, rax
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	movsd	xmm1, QWORD PTR -56[rbp]
	movq	xmm0, rdx
	mov	rdx, rcx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 2
	call	printf@PLT
	add	DWORD PTR -28[rbp], 1
.L29:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L30
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1072693248
	.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	"352848.c"
	.text
	.align	2
	.global	fibCacheRec
	.syntax unified
	.arm
	.fpu softvfp
	.type	fibCacheRec, %function
fibCacheRec:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	fibCacheRec
	mov	r4, r0
	ldr	r3, [fp, #-16]
	sub	r3, r3, #2
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	fibCacheRec
	mov	r1, r0
	ldr	r3, [fp, #-16]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	add	r2, r4, r1
	str	r2, [r3]
.L2:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	fibCacheRec, .-fibCacheRec
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	fibCache
	.syntax unified
	.arm
	.fpu softvfp
	.type	fibCache, %function
fibCache:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	cmp	r3, #3
	bhi	.L5
	mov	r3, #1
	b	.L6
.L5:
	ldr	ip, [fp, #-32]
	mov	r3, ip
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	lsl	r3, ip, #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, #-20]
	ldr	r3, [fp, #-20]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	mov	r2, #1
	str	r2, [r3, #4]
	mov	r3, #2
	str	r3, [fp, #-28]
	b	.L7
.L8:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-28]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L7:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bcc	.L8
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-32]
	bl	fibCacheRec
	mov	r3, r0
.L6:
	mov	sp, r4
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC0
	.size	fibCache, .-fibCache
	.global	__aeabi_ui2d
	.global	__aeabi_ddiv
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	goldenRatio
	.syntax unified
	.arm
	.fpu softvfp
	.type	goldenRatio, %function
goldenRatio:
	@ 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]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	cmp	r3, #3
	bhi	.L14
	mov	r2, #0
	ldr	r3, .L20+4
	b	.L15
.L14:
	ldr	ip, [fp, #-48]
	mov	r3, ip
	sub	r3, r3, #1
	str	r3, [fp, #-36]
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	lsl	r3, ip, #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, #-32]
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3, #4]
	mov	r3, #2
	str	r3, [fp, #-40]
	b	.L16
.L17:
	ldr	r3, [fp, #-32]
	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]
.L16:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	bcc	.L17
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-48]
	bl	fibCacheRec
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	ldr	r1, [fp, #-32]
	mov	r0, r3
	bl	fibCacheRec
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
.L15:
	mov	sp, r4
	ldr	r1, .L20
	ldr	r0, [r1]
	ldr	r1, [fp, #-16]
	eors	r0, r1, r0
	mov	r1, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC1
	.word	1072693248
	.size	goldenRatio, .-goldenRatio
	.global	__aeabi_dadd
	.global	__aeabi_dsub
	.global	__aeabi_dmul
	.section	.rodata
	.align	2
.LC2:
	.ascii	"fib(%zu) is %zu, golden ratio %.20g, control %.20g\012"
	.ascii	"\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L23
.L24:
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtoull
	mov	r2, r0
	mov	r3, r1
	mov	r3, r2
	str	r3, [fp, #-32]
	ldr	r0, [fp, #-32]
	bl	goldenRatio
	str	r0, [fp, #-28]
	str	r1, [fp, #-24]
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	mov	r2, r0
	mov	r3, r1
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L26
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-32]
	bl	fibCache
	mov	r4, r0
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	mov	r2, r4
	ldr	r1, [fp, #-32]
	ldr	r0, .L26+4
	bl	printf
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L23:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	blt	.L24
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L27:
	.align	2
.L26:
	.word	1072693248
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
