// File: /workspace/github_c_makefile_star2_O1/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 0x6be72
leaq 0x2a79d(%rip), %rax     # 0x93920
movq %rax, (%r14)
leaq 0x147a6(%rip), %rsi     # 0x7d933
leaq 0x20(%rsp), %rdi
movq %r14, 0x50(%rsp)
callq 0x7438b
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x14795(%rip), %rsi     # 0x7d942
leaq 0x14798(%rip), %rdx     # 0x7d94c
movq %rsp, %rdi
callq 0x68de4
leaq 0x8(%r14), %r15
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x691e6
callq 0x8390
leaq 0x30(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x691f9
callq 0x8390
leaq 0x1474d(%rip), %rsi     # 0x7d94d
leaq 0x20(%rsp), %rdi
callq 0x7438b
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x1473c(%rip), %rsi     # 0x7d953
leaq 0x14740(%rip), %rdx     # 0x7d95e
callq 0x68de4
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69249
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x69258
callq 0x8390
leaq 0x20(%rsp), %rdi
movl %ebx, %esi
callq 0x74430
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x146ee(%rip), %rsi     # 0x7d95f
leaq 0x146f1(%rip), %rdx     # 0x7d969
callq 0x68de4
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x692a3
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x692b2
callq 0x8390
leaq 0x20(%rsp), %rdi
callq 0x7427c
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x146a1(%rip), %rsi     # 0x7d96a
leaq 0x1469d(%rip), %rdx     # 0x7d96d
callq 0x68de4
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x692fb
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6930a
callq 0x8390
leaq 0x20(%rsp), %rdi
callq 0x73b99
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x1464d(%rip), %rsi     # 0x7d96e
leaq 0x1464a(%rip), %rdx     # 0x7d972
callq 0x68de4
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69353
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x69362
callq 0x8390
testl %r13d, %r13d
jne 0x69388
leaq 0x14605(%rip), %rsi     # 0x7d973
movl $0x2, %ecx
movq 0x48(%rsp), %rdi
xorl %edx, %edx
callq 0x86f0
testq %rax, %rax
je 0x696a4
leaq 0x20(%rsp), %rdi
callq 0x734db
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x1029a(%rip), %rsi     # 0x79639
leaq 0x10296(%rip), %rdx     # 0x7963c
callq 0x68de4
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x693d1
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x693e0
callq 0x8390
leaq 0x20(%rsp), %rdi
movl %r13d, %esi
callq 0x74430
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x14583(%rip), %rsi     # 0x7d97d
leaq 0x14580(%rip), %rdx     # 0x7d981
callq 0x68de4
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6942c
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6943b
callq 0x8390
leaq 0x20(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x74430
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x1452c(%rip), %rsi     # 0x7d982
leaq 0x1452f(%rip), %rdx     # 0x7d98c
callq 0x68de4
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69488
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x69497
callq 0x8390
leaq 0x20(%rsp), %rdi
movl %ebp, %esi
callq 0x74430
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x144dd(%rip), %rsi     # 0x7d98d
leaq 0x144de(%rip), %rdx     # 0x7d995
callq 0x68de4
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x694e2
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x694f1
callq 0x8390
subl 0x44(%rsp), %ebp
leaq 0x20(%rsp), %rdi
movl %ebp, %esi
callq 0x74430
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x14488(%rip), %rsi     # 0x7d996
leaq 0x14489(%rip), %rdx     # 0x7d99e
callq 0x68de4
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69540
callq 0x8390
movq 0x90(%rsp), %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x69557
callq 0x8390
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x69580
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 0x6956a
jmp 0x69585
movl $0x1, %esi
leaq 0x20(%rsp), %rdi
callq 0x74430
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x14403(%rip), %rsi     # 0x7d99f
leaq 0x14404(%rip), %rdx     # 0x7d9a7
callq 0x68de4
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x695ce
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x695dd
callq 0x8390
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x6a6be
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x143b1(%rip), %rsi     # 0x7d9a8
leaq 0x143b3(%rip), %rdx     # 0x7d9b1
callq 0x68de4
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69629
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x69638
callq 0x8390
leaq 0x20(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x6a6be
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x161b2(%rip), %rsi     # 0x7f806
leaq 0x161b2(%rip), %rdx     # 0x7f80d
callq 0x68de4
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69686
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x69695
callq 0x8390
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x142cb(%rip), %rsi     # 0x7d976
leaq 0x20(%rsp), %rdi
callq 0x7436f
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0xff77(%rip), %rsi      # 0x79639
leaq 0xff73(%rip), %rdx      # 0x7963c
callq 0x68de4
movq %rsp, %rsi
movq %r15, %rdi
callq 0x697fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x81f0
jmp 0x693c3
jmp 0x6971f
jmp 0x6972b
jmp 0x69746
jmp 0x6972b
jmp 0x6971f
jmp 0x6972b
jmp 0x6971f
jmp 0x6972b
jmp 0x6971f
jmp 0x6972b
jmp 0x6971f
jmp 0x6972b
jmp 0x6971f
jmp 0x6972b
jmp 0x6971f
jmp 0x6972b
jmp 0x6971f
jmp 0x6972b
jmp 0x6971f
jmp 0x6972b
jmp 0x6971f
jmp 0x6972b
jmp 0x6971f
jmp 0x6972b
jmp 0x6971f
jmp 0x6972b
movq %rax, %rbx
jmp 0x69757
jmp 0x6972b
movq %rax, %rbx
jmp 0x69789
movq %rax, %rbx
jmp 0x69766
jmp 0x69746
jmp 0x69746
jmp 0x69746
jmp 0x69746
jmp 0x69746
jmp 0x69746
jmp 0x69746
jmp 0x69746
jmp 0x69746
jmp 0x69746
jmp 0x69746
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69757
callq 0x8390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x69766
callq 0x8390
movq 0x50(%rsp), %rdi
callq 0x6be9a
movq %rbx, %rdi
callq 0x8720
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69789
callq 0x8390
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x69761
jmp 0x69766
movq %rax, %rdi
callq 0x68c53
nop