	.file	"190450.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	" -->o Got a SIGPIPE"
	.text
	.globl	sigpipe_handler
	.type	sigpipe_handler, @function
sigpipe_handler:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	lea	rdi, .LC0[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sigpipe_handler, .-sigpipe_handler
	.globl	compute_sum
	.type	compute_sum, @function
compute_sum:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -4[rbp], 0
	mov	DWORD PTR -8[rbp], 0
	jmp	.L3
.L4:
	add	DWORD PTR -8[rbp], 1
	mov	eax, DWORD PTR -8[rbp]
	add	DWORD PTR -4[rbp], eax
.L3:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L4
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	compute_sum, .-compute_sum
	.section	.rodata
.LC1:
	.string	"Could not create pipe"
.LC2:
	.string	"Could not fork child"
.LC3:
	.string	"child; %d\n"
.LC4:
	.string	"parent writing %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -28[rbp], 0
	lea	rsi, sigpipe_handler[rip]
	mov	edi, 13
	call	signal@PLT
	lea	rax, -16[rbp]
	mov	rdi, rax
	call	pipe@PLT
	test	eax, eax
	jns	.L7
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 2
	call	exit@PLT
.L7:
	call	fork@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], 0
	jns	.L8
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	cmp	DWORD PTR -24[rbp], 0
	jne	.L9
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -16[rbp]
	lea	rcx, -28[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L9:
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 10
	call	compute_sum
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	lea	rcx, -28[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	wait@PLT
.L10:
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"190450.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	" -->o Got a SIGPIPE\000"
	.text
	.align	2
	.global	sigpipe_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	sigpipe_handler, %function
sigpipe_handler:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, .L2
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	sigpipe_handler, .-sigpipe_handler
	.align	2
	.global	compute_sum
	.syntax unified
	.arm
	.fpu softvfp
	.type	compute_sum, %function
compute_sum:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L5
.L6:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-8]
.L5:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L6
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	compute_sum, .-compute_sum
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Could not create pipe\000"
	.align	2
.LC2:
	.ascii	"Could not fork child\000"
	.align	2
.LC3:
	.ascii	"child; %d\012\000"
	.align	2
.LC4:
	.ascii	"parent writing %d\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 = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r1, .L15+4
	mov	r0, #13
	bl	signal
	sub	r3, fp, #16
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmp	r3, #0
	bge	.L9
	ldr	r0, .L15+8
	bl	perror
	mov	r0, #2
	bl	exit
.L9:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L15+12
	bl	perror
	mov	r0, #1
	bl	exit
.L10:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-16]
	sub	r1, fp, #28
	mov	r2, #4
	mov	r0, r3
	bl	read
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-28]
	mov	r1, r3
	ldr	r0, .L15+16
	bl	printf
	b	.L12
.L11:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	close
	mov	r0, #10
	bl	compute_sum
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-12]
	sub	r1, fp, #28
	mov	r2, #4
	mov	r0, r3
	bl	write
	str	r0, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, .L15+20
	bl	printf
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	close
	mov	r0, #0
	bl	wait
.L12:
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC5
	.word	sigpipe_handler
	.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
