// File: /workspace/github_cpp_makefile_star2_O3/talyerushalmy[P]SimpleFileSystem/src/Commands.cpp
// Function: ExecCommand::execute(FileSystem&)
void ExecCommand::execute(FileSystem& fs)
{
	try
	{
		unsigned int input = stoi(StringTools::trim(this->getArgs()));
		if (input >= this->history.size() || (StringTools::trim(this->getArgs()) != "0" && input == 0))
		{
			std::cout << "Command not found" << std::endl;
			return;
		}
		std::string command = this->history[input]->toString();
		std::cout << command << std::endl;
	}
	catch (int e)
	{
		std::cout << "Command not found" << std::endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
movq 0x28(%rdi), %rsi
movq 0x30(%rdi), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %rdi
callq 0x392c
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x35f2
movq -0x50(%rbp), %r12
callq 0x3050
movq %rax, %r15
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r15)
leaq -0x78(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x3230
cmpq %r12, (%r13)
je 0xa784
movq %rax, %r14
movslq %r14d, %rax
cmpq %r14, %rax
jne 0xa790
movl (%r15), %eax
cmpl $0x22, %eax
je 0xa790
testl %eax, %eax
jne 0xa61e
movl -0x2c(%rbp), %eax
movl %eax, (%r15)
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa630
callq 0x31a0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %r15
cmpq %r15, %rdi
je 0xa642
callq 0x31a0
movl %r14d, %r12d
movq 0x48(%rbx), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
jbe 0xa6c8
leaq -0x70(%rbp), %rdi
movq %r15, (%rdi)
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
addq %rsi, %rdx
callq 0x392c
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x35f2
leaq 0x3cd5(%rip), %rsi      # 0xe359
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0x3080
testl %eax, %eax
setne %r15b
testq %r12, %r12
sete %r13b
movq (%r14), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xa6ae
callq 0x31a0
andb %r15b, %r13b
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xa6c3
callq 0x31a0
testb %r13b, %r13b
je 0xa71d
movq 0x8901(%rip), %rbx      # 0x12fd0
leaq 0x3cb1(%rip), %rsi      # 0xe387
movl $0x11, %edx
movq %rbx, %rdi
callq 0x3200
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31b0
movsbl %al, %esi
movq 0x88cf(%rip), %rdi      # 0x12fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%rbx), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *0x8(%rax)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x888f(%rip), %rdi      # 0x12fd0
callq 0x3200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xa70e
callq 0x31a0
jmp 0xa70e
leaq 0x3c4a(%rip), %rdi      # 0xe3d5
callq 0x3110
leaq 0x3c3e(%rip), %rdi      # 0xe3d5
callq 0x3240
jmp 0xa7f4
jmp 0xa7b2
jmp 0xa7f4
movq %rdx, %r14
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
jmp 0xa7e8
movq %rdx, %r14
movq %rax, %rbx
jmp 0xa7e0
jmp 0xa7f4
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0xa7ce
movl -0x2c(%rbp), %eax
movl %eax, (%r15)
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa7e0
callq 0x31a0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xa7fa
callq 0x31a0
jmp 0xa7fa
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0xa83e
movq %rbx, %rdi
callq 0x30c0
movq 0x87c1(%rip), %rdi      # 0x12fd0
leaq 0x3b71(%rip), %rsi      # 0xe387
movl $0x11, %edx
callq 0x3200
movq 0x87a9(%rip), %rdi      # 0x12fd0
callq 0x30e0
callq 0x3280
jmp 0xa70e
movq %rax, %rbx
callq 0x3280
movq %rbx, %rdi
callq 0x32b0