// File: /workspace/github_c_makefile_star2_O2/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 %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x26d8f(%rip), %rax     # 0x86a08
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
movb %bpl, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movb %r8b, 0x20(%rdi)
callq 0x60256
leaq 0x8(%rsp), %rsi
movq %rbx, (%rsi)
movq %rax, %rdi
callq 0x6055c
movsbl 0x10(%rbx), %edi
testl %edi, %edi
je 0x5fcc6
callq 0x8360
testl %eax, %eax
je 0x5fcc6
callq 0x6049a
movsbl 0x10(%rbx), %esi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x60567
movq 0x8(%rbx), %rdi
callq 0x5fc30
testb %al, %al
je 0x5fd0a
callq 0x6038e
movq %rax, %r15
movq 0x8(%rbx), %rsi
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x8150
leaq 0x48(%rsp), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x60629
leaq 0x48(%rsp), %rdi
callq 0x84b0
jmp 0x5fd40
movq 0x272df(%rip), %rdi     # 0x86ff0
leaq 0x10251(%rip), %rsi     # 0x6ff69
callq 0x83a0
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x83a0
leaq 0x10253(%rip), %rsi     # 0x6ff83
movq %rax, %rdi
callq 0x83a0
movq %rax, %rdi
callq 0x81a0
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x8150
cmpb $0x1, 0x20(%rbx)
jne 0x5fd6a
leaq 0x10247(%rip), %rsi     # 0x6ffa7
leaq 0x8(%rsp), %rdi
callq 0x8790
movq 0x10(%rsp), %rax
movl 0x296b7(%rip), %ecx     # 0x8942c
cmpq %rcx, %rax
jbe 0x5fd80
movl %eax, 0x296ac(%rip)     # 0x8942c
movq %r14, 0x28(%rsp)
movzbl 0x20(%rbx), %eax
movl %eax, 0x30(%rsp)
andq $0x0, 0x38(%rsp)
movsbl %bpl, %eax
movl %eax, 0x40(%rsp)
callq 0x602bc
leaq 0x28(%rsp), %rsi
movq %rax, %rdi
callq 0x606dc
movsbl 0x10(%rbx), %edi
testl %edi, %edi
je 0x5fe1d
callq 0x8360
testl %eax, %eax
je 0x5fde7
callq 0x60322
movsbl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x82e0
cmpb $0x1, 0x20(%rbx)
jne 0x5fe1d
callq 0x60322
pushq $0x3a
popq %rsi
movq %rax, %rdi
callq 0x82e0
jmp 0x5fe1d
movq 0x27202(%rip), %rdi     # 0x86ff0
leaq 0x101b9(%rip), %rsi     # 0x6ffae
callq 0x83a0
movsbl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x8460
leaq 0x10176(%rip), %rsi     # 0x6ff83
movq %rax, %rdi
callq 0x83a0
movq %rax, %rdi
callq 0x81a0
leaq 0x8(%rsp), %rdi
callq 0x84b0
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5fe4a
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x84b0
jmp 0x5fe57
jmp 0x5fe45
movq %rax, %rbx
jmp 0x5fe57
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x84b0
movq %rbx, %rdi
callq 0x86f0
movq %rax, %rdi
callq 0x5c505
nop