	.file	"20451568.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Failed to create pipe to Chess"
	.align 8
.LC1:
	.string	"Failed to create pipe from Chess"
.LC2:
	.string	"could not fork to GNU Chess"
.LC3:
	.string	"/usr/games/gnuchess"
.LC4:
	.string	"-x"
.LC5:
	.string	"exec failed"
.LC6:
	.string	"I made it"
	.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
	add	rsp, -128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -23[rbp], 1667590211
	mov	WORD PTR -19[rbp], 2667
	mov	BYTE PTR -17[rbp], 0
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	pipe@PLT
	cmp	eax, -1
	jne	.L2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rax, -104[rbp]
	mov	rdi, rax
	call	pipe@PLT
	cmp	eax, -1
	jne	.L3
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	call	fork@PLT
	mov	DWORD PTR -120[rbp], eax
	cmp	DWORD PTR -120[rbp], -1
	jne	.L4
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	cmp	DWORD PTR -120[rbp], 0
	jne	.L5
	mov	eax, DWORD PTR -108[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -112[rbp]
	mov	esi, 0
	mov	edi, eax
	call	dup2@PLT
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
	lea	rax, .LC3[rip]
	mov	QWORD PTR -96[rbp], rax
	lea	rax, .LC4[rip]
	mov	QWORD PTR -88[rbp], rax
	mov	QWORD PTR -80[rbp], 0
	lea	rax, -23[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	mov	eax, DWORD PTR -100[rbp]
	lea	rcx, -23[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	rax, QWORD PTR -96[rbp]
	lea	rdx, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -112[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -104[rbp]
	lea	rcx, -16[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -116[rbp], eax
	lea	rax, -16[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	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	"20451568.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Failed to create pipe to Chess\000"
	.align	2
.LC2:
	.ascii	"Failed to create pipe from Chess\000"
	.align	2
.LC3:
	.ascii	"could not fork to GNU Chess\000"
	.align	2
.LC4:
	.ascii	"/usr/games/gnuchess\000"
	.align	2
.LC5:
	.ascii	"-x\000"
	.align	2
.LC6:
	.ascii	"exec failed\000"
	.align	2
.LC7:
	.ascii	"I made it\000"
	.align	2
.LC0:
	.ascii	"Check\012\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #84
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r2, .L8+4
	sub	r3, fp, #32
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strh	r1, [r3]	@ movhi
	add	r3, r3, #2
	lsr	r2, r1, #16
	strb	r2, [r3]
	sub	r3, fp, #80
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L8+8
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #72
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L8+12
	bl	printf
	mov	r0, #1
	bl	exit
.L3:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-88]
	ldr	r3, [fp, #-88]
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L8+16
	bl	printf
	mov	r0, #1
	bl	exit
.L4:
	ldr	r3, [fp, #-88]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-76]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-72]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-80]
	mov	r1, #0
	mov	r0, r3
	bl	dup2
	ldr	r3, [fp, #-68]
	mov	r1, #1
	mov	r0, r3
	bl	dup2
	ldr	r3, .L8+20
	str	r3, [fp, #-64]
	ldr	r3, .L8+24
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-56]
	ldr	r4, [fp, #-68]
	sub	r3, fp, #32
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r2, r3, #1
	sub	r3, fp, #32
	mov	r1, r3
	mov	r0, r4
	bl	write
	ldr	r3, [fp, #-64]
	sub	r2, fp, #64
	mov	r1, r2
	mov	r0, r3
	bl	execvp
	ldr	r0, .L8+28
	bl	printf
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-88]
	mov	r0, r3
	bl	printf
	ldr	r3, [fp, #-80]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-68]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-72]
	sub	r1, fp, #24
	mov	r2, #8
	mov	r0, r3
	bl	read
	str	r0, [fp, #-84]
	sub	r3, fp, #24
	mov	r0, r3
	bl	printf
	mov	r0, #10
	bl	putchar
	ldr	r0, .L8+32
	bl	printf
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
