	.file	"691243.c"
	.intel_syntax noprefix
	.text
	.globl	child_pid
	.bss
	.align 4
	.type	child_pid, @object
	.size	child_pid, 4
child_pid:
	.zero	4
	.globl	parent_pid
	.align 4
	.type	parent_pid, @object
	.size	parent_pid, 4
parent_pid:
	.zero	4
	.globl	child_status
	.align 4
	.type	child_status, @object
	.size	child_status, 4
child_status:
	.zero	4
	.text
	.globl	signal_handler
	.type	signal_handler, @function
signal_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
	cmp	DWORD PTR -4[rbp], 14
	je	.L2
	cmp	DWORD PTR -4[rbp], 2
	je	.L2
	cmp	DWORD PTR -4[rbp], 15
	jne	.L5
.L2:
	mov	eax, DWORD PTR child_pid[rip]
	test	eax, eax
	je	.L4
	mov	eax, DWORD PTR child_pid[rip]
	mov	esi, 9
	mov	edi, eax
	call	kill@PLT
	lea	rdi, child_status[rip]
	mov	eax, 0
	call	wait@PLT
.L4:
	mov	edi, 0
	call	exit@PLT
.L5:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	signal_handler, .-signal_handler
	.section	.rodata
.LC0:
	.string	"l"
	.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
	push	rbx
	sub	rsp, 104
	.cfi_offset 3, -24
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -32[rbp], 0
	mov	DWORD PTR -68[rbp], 2
	mov	DWORD PTR -64[rbp], 10
	mov	DWORD PTR -80[rbp], 18874368
	mov	DWORD PTR -76[rbp], 0
	mov	DWORD PTR -60[rbp], 0
	mov	DWORD PTR -56[rbp], 1
	mov	DWORD PTR -52[rbp], 2
	mov	DWORD PTR -72[rbp], 0
	mov	DWORD PTR -48[rbp], 0
	cmp	DWORD PTR -100[rbp], 1
	jg	.L7
	mov	eax, -1
	jmp	.L24
.L7:
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rcx, -40[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	rdi, rax
	call	strtoll@PLT
	add	eax, 300
	mov	DWORD PTR -48[rbp], eax
	cmp	DWORD PTR -100[rbp], 3
	jne	.L9
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L9
	mov	eax, DWORD PTR -80[rbp]
	imul	eax, DWORD PTR -56[rbp]
	mov	DWORD PTR -80[rbp], eax
	jmp	.L10
.L9:
	mov	eax, DWORD PTR -80[rbp]
	imul	eax, DWORD PTR -52[rbp]
	mov	DWORD PTR -80[rbp], eax
.L10:
	mov	eax, DWORD PTR -80[rbp]
	mov	DWORD PTR -76[rbp], eax
	call	getpid@PLT
	mov	DWORD PTR parent_pid[rip], eax
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	lea	rsi, signal_handler[rip]
	mov	edi, 14
	call	signal@PLT
	lea	rsi, signal_handler[rip]
	mov	edi, 2
	call	signal@PLT
	lea	rsi, signal_handler[rip]
	mov	edi, 15
	call	signal@PLT
	mov	eax, DWORD PTR -48[rbp]
	mov	edi, eax
	call	alarm@PLT
.L23:
	call	fork@PLT
	mov	DWORD PTR child_pid[rip], eax
	mov	eax, DWORD PTR child_pid[rip]
	test	eax, eax
	jne	.L11
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	eax, DWORD PTR -76[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -92[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -92[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	lea	rbx, [rdx+rax]
	call	rand@PLT
	mov	DWORD PTR [rbx], eax
	add	DWORD PTR -92[rbp], 1
.L12:
	mov	eax, DWORD PTR -92[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	jl	.L13
	mov	DWORD PTR -88[rbp], 0
	jmp	.L14
.L22:
	mov	eax, DWORD PTR -76[rbp]
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -80[rbp]
	add	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -76[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	je	.L15
	call	getppid@PLT
	mov	edx, DWORD PTR parent_pid[rip]
	cmp	eax, edx
	je	.L16
.L15:
	mov	eax, -1
	jmp	.L24
.L16:
	mov	DWORD PTR -92[rbp], 0
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -92[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR -60[rbp]
	mov	edx, DWORD PTR -92[rbp]
	add	edx, ecx
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -92[rbp], 1
.L17:
	mov	eax, DWORD PTR -76[rbp]
	sub	eax, DWORD PTR -60[rbp]
	cmp	DWORD PTR -92[rbp], eax
	jl	.L18
	mov	DWORD PTR -84[rbp], 0
	jmp	.L19
.L21:
	call	rand@PLT
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	jge	.L20
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	add	DWORD PTR -72[rbp], eax
.L20:
	add	DWORD PTR -84[rbp], 1
.L19:
	cmp	DWORD PTR -84[rbp], 9
	jle	.L21
	mov	eax, DWORD PTR -68[rbp]
	mov	edi, eax
	call	sleep@PLT
	add	DWORD PTR -88[rbp], 1
.L14:
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -64[rbp]
	jl	.L22
	mov	eax, 0
	jmp	.L24
.L11:
	lea	rdi, child_status[rip]
	mov	eax, 0
	call	wait@PLT
	mov	DWORD PTR child_pid[rip], 0
	jmp	.L23
.L24:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	mov	rbx, QWORD PTR -8[rbp]
	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	"691243.c"
	.text
	.global	child_pid
	.bss
	.align	2
	.type	child_pid, %object
	.size	child_pid, 4
child_pid:
	.space	4
	.global	parent_pid
	.align	2
	.type	parent_pid, %object
	.size	parent_pid, 4
parent_pid:
	.space	4
	.global	child_status
	.align	2
	.type	child_status, %object
	.size	child_status, 4
child_status:
	.space	4
	.text
	.align	2
	.global	signal_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	signal_handler, %function
signal_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	r3, [fp, #-8]
	cmp	r3, #14
	beq	.L2
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	beq	.L2
	ldr	r3, [fp, #-8]
	cmp	r3, #15
	bne	.L5
.L2:
	ldr	r3, .L6
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L4
	ldr	r3, .L6
	ldr	r3, [r3]
	mov	r1, #9
	mov	r0, r3
	bl	kill
	ldr	r0, .L6+4
	bl	wait
.L4:
	mov	r0, #0
	bl	exit
.L5:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	child_pid
	.word	child_status
	.size	signal_handler, .-signal_handler
	.section	.rodata
	.align	2
.LC0:
	.ascii	"l\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #76
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L28
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-72]
	mov	r3, #2
	str	r3, [fp, #-44]
	mov	r3, #10
	str	r3, [fp, #-40]
	mov	r3, #18874368
	str	r3, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #1
	str	r3, [fp, #-32]
	mov	r3, #2
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-80]
	cmp	r3, #1
	bgt	.L9
	mvn	r3, #0
	b	.L26
.L9:
	ldr	r3, [fp, #-84]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r1, fp, #76
	mov	r2, #10
	mov	r0, r3
	bl	strtoll
	mov	r2, r0
	mov	r3, r1
	mov	r3, r2
	add	r3, r3, #300
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-80]
	cmp	r3, #3
	bne	.L11
	ldr	r3, [fp, #-84]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L28+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-56]
	ldr	r2, [fp, #-32]
	mul	r3, r2, r3
	str	r3, [fp, #-56]
	b	.L12
.L11:
	ldr	r3, [fp, #-56]
	ldr	r2, [fp, #-28]
	mul	r3, r2, r3
	str	r3, [fp, #-56]
.L12:
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-52]
	bl	getpid
	mov	r3, r0
	ldr	r2, .L28+8
	str	r3, [r2]
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r1, .L28+12
	mov	r0, #14
	bl	signal
	ldr	r1, .L28+12
	mov	r0, #2
	bl	signal
	ldr	r1, .L28+12
	mov	r0, #15
	bl	signal
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	alarm
.L25:
	bl	fork
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L28+16
	str	r2, [r3]
	ldr	r3, .L28+16
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L13
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L14
.L15:
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-72]
	add	r4, r2, r3
	bl	rand
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L14:
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	blt	.L15
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L16
.L24:
	ldr	r3, [fp, #-52]
	str	r3, [fp, #-36]
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-56]
	add	r3, r2, r3
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	realloc
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	beq	.L17
	bl	getppid
	mov	r2, r0
	ldr	r3, .L28+8
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L18
.L17:
	mvn	r3, #0
	b	.L26
.L18:
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L19
.L20:
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-72]
	add	r2, r2, r3
	ldr	r1, [fp, #-36]
	ldr	r3, [fp, #-68]
	add	r3, r1, r3
	lsl	r3, r3, #2
	ldr	r1, [fp, #-72]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L19:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-36]
	sub	r3, r2, r3
	ldr	r2, [fp, #-68]
	cmp	r2, r3
	blt	.L20
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L21
.L23:
	bl	rand
	str	r0, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	bge	.L22
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-72]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	str	r3, [fp, #-48]
.L22:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L21:
	ldr	r3, [fp, #-60]
	cmp	r3, #9
	ble	.L23
	ldr	r3, [fp, #-44]
	mov	r0, r3
	bl	sleep
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L16:
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	blt	.L24
	mov	r3, #0
	b	.L26
.L13:
	ldr	r0, .L28+20
	bl	wait
	ldr	r3, .L28+16
	mov	r2, #0
	str	r2, [r3]
	b	.L25
.L26:
	ldr	r2, .L28
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L27
	bl	__stack_chk_fail
.L27:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L29:
	.align	2
.L28:
	.word	.LC1
	.word	.LC0
	.word	parent_pid
	.word	signal_handler
	.word	child_pid
	.word	child_status
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
