// File: 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
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
leaq 0x1b303(%rip), %rsi     # 0x692a8
callq 0x155a0
testb $0x1, %al
jne 0x4dfb0
jmp 0x4e017
movq -0x8(%rbp), %rsi
addq $0x40, %rsi
movq -0x8(%rbp), %rdi
addq $0xa0, %rdi
addq $0x40, %rdi
callq 0x8060
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
leaq 0x2065b(%rip), %rsi     # 0x6e636
callq 0x8670
cmpl $0x2, -0x14(%rbp)
jle 0x4e007
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x4f7a0
movq %rax, %rsi
movq -0x8(%rbp), %rdi
addq $0x80, %rdi
callq 0x8060
movq -0x8(%rbp), %rax
movb $0x1, 0x121(%rax)
jmp 0x4e431
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
leaq 0x1bca8(%rip), %rsi     # 0x69cce
callq 0x155a0
testb $0x1, %al
jne 0x4e031
jmp 0x4e07a
movq -0x8(%rbp), %rax
movb $0x1, 0x121(%rax)
movq -0x8(%rbp), %rsi
addq $0x40, %rsi
movq -0x8(%rbp), %rdi
addq $0xa0, %rdi
addq $0x40, %rdi
callq 0x8060
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4f7a0
movq %rax, %rsi
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
callq 0x8060
jmp 0x4e42f
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
leaq 0x1a1b9(%rip), %rsi     # 0x68242
callq 0x155a0
testb $0x1, %al
jne 0x4e097
jmp 0x4e1a7
movq -0x8(%rbp), %rax
movb $0x1, 0x121(%rax)
movq -0x8(%rbp), %rdi
addq $0xa0, %rdi
addq $0x40, %rdi
leaq 0x20583(%rip), %rsi     # 0x6e63b
callq 0x155a0
testb $0x1, %al
jne 0x4e0c3
jmp 0x4e0de
movq -0x8(%rbp), %rdi
addq $0xa0, %rdi
addq $0x40, %rdi
leaq 0x1a316(%rip), %rsi     # 0x683ef
callq 0x8670
cmpl $0x1, -0x14(%rbp)
jle 0x4e17b
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x4f7a0
movq %rax, %rdi
leaq 0x2058f(%rip), %rsi     # 0x6e68f
callq 0x155a0
testb $0x1, %al
jne 0x4e10b
jmp 0x4e15b
cmpl $0x2, -0x14(%rbp)
jle 0x4e131
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x4f7a0
movq %rax, %rsi
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
callq 0x8060
jmp 0x4e159
movq -0x8(%rbp), %rax
movb $0x0, 0x121(%rax)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4f7a0
movq %rax, %rsi
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
callq 0x8060
jmp 0x4e179
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x4f7a0
movq %rax, %rsi
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
callq 0x8060
jmp 0x4e17b
cmpl $0x3, -0x14(%rbp)
jle 0x4e1a2
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0x4f7a0
movq %rax, %rsi
movq -0x8(%rbp), %rdi
addq $0x80, %rdi
callq 0x8060
jmp 0x4e42d
cmpl $0x0, -0x14(%rbp)
jle 0x4e42b
cmpl $0x3, -0x14(%rbp)
jle 0x4e1d8
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0x4f7a0
movq %rax, %rsi
movq -0x8(%rbp), %rdi
addq $0x80, %rdi
callq 0x8060
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4f7a0
movq %rax, %rdi
leaq 0x20453(%rip), %rsi     # 0x6e642
callq 0x4fa20
testb $0x1, %al
jne 0x4e1fa
jmp 0x4e26e
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4f7a0
movq %rax, %rsi
leaq -0x58(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x81c0
movq -0xf0(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x4da10
jmp 0x4e22c
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
leaq -0x38(%rbp), %rsi
callq 0x85b0
leaq -0x38(%rbp), %rdi
callq 0x89e8
leaq -0x58(%rbp), %rdi
callq 0x89e8
jmp 0x4e3c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x89e8
jmp 0x4e43a
cmpl $0x2, -0x14(%rbp)
jge 0x4e299
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4f7a0
movq %rax, %rsi
movq -0x8(%rbp), %rdi
addq $0x80, %rdi
callq 0x8060
jmp 0x4e3c0
cmpl $0x3, -0x14(%rbp)
jge 0x4e33d
movq -0x8(%rbp), %rdi
callq 0x56640
testb $0x1, %al
jne 0x4e338
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x4f7a0
movq %rax, %rsi
leaq -0xa8(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x81c0
movq -0xf8(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x4da10
jmp 0x4e2ed
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
leaq -0x88(%rbp), %rsi
callq 0x85b0
leaq -0x88(%rbp), %rdi
callq 0x89e8
leaq -0xa8(%rbp), %rdi
callq 0x89e8
jmp 0x4e338
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x89e8
jmp 0x4e43a
jmp 0x4e3be
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x4f7a0
movq %rax, %rsi
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x81c0
movq -0x100(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x4da10
jmp 0x4e376
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
leaq -0xc8(%rbp), %rsi
callq 0x85b0
leaq -0xc8(%rbp), %rdi
callq 0x89e8
leaq -0xe8(%rbp), %rdi
callq 0x89e8
jmp 0x4e3be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x89e8
jmp 0x4e43a
jmp 0x4e3c0
jmp 0x4e3c2
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
leaq 0x1b0d0(%rip), %rsi     # 0x694a1
callq 0x155a0
testb $0x1, %al
jne 0x4e3dc
jmp 0x4e429
movq -0x8(%rbp), %rsi
addq $0x40, %rsi
movq -0x8(%rbp), %rdi
addq $0xa0, %rdi
addq $0x40, %rdi
callq 0x8060
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
leaq 0x184a9(%rip), %rsi     # 0x668b0
callq 0x155a0
testb $0x1, %al
jne 0x4e412
jmp 0x4e427
movq -0x8(%rbp), %rsi
addq $0x40, %rsi
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
callq 0x8060
jmp 0x4e429
jmp 0x4e42b
jmp 0x4e42d
jmp 0x4e42f
jmp 0x4e431
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x88a0
nopw %cs:(%rax,%rax)