// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/shlang/flag_manager.cpp
// Function: GetFlag(char const**, FlagInfo*, int*)
void GetFlag(const char** argv, FlagInfo* info, int* offset)
{
    assert(argv);
    assert(info);

    if (strcmp(argv[*offset], flags[0]) == 0)
    {
        printf("%s\n", help_message);
    }
    else if (strcmp(argv[*offset], flags[1]) == 0)
    {
        info->output_file = argv[++*offset];
    }
    else if (strcmp(argv[*offset], flags[2]) == 0)
    {
        info->asm_listing_required = true;
    }
    else if (strcmp(argv[*offset], flags[3]) == 0)
    {
        info->speed_optimization_required = true;
    }
    else if (strcmp(argv[*offset], flags[4]) == 0)
    {
        info->memory_optimization_required = true;
    }
    else if (strcmp(argv[*offset], flags[5]) == 0)
    {
        info->parser_dump_required = true;
    }
    else if (strcmp(argv[*offset], flags[6]) == 0)
    {
        info->tree_dump_required = true;
    }
    else if (strcmp(argv[*offset], flags[7]) == 0)
    {
        info->nametable_dump_required = true;
    }
    else if (strcmp(argv[*offset], flags[8]) == 0)
    {
        info->emit_tree_requiered = true;
    }
    else if (strcmp(argv[*offset], flags[9]) == 0)
    {
        info->emit_code_requiered = true;
    }
    else
    {
        printf("Unknown flag <%s>. Use -h for help.\n", argv[*offset]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1532
movq %rsi, %rbx
testq %rsi, %rsi
je 0x154b
movq %rdx, %r15
movq %rdi, %r12
movslq (%rdx), %r13
movq (%rdi,%r13,8), %r14
movq 0x2c91(%rip), %rsi      # 0x4060
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x14c9
movq 0x2c82(%rip), %rsi      # 0x4068
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x14e3
movq 0x2c73(%rip), %rsi      # 0x4070
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x14f5
movq 0x2c64(%rip), %rsi      # 0x4078
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x14fb
movq 0x2c55(%rip), %rsi      # 0x4080
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x1501
movq 0x2c46(%rip), %rsi      # 0x4088
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x1507
movq 0x2c37(%rip), %rsi      # 0x4090
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x150d
movq 0x2c28(%rip), %rsi      # 0x4098
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x1513
movq 0x2c19(%rip), %rsi      # 0x40a0
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x1519
movq 0x2c0a(%rip), %rsi      # 0x40a8
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x151f
leaq 0x10a0(%rip), %rdi      # 0x2551
movq %r14, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
movq 0x2be0(%rip), %rdi      # 0x40b0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1080
leaq 0x1(%r13), %rax
movl %eax, (%r15)
movq 0x8(%r12,%r13,8), %rax
movq %rax, 0x8(%rbx)
jmp 0x1523
movb $0x1, 0x15(%rbx)
jmp 0x1523
movb $0x1, 0x16(%rbx)
jmp 0x1523
movb $0x1, 0x17(%rbx)
jmp 0x1523
movb $0x1, 0x12(%rbx)
jmp 0x1523
movb $0x1, 0x13(%rbx)
jmp 0x1523
movb $0x1, 0x14(%rbx)
jmp 0x1523
movb $0x1, 0x10(%rbx)
jmp 0x1523
movb $0x1, 0x11(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xfc8(%rip), %rdi       # 0x2501
leaq 0xfc6(%rip), %rsi       # 0x2506
leaq 0xfdb(%rip), %rcx       # 0x2522
pushq $0x19
jmp 0x1562
leaq 0xab2(%rip), %rdi       # 0x2004
leaq 0xfad(%rip), %rsi       # 0x2506
leaq 0xfc2(%rip), %rcx       # 0x2522
pushq $0x1a
popq %rdx
callq 0x1050