// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/command.cpp
// Function: ash::Command::Command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Command::Command(const string command, const int rval, const int start_ts,
                 const int end_ts, const int number, const string pipes)
{
  values["session_id"] = unix::env_int("ASH_SESSION_ID");
  values["shell_level"] = unix::env_int("SHLVL");
  values["command_no"] = Util::to_string(number);
  values["tty"] = unix::tty();
  values["euid"] = unix::euid();
  if (rval == 0 && command.find("cd") == 0) {
    values["cwd"] = unix::env("OLDPWD");
  } else {
    values["cwd"] = unix::cwd();
  }
  values["rval"] = Util::to_string(rval);
  values["start_time"] = Util::to_string(start_ts);
  values["end_time"] = Util::to_string(end_ts);
  values["duration"] = Util::to_string(end_ts - start_ts);
  int pipe_cnt = 1;
  for (string::const_iterator i = pipes.begin(), e = pipes.end(); i != e; ++i)
    if ((*i) == '_') ++pipe_cnt;
  values["pipe_cnt"] = Util::to_string(pipe_cnt);
  values["pipe_vals"] = quote(pipes);
  values["command"] = quote(command);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r12d
movl %edx, %r13d
movq %rsi, %r14
movq %rdi, %r15
callq 0x5efb4
leaq 0x2a01c(%rip), %rax     # 0x86950
movq %r15, 0x50(%rsp)
movq %rax, (%r15)
leaq 0x12fe6(%rip), %rsi     # 0x6f929
leaq 0x30(%rsp), %rdi
callq 0x665cb
leaq 0x12fe4(%rip), %rsi     # 0x6f938
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
movq 0x50(%rsp), %rax
leaq 0x8(%rax), %r15
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
leaq 0x12fa2(%rip), %rsi     # 0x6f943
leaq 0x30(%rsp), %rdi
callq 0x665cb
leaq 0x12f97(%rip), %rsi     # 0x6f949
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
movl %ebx, %esi
callq 0x6666c
leaq 0x12f53(%rip), %rsi     # 0x6f955
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x664f2
leaq 0x12f10(%rip), %rsi     # 0x6f960
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x65f8b
leaq 0x12ec6(%rip), %rsi     # 0x6f964
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
testl %r13d, %r13d
jne 0x5cafa
leaq 0x12e82(%rip), %rsi     # 0x6f969
movq %r14, %rdi
xorl %edx, %edx
callq 0x87d0
testq %rax, %rax
je 0x5cdb6
leaq 0x30(%rsp), %rdi
callq 0x65a0b
leaq 0xeb4e(%rip), %rsi      # 0x6b659
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
movl %r13d, %esi
callq 0x6666c
leaq 0x12e17(%rip), %rsi     # 0x6f973
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
movl %r12d, %esi
callq 0x6666c
leaq 0x12dcb(%rip), %rsi     # 0x6f978
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
movl %ebp, %esi
callq 0x6666c
leaq 0x12d86(%rip), %rsi     # 0x6f983
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
subl %r12d, %ebp
leaq 0x30(%rsp), %rdi
movl %ebp, %esi
callq 0x6666c
leaq 0x12d3c(%rip), %rsi     # 0x6f98c
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
movq 0x90(%rsp), %rbx
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
pushq $0x1
popq %rsi
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x5ccb7
xorl %edi, %edi
cmpb $0x5f, (%rax,%rdx)
sete %dil
addl %edi, %esi
incq %rdx
jmp 0x5cca1
leaq 0x30(%rsp), %rdi
callq 0x6666c
leaq 0x12ccd(%rip), %rsi     # 0x6f995
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x5dd76
leaq 0x12c85(%rip), %rsi     # 0x6f99e
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x5dd76
leaq 0x14aa6(%rip), %rsi     # 0x71810
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12baf(%rip), %rsi     # 0x6f96c
leaq 0x30(%rsp), %rdi
callq 0x665af
leaq 0xe88b(%rip), %rsi      # 0x6b659
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d07c
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cb48
jmp 0x5cfeb
movq %rax, %r14
jmp 0x5ce27
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
jmp 0x5cfeb
jmp 0x5cfeb
movq %rax, %r14
jmp 0x5ce52
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
jmp 0x5cfeb
movq %rax, %r14
jmp 0x5ce78
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
jmp 0x5cfeb
movq %rax, %r14
jmp 0x5ce9e
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
jmp 0x5cfeb
movq %rax, %r14
jmp 0x5cec4
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
jmp 0x5cfeb
movq %rax, %r14
jmp 0x5ceea
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
jmp 0x5cfeb
movq %rax, %r14
jmp 0x5cf10
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
jmp 0x5cfeb
movq %rax, %r14
jmp 0x5cf36
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
jmp 0x5cfeb
movq %rax, %r14
jmp 0x5cf5c
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
jmp 0x5cfeb
movq %rax, %r14
jmp 0x5cf7f
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
jmp 0x5cfeb
movq %rax, %r14
jmp 0x5cf9f
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
jmp 0x5cfeb
movq %rax, %r14
jmp 0x5cfbf
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
jmp 0x5cfeb
movq %rax, %r14
jmp 0x5cfdf
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
movq %rax, %r14
movq 0x50(%rsp), %rdi
callq 0x5efda
movq %r14, %rdi
callq 0x86f0
movq %rax, %r14
jmp 0x5d012
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x5cfee
movq %rax, %rdi
callq 0x5c505