	.file	"609944.c"
	.intel_syntax noprefix
	.text
	.globl	Fibonacci
	.type	Fibonacci, @function
Fibonacci:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR i.2[rip]
	add	eax, 1
	mov	DWORD PTR i.2[rip], eax
	mov	eax, DWORD PTR i.2[rip]
	cmp	eax, 1
	je	.L2
	mov	eax, DWORD PTR i.2[rip]
	cmp	eax, 2
	jne	.L3
.L2:
	mov	eax, 1
	jmp	.L4
.L3:
	mov	eax, DWORD PTR a.1[rip]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR b.0[rip]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR b.0[rip]
	mov	DWORD PTR a.1[rip], eax
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR b.0[rip], eax
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
.L4:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Fibonacci, .-Fibonacci
	.section	.rodata
.LC0:
	.string	"shared_memory"
.LC1:
	.string	"shm  failed: "
	.align 8
.LC2:
	.string	"connect to share memory failed: %s\n"
.LC3:
	.string	"values:"
.LC4:
	.string	" %d \n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 120
	.cfi_offset 3, -24
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -116[rbp], 1
	jg	.L6
	mov	eax, 1
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -88[rbp], eax
	mov	DWORD PTR -84[rbp], 1111
	mov	edx, 511
	mov	esi, 66
	lea	rdi, .LC0[rip]
	call	shm_open@PLT
	mov	DWORD PTR -80[rbp], eax
	cmp	DWORD PTR -80[rbp], -1
	jne	.L8
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -80[rbp]
	mov	esi, 92
	mov	edi, eax
	call	ftruncate@PLT
	mov	eax, DWORD PTR -80[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 92
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -72[rbp], rax
	cmp	QWORD PTR -72[rbp], -1
	jne	.L9
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	rax, QWORD PTR -72[rbp]
	add	rax, 28
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 32
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, 5
	mov	esi, 1
	mov	rdi, rax
	call	sem_init@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, 0
	mov	esi, 1
	mov	rdi, rax
	call	sem_init@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, 4
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	add	QWORD PTR -72[rbp], 8
	call	fork@PLT
	test	eax, eax
	jne	.L10
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	DWORD PTR -96[rbp], 0
	jmp	.L11
.L12:
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1125899907
	shr	rdx, 32
	sar	edx, 18
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 1000000
	sub	eax, ecx
	mov	edx, eax
	mov	eax, edx
	mov	edi, eax
	call	usleep@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	sem_wait@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -72[rbp]
	lea	rbx, [rdx+rax]
	mov	eax, 0
	call	Fibonacci
	mov	DWORD PTR [rbx], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 2
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	rdx, QWORD PTR -40[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	sem_post@PLT
	add	DWORD PTR -96[rbp], 1
.L11:
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, DWORD PTR -88[rbp]
	jl	.L12
	mov	edi, 0
	call	exit@PLT
.L10:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	DWORD PTR -92[rbp], 0
	jmp	.L13
.L14:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	sem_wait@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -76[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 2
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	rdx, QWORD PTR -32[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	sem_post@PLT
	mov	eax, DWORD PTR -76[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -92[rbp], 1
.L13:
	mov	eax, DWORD PTR -92[rbp]
	cmp	eax, DWORD PTR -88[rbp]
	jl	.L14
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	sem_destroy@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	sem_destroy@PLT
	lea	rax, -100[rbp]
	mov	rdi, rax
	call	wait@PLT
	lea	rdi, .LC0[rip]
	call	shm_unlink@PLT
	mov	eax, 0
.L7:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	i.2
	.comm	i.2,4,4
	.data
	.align 4
	.type	a.1, @object
	.size	a.1, 4
a.1:
	.long	1
	.align 4
	.type	b.0, @object
	.size	b.0, 4
b.0:
	.long	1
	.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	"609944.c"
	.text
	.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
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	ldr	r3, .L5
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L5
	str	r3, [r2]
	ldr	r3, .L5
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L2
	ldr	r3, .L5
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L3
.L2:
	mov	r3, #1
	b	.L4
.L3:
	ldr	r3, .L5+4
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, .L5+8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, .L5+8
	ldr	r3, [r3]
	ldr	r2, .L5+4
	str	r3, [r2]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, .L5+8
	str	r3, [r2]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
.L4:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L6:
	.align	2
.L5:
	.word	i.6561
	.word	a.6562
	.word	b.6563
	.size	Fibonacci, .-Fibonacci
	.section	.rodata
	.align	2
.LC0:
	.ascii	"shared_memory\000"
	.align	2
.LC1:
	.ascii	"shm  failed: \000"
	.align	2
.LC2:
	.ascii	"connect to share memory failed: %s\012\000"
	.align	2
.LC3:
	.ascii	"values:\000"
	.align	2
.LC4:
	.ascii	" %d \012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #76
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-72]
	cmp	r3, #1
	bgt	.L8
	mov	r3, #1
	b	.L9
.L8:
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-56]
	ldr	r3, .L18+4
	str	r3, [fp, #-52]
	ldr	r2, .L18+8
	mov	r1, #66
	ldr	r0, .L18+12
	bl	shm_open
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmn	r3, #1
	bne	.L10
	ldr	r0, .L18+16
	bl	perror
	mov	r0, #1
	bl	exit
.L10:
	mov	r1, #60
	ldr	r0, [fp, #-48]
	bl	ftruncate
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-48]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #60
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmn	r3, #1
	bne	.L11
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L18+20
	bl	printf
	mov	r0, #1
	bl	exit
.L11:
	ldr	r3, [fp, #-44]
	add	r3, r3, #28
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-40]
	add	r3, r3, #16
	str	r3, [fp, #-32]
	mov	r2, #5
	mov	r1, #1
	ldr	r0, [fp, #-36]
	bl	sem_init
	mov	r2, #0
	mov	r1, #1
	ldr	r0, [fp, #-32]
	bl	sem_init
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	str	r3, [fp, #-44]
	bl	fork
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L13
.L14:
	bl	rand
	ldr	r3, .L18+24
	smull	r2, r3, r0, r3
	asr	r2, r3, #18
	asr	r3, r0, #31
	sub	r1, r2, r3
	mov	r2, r1
	lsl	r2, r2, #5
	sub	r2, r2, r1
	lsl	r3, r2, #6
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #6
	sub	r1, r0, r3
	mov	r3, r1
	mov	r0, r3
	bl	usleep
	ldr	r0, [fp, #-36]
	bl	sem_wait
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r4, r2, r3
	bl	Fibonacci
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r3, .L18+28
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r0, [fp, #-32]
	bl	sem_post
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L13:
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L14
	mov	r0, #0
	bl	exit
.L12:
	ldr	r0, .L18+32
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L15
.L16:
	ldr	r0, [fp, #-32]
	bl	sem_wait
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r3, .L18+28
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r0, [fp, #-36]
	bl	sem_post
	ldr	r1, [fp, #-20]
	ldr	r0, .L18+36
	bl	printf
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L15:
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L16
	mov	r0, #10
	bl	putchar
	ldr	r0, [fp, #-36]
	bl	sem_destroy
	ldr	r0, [fp, #-32]
	bl	sem_destroy
	sub	r3, fp, #68
	mov	r0, r3
	bl	wait
	ldr	r0, .L18+12
	bl	shm_unlink
	mov	r3, #0
.L9:
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC5
	.word	1111
	.word	511
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	1125899907
	.word	1717986919
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.local	i.6561
	.comm	i.6561,4,4
	.data
	.align	2
	.type	a.6562, %object
	.size	a.6562, 4
a.6562:
	.word	1
	.align	2
	.type	b.6563, %object
	.size	b.6563, 4
b.6563:
	.word	1
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
