	.file	"390904.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"./fibonacci.txt"
.LC1:
	.string	"open()"
.LC2:
	.string	"write()"
.LC3:
	.string	"close"
	.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	lea	rax, .LC0[rip]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 384
	mov	esi, 577
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], -1
	jne	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	DWORD PTR -36[rbp], 39
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	fibonacci
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	ltoa_printf
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	eax, 1
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], -1
	jne	.L3
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -40[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	jne	.L4
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	fibonacci
	.type	fibonacci, @function
fibonacci:
.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, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -20[rbp], edi
	cmp	DWORD PTR -20[rbp], 0
	jne	.L7
	mov	eax, 0
	jmp	.L8
.L7:
	cmp	DWORD PTR -20[rbp], 1
	jne	.L9
	mov	eax, 1
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	edi, eax
	call	fibonacci
	mov	rbx, rax
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 2
	mov	edi, eax
	call	fibonacci
	add	rax, rbx
.L8:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fibonacci, .-fibonacci
	.globl	min_string_len
	.type	min_string_len, @function
min_string_len:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	test	rax, rax
	js	.L11
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, rax
	movq	rax, xmm2
	jmp	.L12
.L11:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
	movq	rax, xmm0
.L12:
	movq	xmm0, rax
	call	log10@PLT
	movq	rax, xmm0
	movq	xmm0, rax
	call	ceil@PLT
	movsd	xmm1, QWORD PTR .LC4[rip]
	addsd	xmm0, xmm1
	cvttsd2si	eax, xmm0
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	min_string_len, .-min_string_len
	.section	.rodata
.LC5:
	.string	"%lu"
	.text
	.globl	ltoa_printf
	.type	ltoa_printf, @function
ltoa_printf:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	min_string_len
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rdx
	lea	rdx, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	ltoa_printf, .-ltoa_printf
	.section	.rodata
	.align 8
.LC4:
	.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	"390904.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"./fibonacci.txt\000"
	.align	2
.LC1:
	.ascii	"open()\000"
	.align	2
.LC2:
	.ascii	"write()\000"
	.align	2
.LC3:
	.ascii	"close\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L6
	str	r3, [fp, #-32]
	mov	r2, #384
	ldr	r1, .L6+4
	ldr	r0, [fp, #-32]
	bl	open
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L6+8
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	mov	r3, #39
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-24]
	bl	fibonacci
	str	r0, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	ltoa_printf
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-28]
	bl	write
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L6+12
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	ldr	r0, [fp, #-28]
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L6+16
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	577
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.align	2
	.global	fibonacci
	.syntax unified
	.arm
	.fpu softvfp
	.type	fibonacci, %function
fibonacci:
	@ 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]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L9
	mov	r3, #0
	b	.L10
.L9:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L11
	mov	r3, #1
	b	.L10
.L11:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	mov	r0, r3
	bl	fibonacci
	mov	r4, r0
	ldr	r3, [fp, #-16]
	sub	r3, r3, #2
	mov	r0, r3
	bl	fibonacci
	mov	r3, r0
	add	r3, r4, r3
.L10:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	fibonacci, .-fibonacci
	.global	__aeabi_ui2d
	.global	__aeabi_dadd
	.global	__aeabi_d2iz
	.align	2
	.global	min_string_len
	.syntax unified
	.arm
	.fpu softvfp
	.type	min_string_len, %function
min_string_len:
	@ 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_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	log10
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	ceil
	mov	r2, #0
	ldr	r3, .L14
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	1072693248
	.size	min_string_len, .-min_string_len
	.section	.rodata
	.align	2
.LC4:
	.ascii	"%lu\000"
	.text
	.align	2
	.global	ltoa_printf
	.syntax unified
	.arm
	.fpu softvfp
	.type	ltoa_printf, %function
ltoa_printf:
	@ 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	min_string_len
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r1, #1
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r2, .L18
	ldr	r0, [fp, #-8]
	bl	snprintf
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC4
	.size	ltoa_printf, .-ltoa_printf
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
