// File: /workspace/github_cpp_makefile_star2_O2/yayuntian[P]user_agent/operatingSystem.cpp
// Function: osName(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void osName(vector<string>& osSplit, string& name, string& version) {
    size_t os_len = osSplit.size();
    OSInfo osInfo;

    if (os_len == 1) {
        name = osSplit[0];
        version = "";
    } else {
        vector<string> nameSplit = split_v(osSplit, 0, os_len - 1);
        version = osSplit[os_len - 1];

        if (nameSplit.size() > 2 && nameSplit[0] == "Intel" &&
                nameSplit[1] == "Mac") {
            nameSplit = split_v(nameSplit, 1, nameSplit.size());
        }
        name = join(nameSplit, " ");

        if (contains(version, "x86") || contains(version, "i686")) {
            version = "";
        } else if (version == "X" && name == "Mac OS") {
            name = name + " " + version;
            version = "";
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %r12
movq (%rdi), %rax
movq 0x8(%rdi), %r15
leaq 0x68(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %edi, %edi
movb %dil, (%rcx)
leaq 0x88(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movq %rdx, %rbx
movb %dil, (%rcx)
leaq 0xa8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movq %rsi, %r14
subq %rax, %r15
movb %dil, (%rcx)
cmpq $0x20, %r15
jne 0x1e586
movq %r14, %rdi
movq %rax, %rsi
callq 0x71f0
leaq 0xce4b(%rip), %rsi      # 0x2b3c4
movq %rbx, %rdi
callq 0x7700
jmp 0x1e686
sarq $0x5, %r15
decq %r15
movq %rsp, %rdi
movq %r12, %rsi
xorl %edx, %edx
movl %r15d, %ecx
callq 0x1e47e
shlq $0x5, %r15
addq (%r12), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x71f0
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
subq %rdi, %rax
cmpq $0x41, %rax
jb 0x1e61d
leaq 0x10c44(%rip), %rsi     # 0x2f20d
callq 0xb1d5
testb %al, %al
je 0x1e61d
movq (%rsp), %rdi
addq $0x20, %rdi
leaq 0xa878(%rip), %rsi      # 0x28e59
callq 0xb1d5
testb %al, %al
je 0x1e61d
movq %rsp, %rsi
movq 0x8(%rsi), %rcx
subq (%rsi), %rcx
shrq $0x5, %rcx
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x1e47e
movq %rsp, %rdi
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0x205a8
movq %r15, %rdi
callq 0xb230
leaq 0xd745(%rip), %rdx      # 0x2bd69
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x1ede7
leaq 0x18(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x7400
movq %r15, %rdi
callq 0x7748
leaq 0x10bc3(%rip), %rsi     # 0x2f213
movq %rbx, %rdi
callq 0x205ee
testb %al, %al
jne 0x1e66f
leaq 0x10bb4(%rip), %rsi     # 0x2f217
movq %rbx, %rdi
callq 0x20633
testb %al, %al
je 0x1e69f
leaq 0xcd4e(%rip), %rsi      # 0x2b3c4
movq %rbx, %rdi
callq 0x7700
movq %rsp, %rdi
callq 0xb230
leaq 0x58(%rsp), %rdi
callq 0x1eeee
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x10b89(%rip), %rsi     # 0x2f22f
movq %rbx, %rdi
callq 0xb1d5
testb %al, %al
je 0x1e67e
leaq 0x10b63(%rip), %rsi     # 0x2f21c
movq %r14, %rdi
callq 0xb1d5
testb %al, %al
je 0x1e67e
leaq 0xd69d(%rip), %rdx      # 0x2bd69
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x1eeb5
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movq %rbx, %rdx
callq 0x1ee96
leaq 0x18(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x7400
movq %r15, %rdi
callq 0x7748
leaq 0x38(%rsp), %rdi
callq 0x7748
jmp 0x1e66f
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x7748
jmp 0x1e731
jmp 0x1e72e
jmp 0x1e72e
jmp 0x1e72e
jmp 0x1e729
movq %rax, %rbx
jmp 0x1e739
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb230
leaq 0x58(%rsp), %rdi
callq 0x1eeee
movq %rbx, %rdi
callq 0x7640