	.file	"143069.c"
	.intel_syntax noprefix
	.text
	.globl	printtab
	.type	printtab, @function
printtab:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L3:
	mov	edi, 9
	call	putchar@PLT
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jle	.L3
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	printtab, .-printtab
	.section	.rodata
	.align 8
.LC0:
	.string	"PPID = %i PID = %i LEVEL = %i\n"
.LC1:
	.string	"recursive fork"
	.text
	.globl	child_process
	.type	child_process, @function
child_process:
.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, 40
	.cfi_offset 3, -24
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -40[rbp]
	jne	.L5
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, 1
	mov	edi, eax
	call	printtab
	call	getpid@PLT
	mov	ebx, eax
	call	getppid@PLT
	mov	esi, eax
	mov	eax, DWORD PTR -36[rbp]
	mov	ecx, eax
	mov	edx, ebx
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
	mov	edi, 0
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, 1
	mov	edi, eax
	call	printtab
	call	getpid@PLT
	mov	ebx, eax
	call	getppid@PLT
	mov	esi, eax
	mov	eax, DWORD PTR -36[rbp]
	mov	ecx, eax
	mov	edx, ebx
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -24[rbp], 0
	jmp	.L6
.L9:
	call	fork@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jns	.L7
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, -3
	call	exit@PLT
.L7:
	cmp	DWORD PTR -20[rbp], 0
	jne	.L8
	add	DWORD PTR -36[rbp], 1
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, edx
	mov	edi, eax
	call	child_process
	mov	edi, 1
	call	sleep@PLT
	mov	edi, 0
	call	exit@PLT
.L8:
	mov	edi, 0
	call	wait@PLT
	add	DWORD PTR -24[rbp], 1
.L6:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jle	.L9
	nop
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	child_process, .-child_process
	.section	.rodata
.LC2:
	.string	"usage: %s number"
	.align 8
.LC3:
	.string	"%s: the parameter must be a positive integer number"
	.text
	.globl	main
	.type	main, @function
main:
.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 2
	je	.L11
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L12
.L11:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jg	.L13
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -2
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	mov	edi, 0
	call	child_process
	mov	eax, 0
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"143069.c"
	.text
	.align	2
	.global	printtab
	.syntax unified
	.arm
	.fpu softvfp
	.type	printtab, %function
printtab:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	mov	r0, #9
	bl	putchar
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	ble	.L3
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	printtab, .-printtab
	.section	.rodata
	.align	2
.LC0:
	.ascii	"PPID = %i PID = %i LEVEL = %i\012\000"
	.align	2
.LC1:
	.ascii	"recursive fork\000"
	.text
	.align	2
	.global	child_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	child_process, %function
child_process:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bne	.L5
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	mov	r0, r3
	bl	printtab
	bl	getppid
	mov	r4, r0
	bl	getpid
	mov	r2, r0
	ldr	r3, [fp, #-24]
	mov	r1, r4
	ldr	r0, .L10
	bl	printf
	mov	r0, #1
	bl	sleep
	mov	r0, #0
	bl	exit
.L5:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	mov	r0, r3
	bl	printtab
	bl	getppid
	mov	r4, r0
	bl	getpid
	mov	r2, r0
	ldr	r3, [fp, #-24]
	mov	r1, r4
	ldr	r0, .L10
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L6
.L9:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L10+4
	bl	perror
	mvn	r0, #2
	bl	exit
.L7:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	child_process
	mov	r0, #1
	bl	sleep
	mov	r0, #0
	bl	exit
.L8:
	mov	r0, #0
	bl	wait
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L6:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	ble	.L9
	nop
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	.LC1
	.size	child_process, .-child_process
	.section	.rodata
	.align	2
.LC2:
	.ascii	"usage: %s number\000"
	.align	2
.LC3:
	.ascii	"%s: the parameter must be a positive integer number"
	.ascii	"\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	beq	.L13
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L16
	bl	printf
	mvn	r3, #0
	b	.L14
.L13:
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L15
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L16+4
	bl	printf
	mvn	r3, #1
	b	.L14
.L15:
	ldr	r1, [fp, #-8]
	mov	r0, #0
	bl	child_process
	mov	r3, #0
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
