	.file	"771373.c"
	.intel_syntax noprefix
	.text
	.globl	CMD_TIMED_OUT
	.bss
	.align 4
	.type	CMD_TIMED_OUT, @object
	.size	CMD_TIMED_OUT, 4
CMD_TIMED_OUT:
	.zero	4
	.globl	CHILD_DONE
	.align 4
	.type	CHILD_DONE, @object
	.size	CHILD_DONE, 4
CHILD_DONE:
	.zero	4
	.text
	.globl	child_handler
	.type	child_handler, @function
child_handler:
.LFB6:
	.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	DWORD PTR CHILD_DONE[rip], 1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	child_handler, .-child_handler
	.globl	alarm_handler
	.type	alarm_handler, @function
alarm_handler:
.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	DWORD PTR CMD_TIMED_OUT[rip], 1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	alarm_handler, .-alarm_handler
	.section	.rodata
.LC0:
	.string	" "
.LC1:
	.string	"child running, kill it"
	.align 8
.LC2:
	.string	"alarm triggered, but child finished normally"
.LC3:
	.string	"process finished in time"
.LC4:
	.string	"Some other signal caught"
	.text
	.globl	run_cmd_timeout
	.type	run_cmd_timeout, @function
run_cmd_timeout:
.LFB8:
	.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, 72
	.cfi_offset 3, -24
	mov	QWORD PTR -72[rbp], rdi
	mov	DWORD PTR -76[rbp], esi
	mov	DWORD PTR -80[rbp], edx
	mov	DWORD PTR -48[rbp], 0
	mov	DWORD PTR -56[rbp], 0
	mov	DWORD PTR -52[rbp], 0
	mov	DWORD PTR -44[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	eax, DWORD PTR -76[rbp]
	add	eax, 1
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L4
	mov	DWORD PTR -52[rbp], 1
	jmp	.L5
.L4:
	mov	DWORD PTR -56[rbp], 0
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	add	DWORD PTR -56[rbp], 1
.L6:
	mov	eax, DWORD PTR -76[rbp]
	cmp	eax, DWORD PTR -56[rbp]
	jge	.L7
	mov	edi, 256
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L8
	mov	DWORD PTR -52[rbp], 1
	jmp	.L5
.L8:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, 256
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 255
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	DWORD PTR -56[rbp], 0
	jmp	.L9
.L11:
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	lea	rbx, [rdx+rax]
	mov	edi, 256
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L10
	mov	DWORD PTR -52[rbp], 1
	jmp	.L5
.L10:
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rsi, .LC0[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -40[rbp], rax
	add	DWORD PTR -56[rbp], 1
.L9:
	cmp	QWORD PTR -40[rbp], 0
	jne	.L11
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	call	fork@PLT
	mov	DWORD PTR -48[rbp], eax
	cmp	DWORD PTR -48[rbp], -1
	jne	.L12
	mov	DWORD PTR -52[rbp], 2
	jmp	.L5
.L12:
	cmp	DWORD PTR -48[rbp], 0
	jne	.L13
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	lea	rsi, alarm_handler[rip]
	mov	edi, 14
	call	signal@PLT
	lea	rsi, child_handler[rip]
	mov	edi, 17
	call	signal@PLT
	mov	eax, DWORD PTR -80[rbp]
	mov	edi, eax
	call	alarm@PLT
	call	pause@PLT
	mov	eax, DWORD PTR CMD_TIMED_OUT[rip]
	test	eax, eax
	je	.L14
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, 1
	mov	esi, 0
	mov	edi, eax
	call	waitpid@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], 0
	jne	.L15
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -48[rbp]
	mov	esi, 9
	mov	edi, eax
	call	kill@PLT
	mov	edi, 0
	call	wait@PLT
	jmp	.L5
.L15:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L5
.L14:
	mov	eax, DWORD PTR CHILD_DONE[rip]
	test	eax, eax
	je	.L16
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 0
	call	wait@PLT
	jmp	.L5
.L16:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 0
	call	wait@PLT
.L5:
	mov	DWORD PTR -56[rbp], 0
	jmp	.L17
.L19:
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L18
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
.L18:
	add	DWORD PTR -56[rbp], 1
.L17:
	mov	eax, DWORD PTR -56[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	jle	.L19
	cmp	QWORD PTR -32[rbp], 0
	je	.L20
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
.L20:
	cmp	QWORD PTR -24[rbp], 0
	je	.L21
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
.L21:
	mov	eax, DWORD PTR -52[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	run_cmd_timeout, .-run_cmd_timeout
	.section	.rodata
.LC5:
	.string	"two"
.LC6:
	.string	"/home/suraj/r.out"
.LC7:
	.string	"%s %s"
	.text
	.globl	main
	.type	main, @function
main:
.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, 1040
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -1040[rbp], 0
	mov	QWORD PTR -1032[rbp], 0
	lea	rdx, -1024[rbp]
	mov	eax, 0
	mov	ecx, 126
	mov	rdi, rdx
	rep stosq
	lea	rax, -1040[rbp]
	lea	rcx, .LC5[rip]
	lea	rdx, .LC6[rip]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	edx, 100
	mov	esi, 2
	mov	rdi, rax
	call	run_cmd_timeout
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"771373.c"
	.text
	.global	CMD_TIMED_OUT
	.bss
	.align	2
	.type	CMD_TIMED_OUT, %object
	.size	CMD_TIMED_OUT, 4
CMD_TIMED_OUT:
	.space	4
	.global	CHILD_DONE
	.align	2
	.type	CHILD_DONE, %object
	.size	CHILD_DONE, 4
CHILD_DONE:
	.space	4
	.text
	.align	2
	.global	child_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	child_handler, %function
child_handler:
	@ 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, .L2
	mov	r2, #1
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L3:
	.align	2
.L2:
	.word	CHILD_DONE
	.size	child_handler, .-child_handler
	.align	2
	.global	alarm_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	alarm_handler, %function
alarm_handler:
	@ 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, .L5
	mov	r2, #1
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L6:
	.align	2
.L5:
	.word	CMD_TIMED_OUT
	.size	alarm_handler, .-alarm_handler
	.section	.rodata
	.align	2
.LC0:
	.ascii	" \000"
	.align	2
.LC1:
	.ascii	"child running, kill it\000"
	.align	2
.LC2:
	.ascii	"alarm triggered, but child finished normally\000"
	.align	2
.LC3:
	.ascii	"process finished in time\000"
	.align	2
.LC4:
	.ascii	"Some other signal caught\000"
	.text
	.align	2
	.global	run_cmd_timeout
	.syntax unified
	.arm
	.fpu softvfp
	.type	run_cmd_timeout, %function
run_cmd_timeout:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L8
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L9
.L8:
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L10
.L11:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L10:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bge	.L11
	mov	r0, #256
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L12
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L9
.L12:
	mov	r2, #256
	mov	r1, #0
	ldr	r0, [fp, #-28]
	bl	memset
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-28]
	bl	strcpy
	ldr	r3, [fp, #-28]
	add	r3, r3, #255
	mov	r2, #0
	strb	r2, [r3]
	ldr	r1, .L27
	ldr	r0, [fp, #-28]
	bl	strtok
	str	r0, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L13
.L15:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	mov	r0, #256
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L14
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L9
.L14:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, [fp, #-32]
	mov	r0, r3
	bl	strcpy
	ldr	r1, .L27
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L13:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L15
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	bne	.L16
	mov	r3, #2
	str	r3, [fp, #-36]
	b	.L9
.L16:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L17
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	execvp
	mov	r0, #1
	bl	exit
.L17:
	ldr	r1, .L27+4
	mov	r0, #14
	bl	signal
	ldr	r1, .L27+8
	mov	r0, #17
	bl	signal
	ldr	r3, [fp, #-56]
	mov	r0, r3
	bl	alarm
	bl	pause
	ldr	r3, .L27+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L18
	mov	r2, #1
	mov	r1, #0
	ldr	r0, [fp, #-24]
	bl	waitpid
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L19
	ldr	r0, .L27+16
	bl	puts
	mov	r1, #9
	ldr	r0, [fp, #-24]
	bl	kill
	mov	r0, #0
	bl	wait
	b	.L9
.L19:
	ldr	r0, .L27+20
	bl	puts
	b	.L9
.L18:
	ldr	r3, .L27+24
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r0, .L27+28
	bl	puts
	mov	r0, #0
	bl	wait
	b	.L9
.L20:
	ldr	r0, .L27+32
	bl	puts
	mov	r0, #0
	bl	wait
.L9:
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L21
.L23:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L22
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
.L22:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L21:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	ble	.L23
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L24
	ldr	r0, [fp, #-28]
	bl	free
.L24:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L25
	ldr	r0, [fp, #-16]
	bl	free
.L25:
	ldr	r3, [fp, #-36]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC0
	.word	alarm_handler
	.word	child_handler
	.word	CMD_TIMED_OUT
	.word	.LC1
	.word	.LC2
	.word	CHILD_DONE
	.word	.LC3
	.word	.LC4
	.size	run_cmd_timeout, .-run_cmd_timeout
	.section	.rodata
	.align	2
.LC5:
	.ascii	"two\000"
	.align	2
.LC6:
	.ascii	"/home/suraj/r.out\000"
	.align	2
.LC7:
	.ascii	"%s %s\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 = 1032
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1024
	sub	sp, sp, #8
	ldr	r3, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1032]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	mov	r2, #1020
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, .L32+4
	ldr	r2, .L32+8
	ldr	r1, .L32+12
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #100
	mov	r1, #2
	mov	r0, r3
	bl	run_cmd_timeout
	mov	r3, #0
	ldr	r2, .L32
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L31
	bl	__stack_chk_fail
.L31:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC8
	.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
