// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
leaq 0xf8de(%rip), %rax      # 0x33d8d
leaq 0x70(%rsp), %rsi
movq %rax, (%rsi)
leaq 0xf8d0(%rip), %rax      # 0x33d8e
movq %rax, 0x8(%rsi)
leaq 0x40(%rsp), %rdi
callq 0x26606
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
movq %r14, %rsi
movl $0x1, %ecx
callq 0x261ad
cmpq $0x11, 0x50(%rsp)
jb 0x244fa
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x244fa
callq 0x7440
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rax
subq %rdi, %rax
cmpq $0x60, %rax
jne 0x24521
addq $0x20, %rdi
leaq 0x12d46(%rip), %rsi     # 0x3725e
callq 0x70d0
testl %eax, %eax
je 0x2457c
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0x24540
movq %rdx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x24546
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
leaq 0x20(%rsp), %rdi
callq 0xf6ee
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x20(%rsp), %rax
leaq 0x40(%rax), %rsi
leaq 0x10a68(%rip), %rcx     # 0x34ff4
movq %rcx, 0x58(%rsp)
leaq 0x10a5d(%rip), %rcx     # 0x34ff5
movq %rcx, 0x60(%rsp)
movq 0x40(%rax), %rcx
movq 0x48(%rax), %rdx
leaq (%rcx,%rdx), %rax
testq %rdx, %rdx
je 0x245bb
cmpb $0x2e, (%rcx)
je 0x245c0
incq %rcx
decq %rdx
jne 0x245ae
movq %rax, %rcx
jmp 0x245c4
leaq 0x1(%rcx), %rax
leaq 0x90(%rsp), %r8
movq %rcx, (%r8)
movq %rax, 0x8(%r8)
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x58(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0xedd7(%rip), %rcx      # 0x333c4
leaq 0x70(%rsp), %rdi
movq %rcx, %rdx
callq 0x2799e
leaq 0x80(%rsp), %r13
movq -0x10(%r13), %r12
movq %r12, %rdi
callq 0x7560
movl %eax, %r15d
cmpq %r13, %r12
je 0x24629
movq 0x80(%rsp), %rsi
incq %rsi
movq %r12, %rdi
callq 0x7340
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
leal -0x32(%r15), %eax
cmpl $0xd, %eax
ja 0x24664
leaq 0x12b24(%rip), %rdx     # 0x37164
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
leaq 0x12b6f(%rip), %rsi     # 0x371bf
leaq 0x12b74(%rip), %rdx     # 0x371cb
movq %rbx, %rdi
callq 0xe90a
jmp 0x2455e
cmpl $0x64, %r15d
je 0x24738
cmpl $0x1f5, %r15d           # imm = 0x1F5
jne 0x24528
leaq 0x12b4a(%rip), %rsi     # 0x371cc
leaq 0x12b65(%rip), %rdx     # 0x371ee
movq %rbx, %rdi
callq 0xe90a
jmp 0x2455e
leaq 0x12b74(%rip), %rsi     # 0x37211
leaq 0x12b7a(%rip), %rdx     # 0x3721e
movq %rbx, %rdi
callq 0xe90a
jmp 0x2455e
leaq 0x12b42(%rip), %rsi     # 0x371fa
leaq 0x12b51(%rip), %rdx     # 0x37210
movq %rbx, %rdi
callq 0xe90a
jmp 0x2455e
leaq 0x12b1c(%rip), %rsi     # 0x371ef
leaq 0x12b1f(%rip), %rdx     # 0x371f9
movq %rbx, %rdi
callq 0xe90a
jmp 0x2455e
leaq 0x12b45(%rip), %rsi     # 0x37233
leaq 0x12b49(%rip), %rdx     # 0x3723e
movq %rbx, %rdi
callq 0xe90a
jmp 0x2455e
leaq 0x12b20(%rip), %rsi     # 0x37229
leaq 0x12b22(%rip), %rdx     # 0x37232
movq %rbx, %rdi
callq 0xe90a
jmp 0x2455e
leaq 0x12afb(%rip), %rsi     # 0x3721f
leaq 0x12afd(%rip), %rdx     # 0x37228
movq %rbx, %rdi
callq 0xe90a
jmp 0x2455e
leaq 0x12b00(%rip), %rsi     # 0x3723f
leaq 0x12b03(%rip), %rdx     # 0x37249
movq %rbx, %rdi
callq 0xe90a
jmp 0x2455e
jmp 0x24783
jmp 0x24783
jmp 0x24783
jmp 0x24783
jmp 0x24783
jmp 0x24783
jmp 0x24783
jmp 0x24783
jmp 0x24783
jmp 0x24783
movq %rax, %rbx
cmpq $0x11, 0x50(%rsp)
jb 0x24786
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x24786
callq 0x7440
jmp 0x24786
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xf6ee
movq %rbx, %rdi
callq 0x7630