// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x88, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x40(%rdi), %r14
leaq 0xc583(%rip), %rsi      # 0x2a260
movq %r14, %rdi
callq 0xb1d5
testb %al, %al
je 0x1dd35
leaq 0xe0(%rbx), %rdi
movq %r14, %rsi
callq 0x71f0
leaq 0x60(%rbx), %rdi
leaq 0x114d7(%rip), %rsi     # 0x2f1da
callq 0x7700
cmpl $0x3, %ebp
jl 0x1dd20
movq (%r15), %rsi
addq $0x40, %rsi
leaq 0x80(%rbx), %rdi
callq 0x71f0
movb $0x1, 0x121(%rbx)
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcf4a(%rip), %rsi      # 0x2ac86
movq %r14, %rdi
callq 0xb1d5
testb %al, %al
je 0x1dd7a
movb $0x1, 0x121(%rbx)
leaq 0xe0(%rbx), %rdi
movq %r14, %rsi
callq 0x71f0
movq (%r15), %rsi
addq $0x60, %rbx
movq %rbx, %rdi
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x71f0
leaq 0xb479(%rip), %rsi      # 0x291fa
movq %r14, %rdi
callq 0xb1d5
testb %al, %al
je 0x1ddfd
movb $0x1, 0x121(%rbx)
leaq 0xe0(%rbx), %r14
leaq 0x1143d(%rip), %rsi     # 0x2f1df
movq %r14, %rdi
callq 0xb1d5
testb %al, %al
je 0x1ddbd
leaq 0xb5f2(%rip), %rsi      # 0x293a7
movq %r14, %rdi
callq 0x7700
cmpl $0x2, %ebp
jl 0x1dd27
movq (%r15), %rdi
addq $0x20, %rdi
leaq 0x1145f(%rip), %rsi     # 0x2f233
callq 0xb1d5
testb %al, %al
je 0x1ded7
leaq 0x60(%rbx), %rdi
cmpl $0x2, %ebp
jne 0x1df39
movb $0x0, 0x121(%rbx)
movq (%r15), %rsi
jmp 0x1dd68
testl %ebp, %ebp
jle 0x1dd27
cmpl $0x4, %ebp
jb 0x1de1d
movq (%r15), %rsi
addq $0x60, %rsi
leaq 0x80(%rbx), %rdi
callq 0x71f0
movq (%r15), %rdi
leaq 0x113bf(%rip), %rsi     # 0x2f1e6
callq 0x20477
testb %al, %al
je 0x1de72
movq (%r15), %rsi
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0x7490
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x1dab9
leaq 0x60(%rbx), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x7400
movq %r15, %rdi
callq 0x7748
leaq 0x68(%rsp), %rdi
callq 0x7748
jmp 0x1de86
cmpl $0x1, %ebp
jne 0x1dee4
movq (%r15), %rsi
leaq 0x80(%rbx), %rdi
callq 0x71f0
leaq 0xc5cc(%rip), %rsi      # 0x2a459
movq %r14, %rdi
callq 0xb1d5
testb %al, %al
je 0x1dd27
leaq 0xe0(%rbx), %rdi
movq %r14, %rsi
callq 0x71f0
addq $0x60, %rbx
leaq 0x99b1(%rip), %rsi      # 0x27868
movq %rbx, %rdi
callq 0xb1d5
testb %al, %al
je 0x1dd27
movq %rbx, %rdi
movq %r14, %rsi
callq 0x71f0
jmp 0x1dd27
movq (%r15), %rsi
addq $0x20, %rsi
leaq 0x60(%rbx), %rdi
jmp 0x1df40
cmpl $0x2, %ebp
ja 0x1df5e
movq %rbx, %rdi
callq 0x20b77
testb %al, %al
jne 0x1de86
movq (%r15), %rsi
addq $0x20, %rsi
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x7490
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x1dab9
leaq 0x60(%rbx), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x7400
movq %r15, %rdi
callq 0x7748
leaq 0x48(%rsp), %rdi
jmp 0x1de6b
movq (%r15), %rsi
addq $0x40, %rsi
callq 0x71f0
cmpl $0x4, %ebp
jb 0x1dd27
movq (%r15), %rsi
addq $0x60, %rsi
subq $-0x80, %rbx
jmp 0x1dd65
movq (%r15), %rsi
addq $0x40, %rsi
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x7490
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x1dab9
leaq 0x60(%rbx), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x7400
movq %r15, %rdi
callq 0x7748
leaq 0x28(%rsp), %rdi
jmp 0x1de6b
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x1dfbe
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x1dfbe
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x7748
movq %rbx, %rdi
callq 0x7640