// File: /workspace/github_c_makefile_star2_O3/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, 0x44(%rsp)
movl %edx, %r13d
movq %rsi, 0x48(%rsp)
movq %rdi, %r14
callq 0x6bbe6
leaq 0x2a9a5(%rip), %rax     # 0x93920
movq %rax, (%r14)
leaq 0x149fe(%rip), %rsi     # 0x7d983
leaq 0x20(%rsp), %rdi
movq %r14, 0x50(%rsp)
callq 0x73ff3
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x149ed(%rip), %rsi     # 0x7d992
leaq 0x149f0(%rip), %rdx     # 0x7d99c
movq %rsp, %rdi
callq 0x68bce
leaq 0x8(%r14), %r15
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x68fde
callq 0x8390
leaq 0x30(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x68ff1
callq 0x8390
leaq 0x149a5(%rip), %rsi     # 0x7d99d
leaq 0x20(%rsp), %rdi
callq 0x73ff3
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x14994(%rip), %rsi     # 0x7d9a3
leaq 0x14998(%rip), %rdx     # 0x7d9ae
callq 0x68bce
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69041
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x69050
callq 0x8390
leaq 0x20(%rsp), %rdi
movl %ebx, %esi
callq 0x74098
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x14946(%rip), %rsi     # 0x7d9af
leaq 0x14949(%rip), %rdx     # 0x7d9b9
callq 0x68bce
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6909b
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x690aa
callq 0x8390
leaq 0x20(%rsp), %rdi
callq 0x73ee4
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x148f9(%rip), %rsi     # 0x7d9ba
leaq 0x148f5(%rip), %rdx     # 0x7d9bd
callq 0x68bce
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x690f3
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x69102
callq 0x8390
leaq 0x20(%rsp), %rdi
callq 0x7382b
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x148a5(%rip), %rsi     # 0x7d9be
leaq 0x148a2(%rip), %rdx     # 0x7d9c2
callq 0x68bce
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6914b
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6915a
callq 0x8390
testl %r13d, %r13d
jne 0x69180
leaq 0x1485d(%rip), %rsi     # 0x7d9c3
movl $0x2, %ecx
movq 0x48(%rsp), %rdi
xorl %edx, %edx
callq 0x86f0
testq %rax, %rax
je 0x6949c
leaq 0x20(%rsp), %rdi
callq 0x7317f
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x104a2(%rip), %rsi     # 0x79639
leaq 0x1049e(%rip), %rdx     # 0x7963c
callq 0x68bce
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x691c9
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x691d8
callq 0x8390
leaq 0x20(%rsp), %rdi
movl %r13d, %esi
callq 0x74098
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x147db(%rip), %rsi     # 0x7d9cd
leaq 0x147d8(%rip), %rdx     # 0x7d9d1
callq 0x68bce
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69224
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x69233
callq 0x8390
leaq 0x20(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x74098
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x14784(%rip), %rsi     # 0x7d9d2
leaq 0x14787(%rip), %rdx     # 0x7d9dc
callq 0x68bce
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69280
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6928f
callq 0x8390
leaq 0x20(%rsp), %rdi
movl %ebp, %esi
callq 0x74098
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x14735(%rip), %rsi     # 0x7d9dd
leaq 0x14736(%rip), %rdx     # 0x7d9e5
callq 0x68bce
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x692da
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x692e9
callq 0x8390
subl 0x44(%rsp), %ebp
leaq 0x20(%rsp), %rdi
movl %ebp, %esi
callq 0x74098
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x146e0(%rip), %rsi     # 0x7d9e6
leaq 0x146e1(%rip), %rdx     # 0x7d9ee
callq 0x68bce
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69338
callq 0x8390
movq 0x90(%rsp), %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6934f
callq 0x8390
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x69378
movq (%rbx), %rcx
movl $0x1, %esi
xorl %edx, %edx
xorl %edi, %edi
cmpb $0x5f, (%rcx,%rdx)
sete %dil
addl %edi, %esi
incq %rdx
cmpq %rdx, %rax
jne 0x69362
jmp 0x6937d
movl $0x1, %esi
leaq 0x20(%rsp), %rdi
callq 0x74098
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x1465b(%rip), %rsi     # 0x7d9ef
leaq 0x1465c(%rip), %rdx     # 0x7d9f7
callq 0x68bce
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x693c6
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x693d5
callq 0x8390
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x6a49a
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x14609(%rip), %rsi     # 0x7d9f8
leaq 0x1460b(%rip), %rdx     # 0x7da01
callq 0x68bce
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69421
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x69430
callq 0x8390
leaq 0x20(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x6a49a
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x1640a(%rip), %rsi     # 0x7f856
leaq 0x1640a(%rip), %rdx     # 0x7f85d
callq 0x68bce
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6947e
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6948d
callq 0x8390
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x14523(%rip), %rsi     # 0x7d9c6
leaq 0x20(%rsp), %rdi
callq 0x73fd7
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x1017f(%rip), %rsi     # 0x79639
leaq 0x1017b(%rip), %rdx     # 0x7963c
callq 0x68bce
movq %rsp, %rsi
movq %r15, %rdi
callq 0x695f2
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
jmp 0x691bb
jmp 0x69517
jmp 0x69523
jmp 0x6953e
jmp 0x69523
jmp 0x69517
jmp 0x69523
jmp 0x69517
jmp 0x69523
jmp 0x69517
jmp 0x69523
jmp 0x69517
jmp 0x69523
jmp 0x69517
jmp 0x69523
jmp 0x69517
jmp 0x69523
jmp 0x69517
jmp 0x69523
jmp 0x69517
jmp 0x69523
jmp 0x69517
jmp 0x69523
jmp 0x69517
jmp 0x69523
jmp 0x69517
jmp 0x69523
movq %rax, %rbx
jmp 0x6954f
jmp 0x69523
movq %rax, %rbx
jmp 0x69581
movq %rax, %rbx
jmp 0x6955e
jmp 0x6953e
jmp 0x6953e
jmp 0x6953e
jmp 0x6953e
jmp 0x6953e
jmp 0x6953e
jmp 0x6953e
jmp 0x6953e
jmp 0x6953e
jmp 0x6953e
jmp 0x6953e
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6954f
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6955e
callq 0x8390
movq 0x50(%rsp), %rdi
callq 0x6bc0e
movq %rbx, %rdi
callq 0x8720
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69581
callq 0x8390
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x69559
jmp 0x6955e
movq %rax, %rdi
callq 0x68a31
nop