	.file	"52537.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Expected 3 arguments."
.LC1:
	.string	"Error with forking child1."
.LC2:
	.string	"child1"
.LC3:
	.string	"Error executing command N1."
.LC4:
	.string	"Error waiting for chil1."
.LC5:
	.string	"%d -- %d\n"
.LC6:
	.string	"Error forking child2."
.LC7:
	.string	"child2"
.LC8:
	.string	"Error executing command N2."
.LC9:
	.string	"Error waiting for child2."
.LC10:
	.string	"Error forking child3."
.LC11:
	.string	"child3"
.LC12:
	.string	"Error executing command N3."
	.align 8
.LC13:
	.string	"Error while waiting for child3."
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -36[rbp], 4
	je	.L2
	lea	rsi, .LC0[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L2:
	call	fork@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L3
	lea	rsi, .LC1[rip]
	mov	edi, 2
	mov	eax, 0
	call	err@PLT
.L3:
	cmp	DWORD PTR -20[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 0
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	execlp@PLT
	cmp	eax, -1
	jne	.L4
	lea	rsi, .LC3[rip]
	mov	edi, 3
	mov	eax, 0
	call	err@PLT
.L4:
	lea	rax, -24[rbp]
	mov	rdi, rax
	call	wait@PLT
	cmp	eax, -1
	jne	.L5
	lea	rsi, .LC4[rip]
	mov	edi, 4
	mov	eax, 0
	call	err@PLT
.L5:
	mov	eax, DWORD PTR -24[rbp]
	sar	eax, 8
	movzx	edx, al
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	call	fork@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], -1
	jne	.L6
	lea	rsi, .LC6[rip]
	mov	edi, 2
	mov	eax, 0
	call	err@PLT
.L6:
	cmp	DWORD PTR -16[rbp], 0
	jne	.L7
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	edx, 0
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	execlp@PLT
	cmp	eax, -1
	jne	.L7
	lea	rsi, .LC8[rip]
	mov	edi, 3
	mov	eax, 0
	call	err@PLT
.L7:
	lea	rax, -24[rbp]
	mov	rdi, rax
	call	wait@PLT
	cmp	eax, -1
	jne	.L8
	lea	rsi, .LC9[rip]
	mov	edi, 4
	mov	eax, 0
	call	err@PLT
.L8:
	mov	eax, DWORD PTR -24[rbp]
	sar	eax, 8
	movzx	edx, al
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	call	fork@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L9
	lea	rsi, .LC10[rip]
	mov	edi, 2
	mov	eax, 0
	call	err@PLT
.L9:
	cmp	DWORD PTR -12[rbp], 0
	jne	.L10
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	edx, 0
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	execlp@PLT
	cmp	eax, -1
	jne	.L10
	lea	rsi, .LC12[rip]
	mov	edi, 3
	mov	eax, 0
	call	err@PLT
.L10:
	lea	rax, -24[rbp]
	mov	rdi, rax
	call	wait@PLT
	cmp	eax, -1
	jne	.L11
	lea	rsi, .LC13[rip]
	mov	edi, 4
	mov	eax, 0
	call	err@PLT
.L11:
	mov	eax, DWORD PTR -24[rbp]
	sar	eax, 8
	movzx	edx, al
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
	.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	"52537.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Expected 3 arguments.\000"
	.align	2
.LC1:
	.ascii	"Error with forking child1.\000"
	.align	2
.LC2:
	.ascii	"child1\000"
	.align	2
.LC3:
	.ascii	"Error executing command N1.\000"
	.align	2
.LC4:
	.ascii	"Error waiting for chil1.\000"
	.align	2
.LC5:
	.ascii	"%d -- %d\012\000"
	.align	2
.LC6:
	.ascii	"Error forking child2.\000"
	.align	2
.LC7:
	.ascii	"child2\000"
	.align	2
.LC8:
	.ascii	"Error executing command N2.\000"
	.align	2
.LC9:
	.ascii	"Error waiting for child2.\000"
	.align	2
.LC10:
	.ascii	"Error forking child3.\000"
	.align	2
.LC11:
	.ascii	"child3\000"
	.align	2
.LC12:
	.ascii	"Error executing command N3.\000"
	.align	2
.LC13:
	.ascii	"Error while waiting for child3.\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-32]
	cmp	r3, #4
	beq	.L2
	ldr	r1, .L13+4
	mov	r0, #1
	bl	err
.L2:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L3
	ldr	r1, .L13+8
	mov	r0, #2
	bl	err
.L3:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #0
	ldr	r1, .L13+12
	mov	r0, r3
	bl	execlp
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	ldr	r1, .L13+16
	mov	r0, #3
	bl	err
.L4:
	sub	r3, fp, #24
	mov	r0, r3
	bl	wait
	mov	r3, r0
	cmn	r3, #1
	bne	.L5
	ldr	r1, .L13+20
	mov	r0, #4
	bl	err
.L5:
	ldr	r3, [fp, #-24]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, .L13+24
	bl	printf
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L6
	ldr	r1, .L13+28
	mov	r0, #2
	bl	err
.L6:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-36]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, #0
	ldr	r1, .L13+32
	mov	r0, r3
	bl	execlp
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	ldr	r1, .L13+36
	mov	r0, #3
	bl	err
.L7:
	sub	r3, fp, #24
	mov	r0, r3
	bl	wait
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r1, .L13+40
	mov	r0, #4
	bl	err
.L8:
	ldr	r3, [fp, #-24]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, .L13+24
	bl	printf
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L9
	ldr	r1, .L13+44
	mov	r0, #2
	bl	err
.L9:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-36]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r2, #0
	ldr	r1, .L13+48
	mov	r0, r3
	bl	execlp
	mov	r3, r0
	cmn	r3, #1
	bne	.L10
	ldr	r1, .L13+52
	mov	r0, #3
	bl	err
.L10:
	sub	r3, fp, #24
	mov	r0, r3
	bl	wait
	mov	r3, r0
	cmn	r3, #1
	bne	.L11
	ldr	r1, .L13+56
	mov	r0, #4
	bl	err
.L11:
	ldr	r3, [fp, #-24]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, .L13+24
	bl	printf
	mov	r0, #0
	bl	exit
.L14:
	.align	2
.L13:
	.word	.LC14
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
