	.file	"850585.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Introduceti numarul de fii: "
	.align 8
.LC1:
	.string	"\nEroare: nu ati introdus un numar intreg strict pozitiv! Incercati din nou..."
.LC2:
	.string	"%d"
	.align 8
.LC3:
	.string	"Eroare: nu ati specificat un numar intreg strict pozitiv!\n"
	.align 8
.LC4:
	.string	"Sunt procesul initial cu PID-ul: %d, iar parintele meu este procesul cu PID-ul: %d.\n"
.LC5:
	.string	"Eroare la fork"
	.align 8
.LC6:
	.string	"Sunt procesul fiu %d, avand PID-ul: %d, iar parintele meu este procesul cu PID-ul: %d.\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
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -36[rbp], 0
	cmp	DWORD PTR -52[rbp], 1
	jg	.L2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L3
.L5:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 77
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
.L3:
	lea	rax, -36[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, 1
	je	.L4
	mov	eax, DWORD PTR -36[rbp]
	test	eax, eax
	jle	.L5
	jmp	.L4
.L2:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -36[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 1
	je	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 58
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	call	getppid@PLT
	mov	ebx, eax
	call	getpid@PLT
	mov	edx, ebx
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -32[rbp], 1
	jmp	.L6
.L10:
	call	fork@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], -1
	jne	.L7
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 2
	call	exit@PLT
.L7:
	cmp	DWORD PTR -28[rbp], 0
	jne	.L8
	call	getppid@PLT
	mov	ebx, eax
	call	getpid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -32[rbp]
	mov	ecx, ebx
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -32[rbp]
	jmp	.L11
.L8:
	add	DWORD PTR -32[rbp], 1
.L6:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -32[rbp], eax
	jle	.L10
	mov	eax, 0
.L11:
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.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	"850585.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Introduceti numarul de fii: \000"
	.align	2
.LC1:
	.ascii	"\012Eroare: nu ati introdus un numar intreg strict "
	.ascii	"pozitiv! Incercati din nou...\000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"Eroare: nu ati specificat un numar intreg strict po"
	.ascii	"zitiv!\012\000"
	.align	2
.LC4:
	.ascii	"Sunt procesul initial cu PID-ul: %d, iar parintele "
	.ascii	"meu este procesul cu PID-ul: %d.\012\000"
	.align	2
.LC5:
	.ascii	"Eroare la fork\000"
	.align	2
.LC6:
	.ascii	"Sunt procesul fiu %d, avand PID-ul: %d, iar parinte"
	.ascii	"le meu este procesul cu PID-ul: %d.\012\000"
	.align	2
.LC7:
	.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	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-32]
	cmp	r3, #1
	bgt	.L2
	ldr	r0, .L13+4
	bl	printf
	b	.L3
.L5:
	ldr	r3, .L13+8
	ldr	r3, [r3]
	mov	r2, #77
	mov	r1, #1
	ldr	r0, .L13+12
	bl	fwrite
.L3:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L13+16
	bl	__isoc99_scanf
	mov	r3, r0
	cmp	r3, #1
	beq	.L4
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	ble	.L5
	b	.L4
.L2:
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #28
	ldr	r1, .L13+16
	mov	r0, r3
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #1
	beq	.L4
	ldr	r3, .L13+8
	ldr	r3, [r3]
	mov	r2, #58
	mov	r1, #1
	ldr	r0, .L13+20
	bl	fwrite
	mov	r0, #1
	bl	exit
.L4:
	bl	getpid
	mov	r4, r0
	bl	getppid
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L13+24
	bl	printf
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L6
.L10:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L13+28
	bl	perror
	mov	r0, #2
	bl	exit
.L7:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L8
	bl	getpid
	mov	r4, r0
	bl	getppid
	mov	r3, r0
	mov	r2, r4
	ldr	r1, [fp, #-24]
	ldr	r0, .L13+32
	bl	printf
	ldr	r3, [fp, #-24]
	b	.L11
.L8:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L6:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	ble	.L10
	mov	r3, #0
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC7
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
