	.file	"252148.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Error!"
	.text
	.globl	print_error
	.type	print_error, @function
print_error:
.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
	cmp	DWORD PTR -4[rbp], -1
	jne	.L3
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L3:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_error, .-print_error
	.section	.rodata
.LC1:
	.string	"Task part: "
.LC2:
	.string	"%d"
.LC3:
	.string	"cat"
.LC4:
	.string	"Child process has pid: %d\n"
.LC5:
	.string	"Child process %d "
.LC6:
	.string	"exit with code %d\n"
	.align 8
.LC7:
	.string	"was interrupted with signal %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -36[rbp], 1
	jg	.L5
	mov	eax, -1
	jmp	.L13
.L5:
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	call	fork@PLT
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	print_error
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, 1
	jne	.L7
	cmp	DWORD PTR -24[rbp], 0
	jne	.L8
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	ecx, 0
	mov	rdx, rax
	lea	rsi, .LC3[rip]
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	execlp@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	print_error
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L7:
	cmp	DWORD PTR -24[rbp], 0
	jne	.L10
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	ecx, 0
	mov	rdx, rax
	lea	rsi, .LC3[rip]
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	execlp@PLT
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	print_error
	jmp	.L9
.L10:
	lea	rax, -28[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	print_error
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -28[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L11
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L11:
	mov	eax, DWORD PTR -28[rbp]
	and	eax, 127
	add	eax, 1
	sar	al
	test	al, al
	jle	.L9
	mov	eax, DWORD PTR -28[rbp]
	and	eax, 127
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L9:
	mov	eax, 0
.L13:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"252148.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Error!\000"
	.text
	.align	2
	.global	print_error
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_error, %function
print_error:
	@ 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	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L4
	bl	perror
	mvn	r0, #0
	bl	exit
.L3:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.size	print_error, .-print_error
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Task part: \000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"cat\000"
	.align	2
.LC4:
	.ascii	"Child process has pid: %d\012\000"
	.align	2
.LC5:
	.ascii	"Child process %d \000"
	.align	2
.LC6:
	.ascii	"exit with code %d\012\000"
	.align	2
.LC7:
	.ascii	"was interrupted with signal %d\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 = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	cmp	r3, #1
	bgt	.L7
	mvn	r3, #0
	b	.L15
.L7:
	ldr	r0, .L17+4
	bl	printf
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, .L17+8
	bl	__isoc99_scanf
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-24]
	bl	print_error
	ldr	r3, [fp, #-32]
	cmp	r3, #1
	bne	.L9
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r2, [r3]
	mov	r3, #0
	ldr	r1, .L17+12
	ldr	r0, .L17+12
	bl	execlp
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	print_error
	b	.L11
.L10:
	ldr	r1, [fp, #-24]
	ldr	r0, .L17+16
	bl	printf
	b	.L11
.L9:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L12
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r2, [r3]
	mov	r3, #0
	ldr	r1, .L17+12
	ldr	r0, .L17+12
	bl	execlp
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	print_error
	b	.L11
.L12:
	sub	r3, fp, #28
	mov	r0, r3
	bl	wait
	str	r0, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	print_error
	ldr	r1, [fp, #-24]
	ldr	r0, .L17+20
	bl	printf
	ldr	r3, [fp, #-28]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L13
	ldr	r3, [fp, #-28]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r1, r3
	ldr	r0, .L17+24
	bl	printf
	b	.L11
.L13:
	ldr	r3, [fp, #-28]
	and	r3, r3, #255
	and	r3, r3, #127
	and	r3, r3, #255
	add	r3, r3, #1
	and	r3, r3, #255
	lsl	r3, r3, #24
	asr	r3, r3, #24
	asr	r3, r3, #1
	lsl	r3, r3, #24
	asr	r3, r3, #24
	cmp	r3, #0
	ble	.L11
	ldr	r3, [fp, #-28]
	and	r3, r3, #127
	mov	r1, r3
	ldr	r0, .L17+28
	bl	printf
.L11:
	mov	r3, #0
.L15:
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC8
	.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
