// File: /workspace/github_cpp_makefile_star2_O3/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 0x36e5
movq 0x392d(%rip), %rbx      # 0x6fd0
leaq 0x1bd2(%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 0x38ad
movq 0x8(%rsi), %rsi
leaq 0x8(%rsp), %rbx
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
callq 0x3ede
movq 0x8(%rbx), %rbx
cmpq 0x3aba(%rip), %rbx      # 0x71c0
jne 0x372d
testq %rbx, %rbx
je 0x3888
movq 0x3aa0(%rip), %rsi      # 0x71b8
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x3888
cmpq 0x3aac(%rip), %rbx      # 0x71e0
jne 0x375b
testq %rbx, %rbx
je 0x3888
movq 0x3a92(%rip), %rsi      # 0x71d8
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x3888
cmpq 0x3afe(%rip), %rbx      # 0x7260
jne 0x378e
movl $0x3, %ebp
testq %rbx, %rbx
je 0x3892
movq 0x3adf(%rip), %rsi      # 0x7258
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x3892
cmpq 0x3aeb(%rip), %rbx      # 0x7280
jne 0x37c1
movl $0x3, %ebp
testq %rbx, %rbx
je 0x3892
movq 0x3acc(%rip), %rsi      # 0x7278
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x3892
cmpq 0x3a38(%rip), %rbx      # 0x7200
jne 0x37f1
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x3892
movq 0x3a1c(%rip), %rsi      # 0x71f8
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x3892
cmpq 0x3a28(%rip), %rbx      # 0x7220
jne 0x3820
movl $0x1, %ebp
testq %rbx, %rbx
je 0x3892
movq 0x3a09(%rip), %rsi      # 0x7218
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x3892
cmpq 0x3a19(%rip), %rbx      # 0x7240
jne 0x384b
movl $0x2, %ebp
testq %rbx, %rbx
je 0x3892
movq 0x39fe(%rip), %rsi      # 0x7238
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x21b0
testl %eax, %eax
je 0x3892
movq 0x379e(%rip), %rdi      # 0x6ff0
leaq 0x1a5f(%rip), %rsi      # 0x52b8
movl $0x1a, %edx
callq 0x21e0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x377c(%rip), %rdi      # 0x6ff0
callq 0x21e0
movl $0x5, %ebp
movq %rax, %rdi
callq 0x20d0
jmp 0x3892
movl $0x4, %ebp
callq 0x339b
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38ad
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 0x38d4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x22c0