// File: /workspace/github_cpp_makefile_star2_O1/joakimkistowski[P]amd-disable-c6/amd-disable-c6.cpp
// Function: parse_op_mode(int, char const**)
op_mode parse_op_mode(const int argc, const char *argv[]) {
    if (argc <= 1) {
        std::cout << "Disabling C6 state. Run with \"-h\" to display other options." << std::endl;
        return DISABLE;
    }
    std::string argument(argv[1]);
    if (argument == FLAG_HELP0 || argument == FLAG_HELP1) {
        print_help();
        return NONE;
    } else if (argument == FLAG_LIST0 || argument == FLAG_LIST1) {
        return LIST;
    } else if (argument == FLAG_DISABLE) {
        return DISABLE;
    } else if (argument == FLAG_DISABLE_RETRY) {
        return RETRYDISABLE;
    } else if (argument == FLAG_ENABLE) {
        return ENABLE;
    }
    std::cerr << "Error, unknown parameter: " << argument << std::endl;
    return ERROR;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
cmpl $0x1, %edi
jg 0x36e7
movq 0x392b(%rip), %rbx      # 0x6fd0
leaq 0x1bd0(%rip), %rsi      # 0x527c
movl $0x3b, %edx
movq %rbx, %rdi
callq 0x21e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
xorl %ebp, %ebp
jmp 0x38af
movq 0x8(%rsi), %rsi
leaq 0x8(%rsp), %rbx
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
callq 0x3ef6
movq 0x8(%rbx), %rbx
cmpq 0x3ab8(%rip), %rbx      # 0x71c0
jne 0x372f
testq %rbx, %rbx
je 0x388a
movq 0x3a9e(%rip), %rsi      # 0x71b8
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x388a
cmpq 0x3aaa(%rip), %rbx      # 0x71e0
jne 0x375d
testq %rbx, %rbx
je 0x388a
movq 0x3a90(%rip), %rsi      # 0x71d8
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x388a
cmpq 0x3afc(%rip), %rbx      # 0x7260
jne 0x3790
movl $0x3, %ebp
testq %rbx, %rbx
je 0x3894
movq 0x3add(%rip), %rsi      # 0x7258
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x3894
cmpq 0x3ae9(%rip), %rbx      # 0x7280
jne 0x37c3
movl $0x3, %ebp
testq %rbx, %rbx
je 0x3894
movq 0x3aca(%rip), %rsi      # 0x7278
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x3894
cmpq 0x3a36(%rip), %rbx      # 0x7200
jne 0x37f3
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x3894
movq 0x3a1a(%rip), %rsi      # 0x71f8
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x3894
cmpq 0x3a26(%rip), %rbx      # 0x7220
jne 0x3822
movl $0x1, %ebp
testq %rbx, %rbx
je 0x3894
movq 0x3a07(%rip), %rsi      # 0x7218
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x3894
cmpq 0x3a17(%rip), %rbx      # 0x7240
jne 0x384d
movl $0x2, %ebp
testq %rbx, %rbx
je 0x3894
movq 0x39fc(%rip), %rsi      # 0x7238
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x3894
movq 0x379c(%rip), %rdi      # 0x6ff0
leaq 0x1a5d(%rip), %rsi      # 0x52b8
movl $0x1a, %edx
callq 0x21e0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x377a(%rip), %rdi      # 0x6ff0
callq 0x21e0
movl $0x5, %ebp
movq %rax, %rdi
callq 0x20d0
jmp 0x3894
movl $0x4, %ebp
callq 0x339d
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38af
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38d6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x22c0