// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/flags.cpp
// Function: flag::Flag::Flag(char const*, char, char const*, bool)
Flag::Flag(const char * ln, const char sn, const char * ds, const bool ha)
  : long_name(ln), short_name(sn), description(ds), has_arg(ha)
{
  Flag::instances().push_back(this);

  // Map the names to this Flag object (if names are valid).
  if (short_name && isgraph(short_name))
    safe_add(Flag::short_names(), short_name, this);
  if (all_isgraph(long_name)) {
    safe_add(Flag::long_names(), string(long_name), this);
  } else {
    cerr << "WARNING: Flag long name '" << long_name
         << "' is not legal and will be ignored." << endl;
  }

  // Keep track of the longest name for later help output formatting.
  string temp(long_name);
  if (has_arg) {
    temp += "=VALUE";
  }
  if (temp.length() > longest_long_name) {
    longest_long_name = temp.length();
  }

  // Create an option struct and add it to the list.
  struct option opt = {ln, has_arg ? 1 : 0, 0, sn};
  Flag::options().push_back(opt);

  // Add the short_name to a flag_code string.
  if (short_name) {
     if (isgraph(short_name)) {
      Flag::codes().push_back(short_name);
      if (has_arg) {
        Flag::codes().push_back(':');
      }
    } else {
      cerr << "WARNING: Flag short name character '" << short_name
           << "' is not legal and will be ignored." << endl;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x26ef5(%rip), %rax     # 0x939d8
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
movb %bpl, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movb %r8b, 0x20(%rdi)
callq 0x6d2d2
movq %rax, %r15
movl $0x18, %edi
callq 0x83f0
movq %rbx, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x8070
incq 0x10(%r15)
movsbl 0x10(%rbx), %edi
testl %edi, %edi
je 0x6cb40
callq 0x8380
testl %eax, %eax
je 0x6cb40
callq 0x6d424
movsbl 0x10(%rbx), %esi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x6d4a5
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x6cb69
movb (%r15), %al
testb %al, %al
je 0x6cb69
incq %r15
movsbl %al, %edi
callq 0x8380
testl %eax, %eax
je 0x6cbb0
movb (%r15), %al
incq %r15
testb %al, %al
jne 0x6cb53
callq 0x6d32c
movq %rax, %r15
movq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x8170
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x6d5d4
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cc43
callq 0x8390
jmp 0x6cc43
movq 0x27431(%rip), %r15     # 0x93fe8
leaq 0x11405(%rip), %rsi     # 0x7dfc3
movl $0x19, %edx
movq %r15, %rdi
callq 0x8470
movq 0x8(%rbx), %r12
testq %r12, %r12
je 0x6cbf0
movq %r12, %rdi
callq 0x8190
movq 0x27405(%rip), %rdi     # 0x93fe8
movq %r12, %rsi
movq %rax, %rdx
callq 0x8470
jmp 0x6cc08
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x86b0
leaq 0x113ce(%rip), %rsi     # 0x7dfdd
movl $0x23, %edx
movq %r15, %rdi
callq 0x8470
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x83c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8250
movq 0x8(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8170
cmpb $0x1, 0x20(%rbx)
jne 0x6cc6d
leaq 0x1139e(%rip), %rsi     # 0x7e001
leaq 0x10(%rsp), %rdi
callq 0x87c0
movq 0x18(%rsp), %rax
movl 0x297b4(%rip), %ecx     # 0x9642c
cmpq %rcx, %rax
jbe 0x6cc83
movl %eax, 0x297a9(%rip)     # 0x9642c
movzbl 0x20(%rbx), %r12d
callq 0x6d2f0
movq %rax, %r15
movl $0x30, %edi
callq 0x83f0
movsbl %bpl, %ecx
movq %r14, 0x10(%rax)
movl %r12d, 0x18(%rax)
movq $0x0, 0x20(%rax)
movl %ecx, 0x28(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x8070
incq 0x10(%r15)
movsbl 0x10(%rbx), %edi
testl %edi, %edi
je 0x6cd75
callq 0x8380
testl %eax, %eax
je 0x6cd04
callq 0x6d30e
movsbl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x8310
cmpb $0x1, 0x20(%rbx)
jne 0x6cd75
callq 0x6d30e
movq %rax, %rdi
movl $0x3a, %esi
callq 0x8310
jmp 0x6cd75
movq 0x272dd(%rip), %rdi     # 0x93fe8
leaq 0x112f6(%rip), %rsi     # 0x7e008
movl $0x24, %edx
callq 0x8470
movb 0x10(%rbx), %al
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
movq 0x272bb(%rip), %rdi     # 0x93fe8
movl $0x1, %edx
callq 0x8470
movq %rax, %rbx
leaq 0x1129c(%rip), %rsi     # 0x7dfdd
movl $0x23, %edx
movq %rax, %rdi
callq 0x8470
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x83c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8250
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cd88
callq 0x8390
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6cda8
movq %rax, %rbx
leaq 0x40(%rsp), %rax
jmp 0x6cdb0
jmp 0x6cda3
movq %rax, %rbx
jmp 0x6cdbe
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cdbe
callq 0x8390
movq %rbx, %rdi
callq 0x8720