// File: /workspace/github_cpp_makefile_star2_O2/yayuntian[P]user_agent/operatingSystem.cpp
// Function: normalizeOS(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string normalizeOS(string name) {
    vector<string> sp;
    split(sp, name, is_any_of(" "));

    if (sp.size() != 3 || sp[1] != "NT") {
        return name;
    }

    int version = atoi(replace_all_copy(sp[2], ".", "").c_str());
    switch (version) {
        case 50:
            return "Windows 2000";
        case 501:
            return "Windows 2000, Service Pack 1 (SP1)";
        case 51:
            return "Windows XP";
        case 52:
            return "Windows XP x64 Edition";
        case 60:
            return "Windows Vista";
        case 61:
            return "Windows 7";
        case 62:
            return "Windows 8";
        case 63:
            return "Windows 8.1";
        case 100:
            return "Windows 10";
    }
    return name;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0xe28a(%rip), %rsi      # 0x2bd69
leaq 0x40(%rsp), %rdi
callq 0x1ecf8
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x1ec74
leaq 0x40(%rsp), %rdi
callq 0x1ed24
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rax
subq %rdi, %rax
cmpq $0x60, %rax
jne 0x1db2f
addq $0x20, %rdi
leaq 0x116c8(%rip), %rsi     # 0x2f1ee
callq 0x1ec6a
testb %al, %al
je 0x1db53
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7440
leaq 0x20(%rsp), %rdi
callq 0xb230
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x20(%rsp), %rsi
addq $0x40, %rsi
leaq 0xf422(%rip), %rdx      # 0x2cf85
leaq 0xd85a(%rip), %rcx      # 0x2b3c4
movq %rsp, %rdi
callq 0x1ed38
movq %rsp, %r12
movq (%r12), %rdi
callq 0x7550
movl %eax, %r15d
movq %r12, %rdi
callq 0x7748
leal -0x32(%r15), %eax
cmpl $0xd, %eax
ja 0x1dbb6
leaq 0x1155b(%rip), %rcx     # 0x2f0f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x115a6(%rip), %rsi     # 0x2f14f
movq %rsp, %rdx
movq %rbx, %rdi
callq 0xa55c
jmp 0x1db3a
cmpl $0x64, %r15d
je 0x1dc6e
cmpl $0x1f5, %r15d           # imm = 0x1F5
jne 0x1db2f
leaq 0x11588(%rip), %rsi     # 0x2f15c
movq %rsp, %rdx
movq %rbx, %rdi
callq 0xa55c
jmp 0x1db3a
leaq 0x115b6(%rip), %rsi     # 0x2f1a1
movq %rsp, %rdx
movq %rbx, %rdi
callq 0xa55c
jmp 0x1db3a
leaq 0x11588(%rip), %rsi     # 0x2f18a
movq %rsp, %rdx
movq %rbx, %rdi
callq 0xa55c
jmp 0x1db3a
leaq 0x11566(%rip), %rsi     # 0x2f17f
movq %rsp, %rdx
movq %rbx, %rdi
callq 0xa55c
jmp 0x1db3a
leaq 0x11593(%rip), %rsi     # 0x2f1c3
movq %rsp, %rdx
movq %rbx, %rdi
callq 0xa55c
jmp 0x1db3a
leaq 0x11572(%rip), %rsi     # 0x2f1b9
movq %rsp, %rdx
movq %rbx, %rdi
callq 0xa55c
jmp 0x1db3a
leaq 0x11551(%rip), %rsi     # 0x2f1af
movq %rsp, %rdx
movq %rbx, %rdi
callq 0xa55c
jmp 0x1db3a
leaq 0x1155a(%rip), %rsi     # 0x2f1cf
movq %rsp, %rdx
movq %rbx, %rdi
callq 0xa55c
jmp 0x1db3a
jmp 0x1dca8
jmp 0x1dca8
jmp 0x1dca8
jmp 0x1dca8
jmp 0x1dca8
jmp 0x1dca8
jmp 0x1dca8
jmp 0x1dca8
jmp 0x1dca8
jmp 0x1dca8
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x1ed24
jmp 0x1dcab
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xb230
movq %rbx, %rdi
callq 0x7640