	.file	"120089.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"\nEnter string:"
.LC1:
	.string	"\nEnter indices:"
.LC2:
	.string	"%d %d"
.LC3:
	.string	"Unable to create pipe I "
.LC4:
	.string	"Unable to create pipe 2 "
	.align 8
.LC5:
	.string	"In Parent: Writing to pipe I - string is %s\n"
	.align 8
.LC6:
	.string	"In Parent: Reading from pipe 2 - sub string is %s\n"
	.align 8
.LC7:
	.string	"In Child: Reading from pipe I \342\200\223 string is %s\n"
.LC8:
	.string	"wrong indices"
	.align 8
.LC9:
	.string	"In Child:Writing to pipe 2 \342\200\223 sub string is %s\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, 152
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rax, -80[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdx, -148[rbp]
	lea	rax, -152[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -128[rbp]
	mov	rdi, rax
	call	pipe@PLT
	mov	DWORD PTR -140[rbp], eax
	cmp	DWORD PTR -140[rbp], -1
	jne	.L2
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L6
.L2:
	lea	rax, -120[rbp]
	mov	rdi, rax
	call	pipe@PLT
	mov	DWORD PTR -136[rbp], eax
	cmp	DWORD PTR -136[rbp], -1
	jne	.L4
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L6
.L4:
	call	fork@PLT
	mov	DWORD PTR -132[rbp], eax
	cmp	DWORD PTR -132[rbp], 0
	jle	.L5
	mov	eax, DWORD PTR -128[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -116[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rax, -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -124[rbp]
	lea	rcx, -80[rbp]
	mov	edx, 21
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -120[rbp]
	lea	rcx, -48[rbp]
	mov	edx, 20
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	lea	rdx, -48[rbp]
	lea	rax, -80[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L6
.L5:
	mov	eax, DWORD PTR -124[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -120[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -128[rbp]
	lea	rcx, -112[rbp]
	mov	edx, 20
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	lea	rax, -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -152[rbp]
	mov	eax, DWORD PTR -148[rbp]
	cmp	edx, eax
	jle	.L7
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L7:
	mov	eax, DWORD PTR -148[rbp]
	movsx	rbx, eax
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jbe	.L8
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -152[rbp]
	mov	DWORD PTR -144[rbp], eax
	jmp	.L9
.L10:
	mov	edx, DWORD PTR -152[rbp]
	mov	eax, DWORD PTR -144[rbp]
	sub	eax, edx
	mov	ecx, eax
	mov	eax, DWORD PTR -144[rbp]
	cdqe
	movzx	edx, BYTE PTR -112[rbp+rax]
	movsx	rax, ecx
	mov	BYTE PTR -48[rbp+rax], dl
	add	DWORD PTR -144[rbp], 1
.L9:
	mov	eax, DWORD PTR -148[rbp]
	cmp	DWORD PTR -144[rbp], eax
	jle	.L10
	mov	edx, DWORD PTR -152[rbp]
	mov	eax, DWORD PTR -144[rbp]
	sub	eax, edx
	cdqe
	mov	BYTE PTR -48[rbp+rax], 0
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -116[rbp]
	lea	rcx, -48[rbp]
	mov	edx, 21
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, 0
.L6:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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	"120089.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012Enter string:\000"
	.align	2
.LC1:
	.ascii	"\012Enter indices:\000"
	.align	2
.LC2:
	.ascii	"%d %d\000"
	.align	2
.LC3:
	.ascii	"Unable to create pipe I \000"
	.align	2
.LC4:
	.ascii	"Unable to create pipe 2 \000"
	.align	2
.LC5:
	.ascii	"In Parent: Writing to pipe I - string is %s\012\000"
	.align	2
.LC6:
	.ascii	"In Parent: Reading from pipe 2 - sub string is %s\012"
	.ascii	"\000"
	.align	2
.LC7:
	.ascii	"In Child: Reading from pipe I \342\200\223 string i"
	.ascii	"s %s\012\000"
	.align	2
.LC8:
	.ascii	"wrong indices\000"
	.align	2
.LC9:
	.ascii	"In Child:Writing to pipe 2 \342\200\223 sub string "
	.ascii	"is %s\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L12+4
	bl	puts
	sub	r3, fp, #48
	mov	r0, r3
	bl	gets
	ldr	r0, .L12+8
	bl	puts
	sub	r2, fp, #104
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, .L12+12
	bl	__isoc99_scanf
	sub	r3, fp, #84
	mov	r0, r3
	bl	pipe
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-96]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L12+16
	bl	puts
	mov	r3, #1
	b	.L6
.L2:
	sub	r3, fp, #76
	mov	r0, r3
	bl	pipe
	str	r0, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L12+20
	bl	puts
	mov	r3, #1
	b	.L6
.L4:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-88]
	ldr	r3, [fp, #-88]
	cmp	r3, #0
	ble	.L5
	ldr	r3, [fp, #-84]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-72]
	mov	r0, r3
	bl	close
	sub	r3, fp, #48
	mov	r1, r3
	ldr	r0, .L12+24
	bl	printf
	ldr	r3, [fp, #-80]
	sub	r1, fp, #48
	mov	r2, #21
	mov	r0, r3
	bl	write
	ldr	r3, [fp, #-76]
	sub	r1, fp, #28
	mov	r2, #20
	mov	r0, r3
	bl	read
	sub	r2, fp, #28
	sub	r3, fp, #48
	mov	r1, r2
	mov	r0, r3
	bl	strcat
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L12+28
	bl	printf
	mov	r3, #0
	b	.L6
.L5:
	ldr	r3, [fp, #-80]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-76]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-84]
	sub	r1, fp, #68
	mov	r2, #20
	mov	r0, r3
	bl	read
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, .L12+32
	bl	printf
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-104]
	cmp	r2, r3
	ble	.L7
	ldr	r0, .L12+36
	bl	puts
	mov	r0, #0
	bl	exit
.L7:
	sub	r3, fp, #68
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	ldr	r2, [fp, #-104]
	cmp	r3, r2
	bcs	.L8
	ldr	r0, .L12+36
	bl	puts
	mov	r0, #0
	bl	exit
.L8:
	ldr	r3, [fp, #-108]
	str	r3, [fp, #-100]
	b	.L9
.L10:
	ldr	r3, [fp, #-108]
	ldr	r2, [fp, #-100]
	sub	r3, r2, r3
	sub	r1, fp, #68
	ldr	r2, [fp, #-100]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	sub	r1, fp, #4
	add	r3, r1, r3
	strb	r2, [r3, #-24]
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L9:
	ldr	r3, [fp, #-104]
	ldr	r2, [fp, #-100]
	cmp	r2, r3
	ble	.L10
	ldr	r3, [fp, #-108]
	ldr	r2, [fp, #-100]
	sub	r3, r2, r3
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-24]
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L12+40
	bl	printf
	ldr	r3, [fp, #-72]
	sub	r1, fp, #28
	mov	r2, #21
	mov	r0, r3
	bl	write
	mov	r3, #0
.L6:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC10
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
