// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdx, %rbp
movq %rsi, %rcx
movq (%rdi), %rsi
movq 0x8(%rdi), %r15
subq %rsi, %r15
leaq 0x88(%rsp), %r13
movq %r13, -0x10(%r13)
xorl %eax, %eax
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0xa8(%rsp), %r14
movq %r14, -0x10(%r14)
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0xc8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq %rax, -0x8(%rbx)
movb %al, (%rbx)
cmpq $0x20, %r15
jne 0x23023
movq %rcx, %rdi
callq 0x61f0
movq 0x8(%rbp), %rdx
leaq 0xe3b3(%rip), %rcx      # 0x313c4
movq %rbp, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x6550
jmp 0x233be
movq %rdi, %r12
movq %rcx, 0x8(%rsp)
sarq $0x5, %r15
decq %r15
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
movl %r15d, %ecx
callq 0x22f12
shlq $0x5, %r15
addq (%r12), %r15
movq %rbp, %rdi
movq %r15, %rsi
callq 0x61f0
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %rax
subq %r15, %rax
cmpq $0x41, %rax
movq %rbp, 0x70(%rsp)
jb 0x23118
leaq 0x121b3(%rip), %rsi     # 0x3522d
movq %r15, %rdi
callq 0x60d0
movq 0x10(%rsp), %r15
testl %eax, %eax
jne 0x23118
addq $0x20, %r15
leaq 0xbdbf(%rip), %rsi      # 0x2ee59
movq %r15, %rdi
callq 0x60d0
movq 0x10(%rsp), %r15
testl %eax, %eax
jne 0x23118
leaq 0x10(%rsp), %rsi
movq 0x8(%rsi), %rcx
subq %r15, %rcx
shrq $0x5, %rcx
leaq 0x50(%rsp), %rdi
movl $0x1, %edx
callq 0x22f12
movq 0x20(%rsp), %rax
leaq 0x50(%rsp), %r15
movaps (%r15), %xmm0
movq 0x10(%r15), %rcx
movq %rcx, 0x20(%rsp)
movaps 0x10(%rsp), %xmm1
movaps %xmm0, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
callq 0xd4b2
movq %r15, %rdi
callq 0xd4b2
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %rbp
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %r14, %rbx
cmpq %rbp, %r15
je 0x23157
movq (%r15), %rcx
movq 0x8(%r15), %r8
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x63b0
movq %r13, %r14
addq $0x20, %r15
jmp 0x2315a
movq %r13, %r14
cmpq %rbp, %r15
je 0x231a2
leaq 0xebdb(%rip), %r12      # 0x31d41
leaq 0x30(%rsp), %r13
movq 0x38(%rsp), %rsi
movl $0x1, %r8d
movq %r13, %rdi
xorl %edx, %edx
movq %r12, %rcx
callq 0x63b0
movq 0x38(%rsp), %rsi
movq (%r15), %rcx
movq 0x8(%r15), %r8
movq %r13, %rdi
xorl %edx, %edx
callq 0x63b0
addq $0x20, %r15
cmpq %rbp, %r15
jne 0x2316b
leaq 0x30(%rsp), %r15
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x6410
movq (%r15), %rdi
leaq 0x40(%rsp), %r15
cmpq %r15, %rdi
je 0x231ce
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6340
movq 0x70(%rsp), %rbp
movq 0x8(%rbp), %rdx
testq %rdx, %rdx
movq %r14, %r13
movq %rbx, %r14
leaq 0xc8(%rsp), %rbx
je 0x2329f
movq (%rbp), %rax
leaq (%rax,%rdx), %rcx
leaq -0x1(%rdx), %rsi
leaq 0x12032(%rip), %rdi     # 0x35233
movq %rax, %r8
xorl %r9d, %r9d
movb (%r8,%r9), %r10b
cmpb (%r9,%rdi), %r10b
jne 0x23229
leaq 0x1(%r9), %r10
cmpq %r9, %rsi
je 0x23223
cmpq $0x2, %r9
movq %r10, %r9
jne 0x23207
leaq (%r8,%r10), %r11
jmp 0x23230
leaq (%r8,%r9), %r11
movq %r9, %r10
cmpq $0x3, %r10
je 0x23243
incq %r8
decq %rsi
cmpq %rcx, %r8
jne 0x23204
jmp 0x2324c
cmpq %r11, %r8
jne 0x233a0
leaq -0x1(%rdx), %rsi
leaq 0x11fe0(%rip), %rdi     # 0x35237
xorl %r8d, %r8d
movb (%rax,%r8), %r9b
cmpb (%r8,%rdi), %r9b
jne 0x2327c
leaq 0x1(%r8), %r9
cmpq %r8, %rsi
je 0x23276
cmpq $0x3, %r8
movq %r9, %r8
jne 0x2325a
leaq (%rax,%r9), %r10
jmp 0x23283
leaq (%rax,%r8), %r10
movq %r8, %r9
cmpq $0x4, %r9
je 0x23296
incq %rax
decq %rsi
cmpq %rcx, %rax
jne 0x23257
jmp 0x2329f
cmpq %r10, %rax
jne 0x233a0
leaq 0x11fa9(%rip), %rsi     # 0x3524f
movq %rbp, %rdi
callq 0x60d0
testl %eax, %eax
jne 0x233b4
leaq 0x11f7f(%rip), %rsi     # 0x3523c
movq 0x8(%rsp), %rdi
callq 0x60d0
testl %eax, %eax
jne 0x233b4
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x8(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0xc5fa
leaq 0xea48(%rip), %rsi      # 0x31d41
leaq 0x50(%rsp), %rdi
callq 0x66c0
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
leaq 0x50(%rsp), %rdi
callq 0x60e0
movq %r15, 0x30(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x23338
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x2333f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq %r15, %r12
movq 0x8(%rax), %rdx
leaq 0x30(%rsp), %r15
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x6410
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x23380
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6340
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2339c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6340
movq 0x8(%rbp), %rdx
leaq 0xe01d(%rip), %rcx      # 0x313c4
movq %rbp, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x6550
leaq 0x10(%rsp), %rdi
callq 0xd4b2
movq 0xb8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x233db
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x6340
movq 0x98(%rsp), %rdi
cmpq %r14, %rdi
je 0x233f8
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x6340
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x23412
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x6340
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x23442
jmp 0x23428
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x2346d
movq 0x60(%rsp), %rsi
jmp 0x23465
jmp 0x23442
jmp 0x2344e
jmp 0x23447
movq %rax, %rbx
jmp 0x2346d
movq %rax, %rbx
jmp 0x23477
jmp 0x2344e
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2346d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6340
leaq 0x10(%rsp), %rdi
callq 0xd4b2
leaq 0x78(%rsp), %rdi
callq 0x23fd8
movq %rbx, %rdi
callq 0x6630