// File: /workspace/github_cpp_makefile_star2_O1/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 0x153e
movq %rsi, %rbx
testq %rsi, %rsi
je 0x155d
movq %rdx, %r15
movq %rdi, %r12
movslq (%rdx), %r13
movq (%rdi,%r13,8), %r14
movq 0x2c85(%rip), %rsi      # 0x4060
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x14d5
movq 0x2c76(%rip), %rsi      # 0x4068
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x14ef
movq 0x2c67(%rip), %rsi      # 0x4070
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x1501
movq 0x2c58(%rip), %rsi      # 0x4078
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x1507
movq 0x2c49(%rip), %rsi      # 0x4080
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x150d
movq 0x2c3a(%rip), %rsi      # 0x4088
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x1513
movq 0x2c2b(%rip), %rsi      # 0x4090
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x1519
movq 0x2c1c(%rip), %rsi      # 0x4098
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x151f
movq 0x2c0d(%rip), %rsi      # 0x40a0
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x1525
movq 0x2bfe(%rip), %rsi      # 0x40a8
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
je 0x152b
leaq 0x1094(%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 0x2bd4(%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 0x152f
movb $0x1, 0x15(%rbx)
jmp 0x152f
movb $0x1, 0x16(%rbx)
jmp 0x152f
movb $0x1, 0x17(%rbx)
jmp 0x152f
movb $0x1, 0x12(%rbx)
jmp 0x152f
movb $0x1, 0x13(%rbx)
jmp 0x152f
movb $0x1, 0x14(%rbx)
jmp 0x152f
movb $0x1, 0x10(%rbx)
jmp 0x152f
movb $0x1, 0x11(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xfbc(%rip), %rdi       # 0x2501
leaq 0xfba(%rip), %rsi       # 0x2506
leaq 0xfcf(%rip), %rcx       # 0x2522
movl $0x19, %edx
callq 0x1050
leaq 0xaa0(%rip), %rdi       # 0x2004
leaq 0xf9b(%rip), %rsi       # 0x2506
leaq 0xfb0(%rip), %rcx       # 0x2522
movl $0x1a, %edx
callq 0x1050