// File: /workspace/github_cpp_makefile_star2_O2/AsherGlick[P]CommentHeader/source/main.cpp
// Function: activateFlag(char)
bool activateFlag(char flag) {
  switch ( flag ) {
    // Chose one of these output flags
    case 'h':
    case 's':
    case 'b':
    case 't':
    case 'f':
      if(outputFormatFlagSet) {
        cout << "You have set multiple output format flags, only one is allowed" << endl;
        postArgParseHalt = true;
      }
      outputFormatFlag = flag;
      outputFormatFlagSet = true;
      return true;
    
    // Choose edge closed pattern
    case 'g':
    case 'e':
      if(outputRightWallFlagSet) {
        cout << "You have set multiple bounding box flags, only one is allowed" << endl;
        postArgParseHalt = true;
      }
      outputRightWallFlag = flag;
      outputRightWallFlagSet = true;
      return true;

    // Choose input location
    case 'i':
    case 'a':
    case 'c':
      if(inputLocationFlagSet) {
        cout << "You have set multiple input location flags, only one is allowed" << endl;
        postArgParseHalt = true;
      }
      inputLocationFlag = flag;
      inputLocationFlagSet = true;
      return true;

    // Choose output alignment
    case 'r':
    case 'm':
    case 'n':
      if (outputAlignmentFlagSet) {
        cout << "You have set multiple output alignment flags, only one is allowed" << endl;
        postArgParseHalt = true;
      }
      outputAlignmentFlag = flag;
      outputAlignmentFlagSet = true;
      return true;

    // Choose output location
    case 'o':   
    case 'v':
      if (outputLocationFlagSet) {
        cout << "You have set multiple output location flags, only one is allowed" << endl;
        postArgParseHalt = true;
      }
      outputLocationFlag = flag;
      outputLocationFlagSet = true;
      return true;
  }

  // Find the flag in the language map
  map<char, headerStyle>::iterator it = headerStyles.find(flag);
  if (it != headerStyles.end()) {
    globalHeaderStyle = headerStyles[flag];
    globalTitleStyle = titleStyles[flag];
    return true;
  }

  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movb %bl, -0x9(%rbp)
movl %edi, %eax
addl $-0x61, %eax
cmpl $0x15, %eax
ja 0x7ae2
leaq 0x47e9(%rip), %rcx      # 0xc194
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpb $0x1, 0xabbd(%rip)      # 0x12578
jne 0x79df
movq 0xa604(%rip), %rdi      # 0x11fc8
leaq 0x493a(%rip), %rsi      # 0xc305
callq 0x3260
movq %rax, %rdi
callq 0x3130
movb $0x1, 0xabd9(%rip)      # 0x125b8
movb %bl, 0xa833(%rip)       # 0x12218
movb $0x1, 0xab8c(%rip)      # 0x12578
jmp 0x7b3e
cmpb $0x1, 0xab82(%rip)      # 0x1257a
jne 0x7a1c
movq 0xa5c7(%rip), %rdi      # 0x11fc8
leaq 0x497a(%rip), %rsi      # 0xc382
callq 0x3260
movq %rax, %rdi
callq 0x3130
movb $0x1, 0xab9c(%rip)      # 0x125b8
movb %bl, 0xa7f8(%rip)       # 0x1221a
movb $0x1, 0xab51(%rip)      # 0x1257a
jmp 0x7b3e
cmpb $0x1, 0xab47(%rip)      # 0x1257c
jne 0x7a59
movq 0xa58a(%rip), %rdi      # 0x11fc8
leaq 0x497d(%rip), %rsi      # 0xc3c2
callq 0x3260
movq %rax, %rdi
callq 0x3130
movb $0x1, 0xab5f(%rip)      # 0x125b8
movb %bl, 0xa7bd(%rip)       # 0x1221c
movb $0x1, 0xab16(%rip)      # 0x1257c
jmp 0x7b3e
cmpb $0x1, 0xab07(%rip)      # 0x12579
jne 0x7a96
movq 0xa54d(%rip), %rdi      # 0x11fc8
leaq 0x48c2(%rip), %rsi      # 0xc344
callq 0x3260
movq %rax, %rdi
callq 0x3130
movb $0x1, 0xab22(%rip)      # 0x125b8
movb %bl, 0xa77d(%rip)       # 0x12219
movb $0x1, 0xaad6(%rip)      # 0x12579
jmp 0x7b3e
cmpb $0x1, 0xaacc(%rip)      # 0x1257b
jne 0x7ad3
movq 0xa510(%rip), %rdi      # 0x11fc8
leaq 0x4945(%rip), %rsi      # 0xc404
callq 0x3260
movq %rax, %rdi
callq 0x3130
movb $0x1, 0xaae5(%rip)      # 0x125b8
movb %bl, 0xa742(%rip)       # 0x1221b
movb $0x1, 0xaa9b(%rip)      # 0x1257b
jmp 0x7b3e
leaq 0xa9cf(%rip), %rdi      # 0x124b8
leaq -0x9(%rbp), %rsi
callq 0xab10
leaq 0xa9c7(%rip), %rcx      # 0x124c0
cmpq %rcx, %rax
je 0x7b47
leaq 0xa9b3(%rip), %rdi      # 0x124b8
leaq -0x9(%rbp), %rbx
movq %rbx, %rsi
callq 0xa106
leaq 0xa720(%rip), %rdi      # 0x12238
movq %rax, %rsi
callq 0x57aa
leaq 0xa9c1(%rip), %rdi      # 0x124e8
movq %rbx, %rsi
callq 0xa158
leaq 0xa802(%rip), %rdi      # 0x12338
movq %rax, %rsi
callq 0x59b2
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
jmp 0x7b40