// File: /workspace/github_cpp_makefile_star2_O1/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
movb %dil, -0x29(%rbp)
movl %edi, %eax
addl $-0x61, %eax
cmpl $0x15, %eax
ja 0x9535
leaq 0x5ea2(%rip), %rcx      # 0xf1c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpb $0x1, 0xb24a(%rip)      # 0x14578
jne 0x9379
movq 0xac81(%rip), %rbx      # 0x13fb8
leaq 0x5ff3(%rip), %rsi      # 0xf331
movl $0x3e, %edx
movq %rbx, %rdi
callq 0x32c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movb $0x1, 0xb23f(%rip)      # 0x145b8
movb -0x29(%rbp), %al
movb %al, 0xae96(%rip)       # 0x14218
movb $0x1, 0xb1ef(%rip)      # 0x14578
jmp 0x9522
cmpb $0x1, 0xb1e5(%rip)      # 0x1457a
jne 0x93e0
movq 0xac1a(%rip), %rbx      # 0x13fb8
leaq 0x6009(%rip), %rsi      # 0xf3ae
movl $0x3f, %edx
movq %rbx, %rdi
callq 0x32c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movb $0x1, 0xb1d8(%rip)      # 0x145b8
movb -0x29(%rbp), %al
movb %al, 0xae31(%rip)       # 0x1421a
movb $0x1, 0xb18a(%rip)      # 0x1457a
jmp 0x9522
cmpb $0x1, 0xb180(%rip)      # 0x1457c
jne 0x9447
movq 0xabb3(%rip), %rbx      # 0x13fb8
leaq 0x5fe2(%rip), %rsi      # 0xf3ee
movl $0x41, %edx
movq %rbx, %rdi
callq 0x32c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movb $0x1, 0xb171(%rip)      # 0x145b8
movb -0x29(%rbp), %al
movb %al, 0xadcc(%rip)       # 0x1421c
movb $0x1, 0xb125(%rip)      # 0x1457c
jmp 0x9522
cmpb $0x1, 0xb116(%rip)      # 0x14579
jne 0x94ae
movq 0xab4c(%rip), %rbx      # 0x13fb8
leaq 0x5efd(%rip), %rsi      # 0xf370
movl $0x3d, %edx
movq %rbx, %rdi
callq 0x32c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movb $0x1, 0xb10a(%rip)      # 0x145b8
movb -0x29(%rbp), %al
movb %al, 0xad62(%rip)       # 0x14219
movb $0x1, 0xb0bb(%rip)      # 0x14579
jmp 0x9522
cmpb $0x1, 0xb0b4(%rip)      # 0x1457b
jne 0x9512
movq 0xaae8(%rip), %rbx      # 0x13fb8
leaq 0x5f59(%rip), %rsi      # 0xf430
movl $0x40, %edx
movq %rbx, %rdi
callq 0x32c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movb $0x1, 0xb0a6(%rip)      # 0x145b8
movb -0x29(%rbp), %al
movb %al, 0xad00(%rip)       # 0x1421b
movb $0x1, 0xb059(%rip)      # 0x1457b
movb $0x1, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xaf8c(%rip), %rdx      # 0x144c8
leaq 0xaf7d(%rip), %rax      # 0x144c0
movq %rax, %rcx
testq %rdx, %rdx
je 0x956a
leaq 0xaf6e(%rip), %rcx      # 0x144c0
xorl %esi, %esi
cmpb %dil, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x9552
cmpq %rax, %rcx
je 0x9578
cmpb %dil, 0x20(%rcx)
setle %bl
jmp 0x957a
xorl %ebx, %ebx
testb %bl, %bl
je 0x9524
leaq 0xaf33(%rip), %rdi      # 0x144b8
leaq -0x29(%rbp), %rsi
callq 0xd1e8
movq %rax, %r15
leaq 0xaca0(%rip), %r14      # 0x14238
movq %r14, %rdi
movq %rax, %rsi
callq 0x3170
leaq 0x20(%r15), %rsi
leaq 0xacaa(%rip), %rdi      # 0x14258
callq 0x3170
leaq 0x40(%r15), %rsi
leaq 0xacba(%rip), %rdi      # 0x14278
callq 0x3170
leaq 0x60(%r15), %rsi
leaq 0xacca(%rip), %rdi      # 0x14298
callq 0x3170
movl $0x80, %r12d
leaq (%r15,%r12), %rsi
leaq (%r14,%r12), %rdi
callq 0x3170
movl $0xa0, %r13d
leaq (%r15,%r13), %rsi
leaq (%r14,%r13), %rdi
callq 0x3170
movl $0xc0, %eax
leaq (%r15,%rax), %rsi
leaq (%r14,%rax), %rdi
callq 0x3170
movl $0xe0, %eax
addq %rax, %r15
addq %rax, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x3170
leaq 0xaec0(%rip), %rdi      # 0x144e8
leaq -0x29(%rbp), %rsi
callq 0xd250
movq %rax, %r14
leaq 0xacfd(%rip), %r15      # 0x14338
movq %r15, %rdi
movq %rax, %rsi
callq 0x3170
leaq 0x20(%r14), %rsi
leaq 0xad07(%rip), %rdi      # 0x14358
callq 0x3170
leaq 0x40(%r14), %rsi
leaq 0xad17(%rip), %rdi      # 0x14378
callq 0x3170
leaq 0x60(%r14), %rsi
leaq 0xad27(%rip), %rdi      # 0x14398
callq 0x3170
leaq (%r14,%r12), %rsi
addq %r15, %r12
movq %r12, %rdi
callq 0x3170
leaq (%r14,%r13), %rsi
addq %r15, %r13
movq %r13, %rdi
callq 0x3170
movl $0xc0, %edi
leaq (%r14,%rdi), %rsi
addq %r15, %rdi
callq 0x3170
movl $0xe0, %edi
leaq (%r14,%rdi), %rsi
addq %r15, %rdi
callq 0x3170
movl $0x100, %edi            # imm = 0x100
leaq (%r14,%rdi), %rsi
addq %r15, %rdi
callq 0x3170
movl $0x120, %edi            # imm = 0x120
leaq (%r14,%rdi), %rsi
addq %r15, %rdi
callq 0x3170
movl $0x140, %edi            # imm = 0x140
leaq (%r14,%rdi), %rsi
addq %r15, %rdi
callq 0x3170
movl $0x160, %eax            # imm = 0x160
addq %rax, %r14
addq %rax, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3170
jmp 0x9524