// File: /workspace/github_cpp_makefile_star2_O1/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 $0x68, %rsp
movq %rdi, %rbx
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq 0x28(%rdi), %rsi
movq 0x30(%rdi), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %rdi
callq 0x3954
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x35f2
movq -0x70(%rbp), %r12
callq 0x3050
movq %rax, %r15
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r15)
leaq -0x90(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x3230
cmpq %r12, (%r13)
je 0xa7dd
movq %rax, %r14
movslq %r14d, %rax
cmpq %r14, %rax
jne 0xa7e9
movl (%r15), %eax
cmpl $0x22, %eax
je 0xa7e9
testl %eax, %eax
jne 0xa665
movl -0x2c(%rbp), %eax
movl %eax, (%r15)
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa677
callq 0x31a0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xa689
callq 0x31a0
movq 0x48(%rbx), %rax
movq 0x8(%rax), %r13
subq (%rax), %r13
movl %r14d, %r12d
sarq $0x3, %r13
movb $0x1, %r15b
cmpq %r12, %r13
jbe 0xa6ea
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq %rax, (%rdi)
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
addq %rsi, %rdx
callq 0x3954
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x35f2
leaq 0x3c87(%rip), %rsi      # 0xe359
leaq -0x70(%rbp), %rdi
callq 0x3080
testl %eax, %eax
setne %al
testl %r14d, %r14d
sete %r15b
andb %al, %r15b
cmpq %r12, %r13
jbe 0xa713
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xa701
callq 0x31a0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xa713
callq 0x31a0
testb %r15b, %r15b
je 0xa760
movq 0x88b1(%rip), %rbx      # 0x12fd0
leaq 0x3c61(%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 0x887f(%rip), %rdi      # 0x12fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
jmp 0xa7ce
movq 0x48(%rbx), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rsi
movq (%rsi), %rax
leaq -0x90(%rbp), %rdi
callq *0x8(%rax)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x8843(%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
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa7ce
callq 0x31a0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3bf1(%rip), %rdi      # 0xe3d5
callq 0x3110
leaq 0x3be5(%rip), %rdi      # 0xe3d5
callq 0x3240
jmp 0xa815
jmp 0xa7fb
jmp 0xa815
movq %rdx, %r14
movq %rax, %rbx
jmp 0xa841
jmp 0xa815
movq %rdx, %r14
movq %rax, %rbx
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0xa849
movq %rdx, %r14
movq %rax, %rbx
jmp 0xa853
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0xa82f
movl -0x2c(%rbp), %eax
movl %eax, (%r15)
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa841
callq 0x31a0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xa853
callq 0x31a0
cmpl $0x1, %r14d
jne 0xa897
movq %rbx, %rdi
callq 0x30c0
movq 0x8768(%rip), %rdi      # 0x12fd0
leaq 0x3b18(%rip), %rsi      # 0xe387
movl $0x11, %edx
callq 0x3200
movq 0x8750(%rip), %rdi      # 0x12fd0
callq 0x30e0
callq 0x3280
jmp 0xa7ce
movq %rax, %rbx
callq 0x3280
movq %rbx, %rdi
callq 0x32b0
nop