	.file	"3000menu.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Running %s\n"
.LC1:
	.string	"Command failed."
.LC2:
	.string	"Command succeeded."
	.text
	.globl	run_program
	.type	run_program, @function
run_program:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	leaq	menu(%rip), %rbp
	movslq	%edi, %rbx
	movq	0(%rbp,%rbx,8), %rdx
	leaq	.LC0(%rip), %rsi
	movl	$2, %edi
	movl	$0, %eax
	call	__printf_chk@PLT
	movq	0(%rbp,%rbx,8), %rdi
	call	system@PLT
	testl	%eax, %eax
	je	.L2
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L1
	.cfi_endproc
.LFE51:
	.size	run_program, .-run_program
	.section	.rodata.str1.1
.LC3:
	.string	"\nChoose a program to run:\n"
.LC4:
	.string	"%d. %s\n"
.LC5:
	.string	"\nYour choice? "
	.text
	.globl	choose_program
	.type	choose_program, @function
choose_program:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	$0, 8(%rsp)
	movq	$0, 16(%rsp)
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	cmpl	$0, quit(%rip)
	js	.L9
	leaq	menu(%rip), %rbp
	movl	$0, %ebx
	leaq	.LC4(%rip), %r12
.L7:
	addl	$1, %ebx
	movq	0(%rbp), %rcx
	movl	%ebx, %edx
	movq	%r12, %rsi
	movl	$2, %edi
	movl	$0, %eax
	call	__printf_chk@PLT
	addq	$8, %rbp
	cmpl	quit(%rip), %ebx
	jle	.L7
.L6:
	leaq	.LC5(%rip), %rsi
	movl	$2, %edi
	movl	$0, %eax
	call	__printf_chk@PLT
	leaq	16(%rsp), %rsi
	leaq	8(%rsp), %rdi
	movq	stdin(%rip), %rdx
	call	getline@PLT
	movq	%rax, %r12
	movl	$10, %edx
	movl	$0, %esi
	movq	8(%rsp), %rdi
	call	__isoc23_strtol@PLT
	movq	%rax, %rbp
	movq	8(%rsp), %rdi
	call	free@PLT
	testl	%ebp, %ebp
	setg	%dl
	cmpl	%ebx, %ebp
	setle	%al
	andl	%eax, %edx
	testq	%r12, %r12
	setne	%al
	movzbl	%al, %eax
	andl	%edx, %eax
	negl	%eax
	andl	%ebp, %eax
	subl	$1, %eax
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L12
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	movl	$0, %ebx
	jmp	.L6
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	choose_program, .-choose_program
	.section	.rodata.str1.1
.LC6:
	.string	"MENUCMD"
	.text
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	.LC6(%rip), %rdi
	call	getenv@PLT
	testq	%rax, %rax
	je	.L14
	movq	%rax, 32+menu(%rip)
.L18:
	call	choose_program
	cmpl	%eax, quit(%rip)
	je	.L20
	cmpl	$-1, %eax
	je	.L18
	movl	%eax, %edi
	call	run_program
	jmp	.L18
.L14:
	movslq	quit(%rip), %rdx
	leaq	menu(%rip), %rax
	movq	(%rax,%rdx,8), %rax
	movq	%rax, 32+menu(%rip)
	movl	$4, quit(%rip)
	jmp	.L18
.L20:
	movl	$0, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	CUSTOM
	.section	.rodata
	.align 4
	.type	CUSTOM, @object
	.size	CUSTOM, 4
CUSTOM:
	.long	4
	.globl	quit
	.data
	.align 4
	.type	quit, @object
	.size	quit, 4
quit:
	.long	5
	.globl	menu
	.section	.rodata.str1.1
.LC7:
	.string	"/usr/bin/ls"
.LC8:
	.string	"/usr/bin/ps"
.LC9:
	.string	"/usr/bin/nano"
.LC10:
	.string	"/usr/bin/top"
.LC11:
	.string	"CUSTOM"
.LC12:
	.string	"QUIT"
	.section	.data.rel.local,"aw"
	.align 32
	.type	menu, @object
	.size	menu, 56
menu:
	.quad	.LC7
	.quad	.LC8
	.quad	.LC9
	.quad	.LC10
	.quad	.LC11
	.quad	.LC12
	.quad	0
	.ident	"GCC: (Ubuntu 15.2.0-16ubuntu1) 15.2.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:
