	.file	"97013212.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"no program to execute"
.LC1:
	.string	"fork failed"
.LC2:
	.string	"childs fork failed"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"\t\t"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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, 88
	.cfi_offset 3, -24
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, 1
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -56[rbp], rdx
	movsx	rdx, eax
	mov	r10, rdx
	mov	r11d, 0
	movsx	rdx, eax
	mov	r8, rdx
	mov	r9d, 0
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L2:
	cmp	rsp, rdx
	je	.L3
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L2
.L3:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L4
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L4:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -48[rbp], rax
	mov	DWORD PTR -60[rbp], 1
	mov	DWORD PTR -68[rbp], 1
	cmp	DWORD PTR -84[rbp], 1
	jg	.L5
	mov	edx, 21
	lea	rsi, .LC0[rip]
	mov	edi, 2
	call	write@PLT
	mov	eax, -1
	jmp	.L6
.L5:
	mov	DWORD PTR -64[rbp], 0
	jmp	.L7
.L15:
	call	fork@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], 0
	jns	.L8
	mov	edx, 11
	lea	rsi, .LC1[rip]
	mov	edi, 2
	call	write@PLT
	mov	edi, -1
	call	_exit@PLT
.L8:
	cmp	DWORD PTR -60[rbp], 0
	jne	.L9
.L14:
	call	fork@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], 0
	jns	.L10
	mov	edx, 18
	lea	rsi, .LC2[rip]
	mov	edi, 2
	call	write@PLT
	mov	edi, -1
	call	_exit@PLT
.L10:
	cmp	DWORD PTR -60[rbp], 0
	jne	.L11
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	mov	eax, 0
	call	execlp@PLT
	mov	edi, -1
	call	_exit@PLT
.L11:
	lea	rax, -72[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	eax, DWORD PTR -72[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L14
	mov	eax, DWORD PTR -72[rbp]
	sar	eax, 8
	movzx	eax, al
	test	eax, eax
	jne	.L13
	mov	eax, DWORD PTR -68[rbp]
	jmp	.L6
.L13:
	add	DWORD PTR -68[rbp], 1
	jmp	.L14
.L9:
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR -64[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -60[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
	add	DWORD PTR -64[rbp], 1
.L7:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, 1
	cmp	DWORD PTR -64[rbp], eax
	jl	.L15
	mov	DWORD PTR -64[rbp], 0
	jmp	.L16
.L18:
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR -64[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	lea	rcx, -76[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	mov	eax, DWORD PTR -76[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L17
	mov	eax, DWORD PTR -76[rbp]
	sar	eax, 8
	movzx	edx, al
	lea	rax, -34[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	add	rax, 1
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	mov	edx, 2
	lea	rsi, .LC4[rip]
	mov	edi, 1
	call	write@PLT
	lea	rax, -34[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -34[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
.L17:
	add	DWORD PTR -64[rbp], 1
.L16:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, 1
	cmp	DWORD PTR -64[rbp], eax
	jl	.L18
	mov	eax, 0
.L6:
	mov	rsp, rbx
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"97013212.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"no program to execute\000"
	.align	2
.LC1:
	.ascii	"fork failed\000"
	.align	2
.LC2:
	.ascii	"childs fork failed\000"
	.align	2
.LC3:
	.ascii	"%d\012\000"
	.align	2
.LC4:
	.ascii	"\011\011\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 = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #56
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r5, r3
	ldr	r3, [fp, #-64]
	sub	ip, r3, #1
	sub	r3, ip, #1
	str	r3, [fp, #-40]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-36]
	mov	r3, #1
	str	r3, [fp, #-32]
	mov	r3, #1
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-64]
	cmp	r3, #1
	bgt	.L2
	mov	r2, #21
	ldr	r1, .L18+4
	mov	r0, #2
	bl	write
	mvn	r3, #0
	b	.L3
.L2:
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L4
.L12:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L5
	mov	r2, #11
	ldr	r1, .L18+8
	mov	r0, #2
	bl	write
	mvn	r0, #0
	bl	_exit
.L5:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L6
.L11:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L7
	mov	r2, #18
	ldr	r1, .L18+12
	mov	r0, #2
	bl	write
	mvn	r0, #0
	bl	_exit
.L7:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, r3
	bl	execlp
	mvn	r0, #0
	bl	_exit
.L8:
	sub	r3, fp, #52
	mov	r0, r3
	bl	wait
	ldr	r3, [fp, #-52]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-52]
	asr	r3, r3, #8
	and	r3, r3, #255
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-48]
	b	.L3
.L10:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
	b	.L11
.L6:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-32]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L4:
	ldr	r3, [fp, #-64]
	sub	r3, r3, #1
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L12
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L13
.L15:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-44]
	ldr	r3, [r3, r2, lsl #2]
	sub	r1, fp, #56
	mov	r2, #0
	mov	r0, r3
	bl	waitpid
	ldr	r3, [fp, #-56]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L14
	ldr	r3, [fp, #-56]
	asr	r3, r3, #8
	and	r2, r3, #255
	sub	r3, fp, #28
	ldr	r1, .L18+16
	mov	r0, r3
	bl	sprintf
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r4, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	mov	r0, #1
	bl	write
	mov	r2, #2
	ldr	r1, .L18+20
	mov	r0, #1
	bl	write
	sub	r3, fp, #28
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #28
	mov	r1, r3
	mov	r0, #1
	bl	write
.L14:
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L13:
	ldr	r3, [fp, #-64]
	sub	r3, r3, #1
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L15
	mov	r3, #0
.L3:
	mov	sp, r5
	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, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
