// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/operatingSystem.cpp
// Function: webKit(UserAgent&, 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>>>>&, int)
void webKit(UserAgent& p, vector<string>& comment, int slen) {
    if (p.platform == "webOS") {
        p.browser.Name = p.platform;
        p.os = "Palm";
        if (slen > 2) {
            p.localization = comment[2];
        }
        p.mobile = true;
    } else if (p.platform == "Symbian") {
        p.mobile = true;
        p.browser.Name = p.platform;
        p.os = comment[0];
    } else if (p.platform == "Linux") {
        p.mobile = true;
        if (p.browser.Name == "Safari") {
            p.browser.Name = "Android";
        }
        if (slen > 1) {
            if (comment[1] == "U") {
                if (slen > 2) {
                    p.os = comment[2];
                } else {
                    p.mobile = false;
                    p.os = comment[0];
                }
            } else {
                p.os = comment[1];
            }
        }
        if (slen > 3) {
            p.localization = comment[3];
        }
    } else if (slen > 0) {
        if (slen > 3) {
            p.localization = comment[3];
        }

        if (starts_with(comment[0], "Windows NT")) {
            p.os = normalizeOS(comment[0]);
        } else if (slen < 2) {
            p.localization = comment[0];
        } else if (slen < 3) {
            if (!googleBot(p)) {
                p.os = normalizeOS(comment[1]);
            }
        } else {
            p.os = normalizeOS(comment[2]);
        }
        if (p.platform == "BlackBerry") {
            p.browser.Name = p.platform;
            if (p.os == "Touch") {
                p.os = p.platform;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x40(%rdi), %r14
leaq 0xdaa6(%rip), %rsi      # 0x32260
movq %r14, %rdi
callq 0x70d0
testl %eax, %eax
je 0x248d7
leaq 0xe4b5(%rip), %rsi      # 0x32c86
movq %r14, %rdi
callq 0x70d0
testl %eax, %eax
je 0x24926
leaq 0xca12(%rip), %rsi      # 0x311fa
movq %r14, %rdi
callq 0x70d0
testl %eax, %eax
je 0x24948
testl %ebp, %ebp
jle 0x24b4e
cmpl $0x4, %ebp
jl 0x24818
movq (%r15), %rsi
addq $0x60, %rsi
leaq 0x80(%rbx), %rdi
callq 0x71f0
movq (%r15), %rsi
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x249bb
decq %rax
cmpq $0x9, %rax
movl $0x9, %ecx
cmovbq %rax, %rcx
movq (%rsi), %rdx
incq %rcx
xorl %edi, %edi
leaq 0x12a0f(%rip), %r8      # 0x37256
movb (%rdx,%rdi), %r9b
cmpb (%rdi,%r8), %r9b
jne 0x249bb
incq %rdi
cmpq %rdi, %rcx
jne 0x24847
cmpq $0x9, %rax
jb 0x249bb
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0xe87a
movq %rsp, %rdi
movq %r15, %rsi
callq 0x24481
leaq 0x60(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x7410
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x248bf
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7340
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x24ac0
movq 0x70(%rsp), %rsi
jmp 0x24ab8
leaq 0xe0(%rbx), %rdi
movq %r14, %rsi
callq 0x71f0
leaq 0x60(%rbx), %rdi
movq 0x68(%rbx), %rdx
leaq 0x12955(%rip), %rcx     # 0x3724a
movl $0x4, %r8d
xorl %esi, %esi
callq 0x7550
cmpl $0x3, %ebp
jl 0x2491a
movq (%r15), %rsi
addq $0x40, %rsi
leaq 0x80(%rbx), %rdi
callq 0x71f0
movb $0x1, 0x121(%rbx)
jmp 0x24b4e
movb $0x1, 0x121(%rbx)
leaq 0xe0(%rbx), %rdi
movq %r14, %rsi
callq 0x71f0
movq (%r15), %rsi
addq $0x60, %rbx
jmp 0x24b37
movb $0x1, 0x121(%rbx)
leaq 0xe0(%rbx), %r14
leaq 0x128f2(%rip), %rsi     # 0x3724f
movq %r14, %rdi
callq 0x70d0
testl %eax, %eax
jne 0x24987
movq 0xe8(%rbx), %rdx
leaq 0xca30(%rip), %rcx      # 0x313a7
movl $0x7, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x7550
cmpl $0x2, %ebp
jl 0x24b27
movq (%r15), %rdi
addq $0x20, %rdi
leaq 0x12905(%rip), %rsi     # 0x372a3
callq 0x70d0
testl %eax, %eax
je 0x24b06
movq (%r15), %rsi
addq $0x20, %rsi
leaq 0x60(%rbx), %rdi
jmp 0x24b22
cmpl $0x1, %ebp
jne 0x249d1
leaq 0x80(%rbx), %rdi
callq 0x71f0
jmp 0x24ac0
cmpl $0x2, %ebp
jg 0x24a50
movq %rbx, %rdi
callq 0x27f8e
testb %al, %al
jne 0x24ac0
movq (%r15), %rax
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0xe87a
movq %rsp, %rdi
movq %r15, %rsi
callq 0x24481
leaq 0x60(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x7410
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x24a3f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7340
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x24ac0
movq 0x50(%rsp), %rsi
jmp 0x24ab8
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x40(%rsi), %rax
movq 0x48(%rsi), %rdx
addq %rax, %rdx
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0xe87a
movq %rsp, %rdi
movq %r15, %rsi
callq 0x24481
leaq 0x60(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x7410
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x24aa9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7340
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x24ac0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7340
leaq 0xd992(%rip), %rsi      # 0x32459
movq %r14, %rdi
callq 0x70d0
testl %eax, %eax
jne 0x24b4e
leaq 0xe0(%rbx), %rdi
movq %r14, %rsi
callq 0x71f0
addq $0x60, %rbx
leaq 0xad7b(%rip), %rsi      # 0x2f868
movq %rbx, %rdi
callq 0x70d0
testl %eax, %eax
jne 0x24b4e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x71f0
jmp 0x24b4e
leaq 0x60(%rbx), %rdi
cmpl $0x2, %ebp
jne 0x24b1b
movb $0x0, 0x121(%rbx)
movq (%r15), %rsi
jmp 0x24b22
movq (%r15), %rsi
addq $0x40, %rsi
callq 0x71f0
cmpl $0x4, %ebp
jl 0x24b4e
movq (%r15), %rsi
addq $0x60, %rsi
subq $-0x80, %rbx
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x71f0
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x24ba0
movq 0x50(%rsp), %rsi
jmp 0x24b98
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x24ba0
movq 0x70(%rsp), %rsi
jmp 0x24b98
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x24ba0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7340
movq %rbx, %rdi
callq 0x7630