	.file	"435472.c"
	.intel_syntax noprefix
	.text
	.globl	action
	.data
	.align 4
	.type	action, @object
	.size	action, 4
action:
	.long	1
	.section	.rodata
	.align 8
.LC0:
	.string	"Wrong number of arguments. Syntax: %s filename\n"
.LC1:
	.string	"Error, fork() failed.\n"
.LC2:
	.string	"r"
.LC3:
	.string	"Error opening the file %s.\n"
.LC4:
	.string	"Row %d: %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
	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
	cmp	DWORD PTR -1076[rbp], 2
	je	.L2
	mov	rax, QWORD PTR -1088[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L11
.L2:
	mov	rax, QWORD PTR -1088[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -1056[rbp], rax
	call	fork@PLT
	mov	DWORD PTR -1064[rbp], eax
	cmp	DWORD PTR -1064[rbp], -1
	jne	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L11
.L4:
	cmp	DWORD PTR -1064[rbp], 0
	jle	.L5
	lea	rsi, switchAction[rip]
	mov	edi, 10
	call	signal@PLT
	lea	rsi, parentTerminate[rip]
	mov	edi, 12
	call	signal@PLT
	mov	rax, QWORD PTR -1056[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1048[rbp], rax
	cmp	QWORD PTR -1048[rbp], 0
	jne	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -1056[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L11
.L6:
	mov	DWORD PTR -1072[rbp], 1
	jmp	.L7
.L9:
	mov	eax, DWORD PTR action[rip]
	test	eax, eax
	je	.L8
	mov	rax, QWORD PTR stdout[rip]
	lea	rcx, -1040[rbp]
	mov	edx, DWORD PTR -1072[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L8:
	add	DWORD PTR -1072[rbp], 1
.L7:
	mov	rdx, QWORD PTR -1048[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L9
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	rewind@PLT
	jmp	.L6
.L5:
	mov	DWORD PTR -1068[rbp], 0
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
.L10:
	lea	rsi, timerElapsed[rip]
	mov	edi, 14
	call	signal@PLT
	call	rand@PLT
	mov	edx, eax
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	esi, edx
	sar	esi, 31
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	sal	eax, 2
	add	eax, ecx
	add	eax, eax
	mov	ecx, edx
	sub	ecx, eax
	lea	eax, 1[rcx]
	mov	DWORD PTR -1060[rbp], eax
	mov	eax, DWORD PTR -1060[rbp]
	add	DWORD PTR -1068[rbp], eax
	mov	eax, DWORD PTR -1060[rbp]
	mov	edi, eax
	call	alarm@PLT
	call	pause@PLT
	mov	edx, DWORD PTR -1068[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	add	eax, edx
	cmp	eax, 29
	jle	.L10
	lea	rsi, childTerminate[rip]
	mov	edi, 14
	call	signal@PLT
	mov	eax, 30
	sub	eax, DWORD PTR -1068[rbp]
	mov	edi, eax
	call	alarm@PLT
	call	pause@PLT
	mov	eax, 0
.L11:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	switchAction
	.type	switchAction, @function
switchAction:
.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 -4[rbp], edi
	mov	eax, DWORD PTR action[rip]
	test	eax, eax
	sete	al
	movzx	eax, al
	mov	DWORD PTR action[rip], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	switchAction, .-switchAction
	.globl	timerElapsed
	.type	timerElapsed, @function
timerElapsed:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	call	getppid@PLT
	mov	esi, 10
	mov	edi, eax
	call	kill@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	timerElapsed, .-timerElapsed
	.globl	childTerminate
	.type	childTerminate, @function
childTerminate:
.LFB9:
	.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
	call	getppid@PLT
	mov	esi, 12
	mov	edi, eax
	call	kill@PLT
	mov	edi, 15
	call	raise@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	childTerminate, .-childTerminate
	.globl	parentTerminate
	.type	parentTerminate, @function
parentTerminate:
.LFB10:
	.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
	mov	edi, 15
	call	raise@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	parentTerminate, .-parentTerminate
	.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	"435472.c"
	.text
	.global	action
	.data
	.align	2
	.type	action, %object
	.size	action, 4
action:
	.word	1
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Wrong number of arguments. Syntax: %s filename\012\000"
	.align	2
.LC1:
	.ascii	"Error, fork() failed.\012\000"
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"Error opening the file %s.\012\000"
	.align	2
.LC4:
	.ascii	"Row %d: %s\012\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 = 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, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1064]
	cmp	r3, #2
	beq	.L2
	ldr	r3, .L13+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-1068]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L13+8
	bl	fprintf
	mvn	r3, #0
	b	.L11
.L2:
	ldr	r3, [fp, #-1068]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-1048]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-1044]
	ldr	r3, [fp, #-1044]
	cmn	r3, #1
	bne	.L4
	ldr	r3, .L13+4
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L13+12
	bl	fwrite
	mvn	r3, #0
	b	.L11
.L4:
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	ble	.L5
	ldr	r1, .L13+16
	mov	r0, #10
	bl	signal
	ldr	r1, .L13+20
	mov	r0, #12
	bl	signal
	ldr	r1, .L13+24
	ldr	r0, [fp, #-1048]
	bl	fopen
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bne	.L6
	ldr	r3, .L13+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-1048]
	ldr	r1, .L13+28
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L11
.L6:
	mov	r3, #1
	str	r3, [fp, #-1056]
	b	.L7
.L9:
	ldr	r3, .L13+32
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L13+36
	ldr	r0, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1056]
	ldr	r1, .L13+40
	bl	fprintf
.L8:
	ldr	r3, [fp, #-1056]
	add	r3, r3, #1
	str	r3, [fp, #-1056]
.L7:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1036]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	ldr	r0, [fp, #-1036]
	bl	rewind
	b	.L6
.L5:
	mov	r3, #0
	str	r3, [fp, #-1052]
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
.L10:
	ldr	r1, .L13+44
	mov	r0, #14
	bl	signal
	bl	rand
	mov	r1, r0
	ldr	r3, .L13+48
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	add	r3, r2, #1
	str	r3, [fp, #-1040]
	ldr	r2, [fp, #-1052]
	ldr	r3, [fp, #-1040]
	add	r3, r2, r3
	str	r3, [fp, #-1052]
	ldr	r3, [fp, #-1040]
	mov	r0, r3
	bl	alarm
	bl	pause
	ldr	r2, [fp, #-1052]
	ldr	r3, [fp, #-1040]
	add	r3, r2, r3
	cmp	r3, #29
	ble	.L10
	ldr	r1, .L13+52
	mov	r0, #14
	bl	signal
	ldr	r3, [fp, #-1052]
	rsb	r3, r3, #30
	mov	r0, r3
	bl	alarm
	bl	pause
	mov	r3, #0
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC5
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	switchAction
	.word	parentTerminate
	.word	.LC2
	.word	.LC3
	.word	action
	.word	stdout
	.word	.LC4
	.word	timerElapsed
	.word	1717986919
	.word	childTerminate
	.size	main, .-main
	.align	2
	.global	switchAction
	.syntax unified
	.arm
	.fpu softvfp
	.type	switchAction, %function
switchAction:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, .L17
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L17
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L18:
	.align	2
.L17:
	.word	action
	.size	switchAction, .-switchAction
	.align	2
	.global	timerElapsed
	.syntax unified
	.arm
	.fpu softvfp
	.type	timerElapsed, %function
timerElapsed:
	@ 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]
	bl	getppid
	mov	r3, r0
	mov	r1, #10
	mov	r0, r3
	bl	kill
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	timerElapsed, .-timerElapsed
	.align	2
	.global	childTerminate
	.syntax unified
	.arm
	.fpu softvfp
	.type	childTerminate, %function
childTerminate:
	@ 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]
	bl	getppid
	mov	r3, r0
	mov	r1, #12
	mov	r0, r3
	bl	kill
	mov	r0, #15
	bl	raise
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	childTerminate, .-childTerminate
	.align	2
	.global	parentTerminate
	.syntax unified
	.arm
	.fpu softvfp
	.type	parentTerminate, %function
parentTerminate:
	@ 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]
	mov	r0, #15
	bl	raise
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	parentTerminate, .-parentTerminate
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
