// File: /workspace/github_cpp_makefile_star2_O3/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 0xdee2(%rip), %rsi      # 0x30260
movq %r14, %rdi
callq 0x60d0
testl %eax, %eax
je 0x22496
leaq 0xe8f1(%rip), %rsi      # 0x30c86
movq %r14, %rdi
callq 0x60d0
testl %eax, %eax
je 0x224e5
leaq 0xce4e(%rip), %rsi      # 0x2f1fa
movq %r14, %rdi
callq 0x60d0
testl %eax, %eax
je 0x22519
testl %ebp, %ebp
jle 0x22710
cmpl $0x4, %ebp
jb 0x223dc
movq (%r15), %rsi
addq $0x60, %rsi
leaq 0x80(%rbx), %rdi
callq 0x61f0
movq (%r15), %rsi
movq 0x8(%rsi), %rdx
testq %rdx, %rdx
je 0x2258c
leaq -0x1(%rdx), %rcx
cmpq $0x9, %rcx
movl $0x9, %edi
cmovbq %rcx, %rdi
movq (%rsi), %rax
incq %rdi
xorl %r8d, %r8d
leaq 0x12df9(%rip), %r9      # 0x35206
movb (%rax,%r8), %r10b
cmpb (%r8,%r9), %r10b
jne 0x2258c
incq %r8
cmpq %r8, %rdi
jne 0x2240d
cmpq $0x9, %rcx
jb 0x2258c
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
addq %rax, %rdx
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0xc5fa
movq %rsp, %rdi
movq %r15, %rsi
callq 0x22045
leaq 0x60(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x6410
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2247e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6340
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x22691
movq 0x70(%rsp), %rsi
jmp 0x22689
leaq 0xe0(%rbx), %rdi
movq %r14, %rsi
callq 0x61f0
leaq 0x60(%rbx), %rdi
movq 0x68(%rbx), %rdx
leaq 0x12d46(%rip), %rcx     # 0x351fa
movl $0x4, %r8d
xorl %esi, %esi
callq 0x6550
cmpl $0x3, %ebp
jl 0x224d9
movq (%r15), %rsi
addq $0x40, %rsi
leaq 0x80(%rbx), %rdi
callq 0x61f0
movb $0x1, 0x121(%rbx)
jmp 0x22710
movb $0x1, 0x121(%rbx)
leaq 0xe0(%rbx), %rdi
movq %r14, %rsi
callq 0x61f0
movq (%r15), %rsi
addq $0x60, %rbx
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x61f0
movb $0x1, 0x121(%rbx)
leaq 0xe0(%rbx), %r14
leaq 0x12cd1(%rip), %rsi     # 0x351ff
movq %r14, %rdi
callq 0x60d0
testl %eax, %eax
jne 0x22558
movq 0xe8(%rbx), %rdx
leaq 0xce5f(%rip), %rcx      # 0x2f3a7
movl $0x7, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x6550
cmpl $0x2, %ebp
jl 0x22710
movq (%r15), %rdi
addq $0x20, %rdi
leaq 0x12ce4(%rip), %rsi     # 0x35253
callq 0x60d0
testl %eax, %eax
je 0x226d7
movq (%r15), %rsi
addq $0x20, %rsi
leaq 0x60(%rbx), %rdi
jmp 0x226f6
cmpl $0x1, %ebp
jne 0x225a2
leaq 0x80(%rbx), %rdi
callq 0x61f0
jmp 0x22691
cmpl $0x2, %ebp
jg 0x22621
movq %rbx, %rdi
callq 0x25b6e
testb %al, %al
jne 0x22691
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 0xc5fa
movq %rsp, %rdi
movq %r15, %rsi
callq 0x22045
leaq 0x60(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x6410
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x22610
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6340
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x22691
movq 0x50(%rsp), %rsi
jmp 0x22689
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 0xc5fa
movq %rsp, %rdi
movq %r15, %rsi
callq 0x22045
leaq 0x60(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x6410
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2267a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6340
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x22691
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6340
leaq 0xddc1(%rip), %rsi      # 0x30459
movq %r14, %rdi
callq 0x60d0
testl %eax, %eax
jne 0x22710
leaq 0xe0(%rbx), %rdi
movq %r14, %rsi
callq 0x61f0
addq $0x60, %rbx
leaq 0xb1aa(%rip), %rsi      # 0x2d868
movq %rbx, %rdi
callq 0x60d0
testl %eax, %eax
jne 0x22710
movq %rbx, %rdi
movq %r14, %rsi
callq 0x61f0
jmp 0x22710
leaq 0x60(%rbx), %rdi
cmpl $0x2, %ebp
jne 0x226ef
movb $0x0, 0x121(%rbx)
movq (%r15), %rsi
jmp 0x22505
movq (%r15), %rsi
addq $0x40, %rsi
callq 0x61f0
cmpl $0x4, %ebp
jb 0x22710
movq (%r15), %rsi
addq $0x60, %rsi
subq $-0x80, %rbx
jmp 0x22502
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 0x22762
movq 0x50(%rsp), %rsi
jmp 0x2275a
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x22762
movq 0x70(%rsp), %rsi
jmp 0x2275a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x22762
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6340
movq %rbx, %rdi
callq 0x6630