// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movb %bl, -0x29(%rbp)
movl %edi, %eax
addl $-0x61, %eax
cmpl $0x15, %eax
ja 0x94a9
leaq 0x5f1d(%rip), %rcx      # 0xf1c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpb $0x1, 0xb2c5(%rip)      # 0x14578
jne 0x92fe
movq 0xacfc(%rip), %r14      # 0x13fb8
leaq 0x606e(%rip), %rsi      # 0xf331
movl $0x3e, %edx
movq %r14, %rdi
callq 0x32c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movb $0x1, 0xb2ba(%rip)      # 0x145b8
movb %bl, 0xaf14(%rip)       # 0x14218
movb $0x1, 0xb26d(%rip)      # 0x14578
jmp 0x9498
cmpb $0x1, 0xb263(%rip)      # 0x1457a
jne 0x9362
movq 0xac98(%rip), %r14      # 0x13fb8
leaq 0x6087(%rip), %rsi      # 0xf3ae
movl $0x3f, %edx
movq %r14, %rdi
callq 0x32c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movb $0x1, 0xb256(%rip)      # 0x145b8
movb %bl, 0xaeb2(%rip)       # 0x1421a
movb $0x1, 0xb20b(%rip)      # 0x1457a
jmp 0x9498
cmpb $0x1, 0xb201(%rip)      # 0x1457c
jne 0x93c6
movq 0xac34(%rip), %r14      # 0x13fb8
leaq 0x6063(%rip), %rsi      # 0xf3ee
movl $0x41, %edx
movq %r14, %rdi
callq 0x32c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movb $0x1, 0xb1f2(%rip)      # 0x145b8
movb %bl, 0xae50(%rip)       # 0x1421c
movb $0x1, 0xb1a9(%rip)      # 0x1457c
jmp 0x9498
cmpb $0x1, 0xb19a(%rip)      # 0x14579
jne 0x942a
movq 0xabd0(%rip), %r14      # 0x13fb8
leaq 0x5f81(%rip), %rsi      # 0xf370
movl $0x3d, %edx
movq %r14, %rdi
callq 0x32c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movb $0x1, 0xb18e(%rip)      # 0x145b8
movb %bl, 0xade9(%rip)       # 0x14219
movb $0x1, 0xb142(%rip)      # 0x14579
jmp 0x9498
cmpb $0x1, 0xb13b(%rip)      # 0x1457b
jne 0x948b
movq 0xab6f(%rip), %r14      # 0x13fb8
leaq 0x5fe0(%rip), %rsi      # 0xf430
movl $0x40, %edx
movq %r14, %rdi
callq 0x32c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movb $0x1, 0xb12d(%rip)      # 0x145b8
movb %bl, 0xad8a(%rip)       # 0x1421b
movb $0x1, 0xb0e3(%rip)      # 0x1457b
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xb018(%rip), %rcx      # 0x144c8
testq %rcx, %rcx
je 0x94e3
leaq 0xb004(%rip), %rax      # 0x144c0
xorl %edx, %edx
cmpb %bl, 0x20(%rcx)
setl %dl
cmovgeq %rcx, %rax
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0x94bc
leaq 0xafe7(%rip), %rcx      # 0x144c0
cmpq %rcx, %rax
je 0x94e3
cmpb %bl, 0x20(%rax)
jle 0x94e7
xorl %eax, %eax
jmp 0x949a
leaq 0xafca(%rip), %rdi      # 0x144b8
leaq -0x29(%rbp), %rsi
callq 0xd174
movq %rax, %r14
leaq 0xad37(%rip), %rbx      # 0x14238
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3170
leaq 0x20(%r14), %rsi
leaq 0xad41(%rip), %rdi      # 0x14258
callq 0x3170
leaq 0x40(%r14), %rsi
leaq 0xad51(%rip), %rdi      # 0x14278
callq 0x3170
leaq 0x60(%r14), %rsi
leaq 0xad61(%rip), %rdi      # 0x14298
callq 0x3170
movl $0x80, %r15d
leaq (%r14,%r15), %rsi
leaq (%rbx,%r15), %rdi
callq 0x3170
movl $0xa0, %r12d
leaq (%r14,%r12), %rsi
leaq (%rbx,%r12), %rdi
callq 0x3170
movl $0xc0, %r13d
leaq (%r14,%r13), %rsi
leaq (%rbx,%r13), %rdi
callq 0x3170
movl $0xe0, %eax
addq %rax, %r14
addq %rax, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3170
leaq 0xaf56(%rip), %rdi      # 0x144e8
leaq -0x29(%rbp), %rsi
callq 0xd1dc
movq %rax, %rbx
leaq 0xad93(%rip), %r14      # 0x14338
movq %r14, %rdi
movq %rax, %rsi
callq 0x3170
leaq 0x20(%rbx), %rsi
leaq 0xad9d(%rip), %rdi      # 0x14358
callq 0x3170
leaq 0x40(%rbx), %rsi
leaq 0xadad(%rip), %rdi      # 0x14378
callq 0x3170
leaq 0x60(%rbx), %rsi
leaq 0xadbd(%rip), %rdi      # 0x14398
callq 0x3170
leaq (%rbx,%r15), %rsi
addq %r14, %r15
movq %r15, %rdi
callq 0x3170
leaq (%rbx,%r12), %rsi
addq %r14, %r12
movq %r12, %rdi
callq 0x3170
leaq (%rbx,%r13), %rsi
addq %r14, %r13
movq %r13, %rdi
callq 0x3170
movl $0xe0, %edi
leaq (%rbx,%rdi), %rsi
addq %r14, %rdi
callq 0x3170
movl $0x100, %edi            # imm = 0x100
leaq (%rbx,%rdi), %rsi
addq %r14, %rdi
callq 0x3170
movl $0x120, %edi            # imm = 0x120
leaq (%rbx,%rdi), %rsi
addq %r14, %rdi
callq 0x3170
movl $0x140, %edi            # imm = 0x140
leaq (%rbx,%rdi), %rsi
addq %r14, %rdi
callq 0x3170
movl $0x160, %eax            # imm = 0x160
addq %rax, %rbx
addq %rax, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3170
jmp 0x9498