// File: 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 %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x15690
movq %rax, -0x20(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x4fb40
cmpq $0x1, -0x20(%rbp)
jne 0x4ed3d
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4f7a0
movq %rax, %rsi
movq -0x10(%rbp), %rdi
callq 0x8060
jmp 0x4ed0f
movq -0x18(%rbp), %rdi
leaq 0x1b6f2(%rip), %rsi     # 0x6a40c
callq 0x8670
jmp 0x4ed21
jmp 0x4effa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x4f00c
movq -0x8(%rbp), %rsi
movl -0x20(%rbp), %ecx
decl %ecx
leaq -0xa8(%rbp), %rdi
xorl %edx, %edx
callq 0x4eb90
jmp 0x4ed56
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
decq %rsi
callq 0x4f7a0
movq %rax, %rsi
movq -0x18(%rbp), %rdi
callq 0x8060
jmp 0x4ed74
leaq -0xa8(%rbp), %rdi
callq 0x15690
cmpq $0x2, %rax
jbe 0x4ee5b
xorl %eax, %eax
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
callq 0x4f7a0
movq %rax, %rdi
leaq 0x1f8c5(%rip), %rsi     # 0x6e669
callq 0x155a0
movb %al, -0x121(%rbp)
jmp 0x4edb1
movb -0x121(%rbp), %al
testb $0x1, %al
jne 0x4edc0
jmp 0x4ee5b
leaq -0xa8(%rbp), %rdi
movl $0x1, %esi
callq 0x4f7a0
movq %rax, %rdi
leaq 0x190c6(%rip), %rsi     # 0x67ea1
callq 0x155a0
movb %al, -0x122(%rbp)
jmp 0x4ede8
movb -0x122(%rbp), %al
testb $0x1, %al
jne 0x4edf4
jmp 0x4ee5b
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x15690
movq -0x130(%rbp), %rsi
movl %eax, %ecx
leaq -0xc0(%rbp), %rdi
movl $0x1, %edx
callq 0x4eb90
jmp 0x4ee23
leaq -0xa8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x4fb80
leaq -0xc0(%rbp), %rdi
callq 0x15790
jmp 0x4ee5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x4efec
leaq 0x1c377(%rip), %rdx     # 0x6b1d9
leaq -0xe0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x4fbb0
jmp 0x4ee77
movq -0x10(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movq %rsi, -0x140(%rbp)
callq 0x85b0
movq -0x140(%rbp), %rdi
callq 0x89e8
movq -0x18(%rbp), %rdi
leaq 0x1f7ca(%rip), %rsi     # 0x6e66f
callq 0x4fd50
movb %al, -0x131(%rbp)
jmp 0x4eeb2
movb -0x131(%rbp), %al
testb $0x1, %al
jne 0x4eee2
jmp 0x4eebe
movq -0x18(%rbp), %rdi
leaq 0x1f7aa(%rip), %rsi     # 0x6e673
callq 0x4fd80
movb %al, -0x141(%rbp)
jmp 0x4eed6
movb -0x141(%rbp), %al
testb $0x1, %al
jne 0x4eee2
jmp 0x4eef9
movq -0x18(%rbp), %rdi
leaq 0x1b51f(%rip), %rsi     # 0x6a40c
callq 0x8670
jmp 0x4eef4
jmp 0x4efde
movq -0x18(%rbp), %rdi
leaq 0x1f787(%rip), %rsi     # 0x6e68b
callq 0x155a0
movb %al, -0x142(%rbp)
jmp 0x4ef11
movb -0x142(%rbp), %al
testb $0x1, %al
jne 0x4ef20
jmp 0x4efdc
movq -0x10(%rbp), %rdi
leaq 0x1f74d(%rip), %rsi     # 0x6e678
callq 0x155a0
movb %al, -0x143(%rbp)
jmp 0x4ef38
movb -0x143(%rbp), %al
testb $0x1, %al
jne 0x4ef47
jmp 0x4efdc
movq -0x10(%rbp), %rsi
leaq 0x1c287(%rip), %rdx     # 0x6b1d9
leaq -0x120(%rbp), %rdi
callq 0x4fe00
jmp 0x4ef60
movq -0x18(%rbp), %rdx
leaq -0x100(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x4fdb0
jmp 0x4ef79
movq -0x10(%rbp), %rdi
leaq -0x100(%rbp), %rsi
movq %rsi, -0x150(%rbp)
callq 0x85b0
movq -0x150(%rbp), %rdi
callq 0x89e8
leaq -0x120(%rbp), %rdi
callq 0x89e8
movq -0x18(%rbp), %rdi
leaq 0x1b459(%rip), %rsi     # 0x6a40c
callq 0x8670
jmp 0x4efba
jmp 0x4efdc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x89e8
jmp 0x4efec
jmp 0x4efde
leaq -0xa8(%rbp), %rdi
callq 0x15790
jmp 0x4effa
leaq -0xa8(%rbp), %rdi
callq 0x15790
jmp 0x4f00c
leaq -0x80(%rbp), %rdi
callq 0x4fe80
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
leaq -0x80(%rbp), %rdi
callq 0x4fe80
movq -0x88(%rbp), %rdi
callq 0x88a0
nopw %cs:(%rax,%rax)