	.file	"848010.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"./fifo_ptl"
.LC1:
	.string	"./fifo_ltp"
.LC2:
	.string	"mkfifo"
.LC3:
	.string	"hello,i am peter"
.LC4:
	.string	"open"
.LC5:
	.string	"fork"
.LC6:
	.string	"peter:"
.LC7:
	.string	"\rlucy:%s\n"
.LC8:
	.string	"peter: "
	.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, 1088
	mov	DWORD PTR -1076[rbp], edi
	mov	QWORD PTR -1088[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1064[rbp], 0
	mov	DWORD PTR -1060[rbp], 0
	mov	esi, 438
	lea	rdi, .LC0[rip]
	call	mkfifo@PLT
	mov	DWORD PTR -1064[rbp], eax
	mov	esi, 438
	lea	rdi, .LC1[rip]
	call	mkfifo@PLT
	mov	DWORD PTR -1060[rbp], eax
	mov	eax, DWORD PTR -1064[rbp]
	shr	eax, 31
	mov	edx, eax
	mov	eax, DWORD PTR -1060[rbp]
	shr	eax, 31
	or	eax, edx
	test	al, al
	je	.L2
	lea	rdi, .LC2[rip]
	call	perror@PLT
.L2:
	mov	DWORD PTR -1056[rbp], 0
	mov	DWORD PTR -1052[rbp], 0
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	esi, 1
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -1056[rbp], eax
	mov	esi, 0
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -1052[rbp], eax
	mov	eax, DWORD PTR -1056[rbp]
	shr	eax, 31
	mov	edx, eax
	mov	eax, DWORD PTR -1052[rbp]
	shr	eax, 31
	or	eax, edx
	test	al, al
	je	.L3
	lea	rdi, .LC4[rip]
	call	perror@PLT
.L3:
	call	fork@PLT
	mov	DWORD PTR -1048[rbp], eax
	cmp	DWORD PTR -1048[rbp], 0
	jns	.L4
	lea	rdi, .LC5[rip]
	call	perror@PLT
.L4:
	cmp	DWORD PTR -1048[rbp], 0
	jne	.L5
.L6:
	mov	QWORD PTR -1040[rbp], 0
	mov	QWORD PTR -1032[rbp], 0
	lea	rdx, -1024[rbp]
	mov	eax, 0
	mov	ecx, 126
	mov	rdi, rdx
	rep stosq
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 1
	mov	BYTE PTR -1040[rbp+rax], 0
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1056[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	jmp	.L6
.L5:
	mov	QWORD PTR -1040[rbp], 0
	mov	QWORD PTR -1032[rbp], 0
	lea	rdx, -1024[rbp]
	mov	eax, 0
	mov	ecx, 126
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -1044[rbp], 0
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 128
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1052[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1044[rbp], eax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	cmp	DWORD PTR -1044[rbp], 0
	jne	.L5
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	"848010.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"./fifo_ptl\000"
	.align	2
.LC1:
	.ascii	"./fifo_ltp\000"
	.align	2
.LC2:
	.ascii	"mkfifo\000"
	.align	2
.LC3:
	.ascii	"hello,i am peter\000"
	.align	2
.LC4:
	.ascii	"open\000"
	.align	2
.LC5:
	.ascii	"fork\000"
	.align	2
.LC6:
	.ascii	"peter:\000"
	.align	2
.LC7:
	.ascii	"\015lucy:%s\012\000"
	.align	2
.LC8:
	.ascii	"peter: \000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1064
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	sub	sp, sp, #8
	str	r0, [fp, #-1064]
	str	r1, [fp, #-1068]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1056]
	mov	r3, #0
	str	r3, [fp, #-1052]
	ldr	r1, .L11+4
	ldr	r0, .L11+8
	bl	mkfifo
	str	r0, [fp, #-1056]
	ldr	r1, .L11+4
	ldr	r0, .L11+12
	bl	mkfifo
	str	r0, [fp, #-1052]
	ldr	r3, [fp, #-1056]
	lsr	r3, r3, #31
	and	r2, r3, #255
	ldr	r3, [fp, #-1052]
	lsr	r3, r3, #31
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L2
	ldr	r0, .L11+16
	bl	perror
.L2:
	mov	r3, #0
	str	r3, [fp, #-1048]
	mov	r3, #0
	str	r3, [fp, #-1044]
	ldr	r0, .L11+20
	bl	puts
	mov	r1, #1
	ldr	r0, .L11+8
	bl	open
	str	r0, [fp, #-1048]
	mov	r1, #0
	ldr	r0, .L11+12
	bl	open
	str	r0, [fp, #-1044]
	ldr	r3, [fp, #-1048]
	lsr	r3, r3, #31
	and	r2, r3, #255
	ldr	r3, [fp, #-1044]
	lsr	r3, r3, #31
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L3
	ldr	r0, .L11+24
	bl	perror
.L3:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L11+28
	bl	perror
.L4:
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	bne	.L5
.L6:
	mov	r3, #0
	str	r3, [fp, #-1032]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	mov	r2, #1020
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r0, .L11+32
	bl	printf
	ldr	r3, .L11+36
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-1028]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1048]
	bl	write
	b	.L6
.L5:
	mov	r3, #0
	str	r3, [fp, #-1032]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	mov	r2, #1020
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-1036]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	mov	r3, #1024
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1044]
	bl	read
	str	r0, [fp, #-1036]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L11+40
	bl	printf
	ldr	r0, .L11+44
	bl	printf
	ldr	r3, .L11+48
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bne	.L5
	mov	r3, #0
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC9
	.word	438
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	stdin
	.word	.LC7
	.word	.LC8
	.word	stdout
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
