// File: /workspace/github_cpp_makefile_star2_O3/yayuntian[P]user_agent/operatingSystem.cpp
// Function: detectOS(UserAgent&, Section&, int)
void detectOS(UserAgent& p, Section& s, int slen) {
    if (s.name == "Mozilla") {
        p.platform = getPlatform(s.comment, slen);
        if (p.platform == "Windows" && slen > 0) {
            p.os = normalizeOS(s.comment[0]);
        }

        if (p.browser.Engine == "") {
            p.undecided = true;
        } else if(p.browser.Engine == "Gecko") {
            gecko(p, s.comment, slen);
        } else if (p.browser.Engine == "AppleWebKit") {
            webKit(p, s.comment, slen);
        } else if (p.browser.Engine == "Trident") {
            trident(p, s.comment, slen);
        }
    } else if (s.name == "Opera") {
        if (slen > 0) {
            opera(p, s.comment, slen);
        }
    } else if (s.name == "Dalvik") {
        if (slen > 0) {
            dalvik(p, s.comment, slen);
        }
    } else {
        p.undecided = true;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xba5e(%rip), %rsi      # 0x2f613
movq %r14, %rdi
callq 0x60d0
testl %eax, %eax
je 0x23c16
leaq 0x116a3(%rip), %rsi     # 0x3526b
movq %r14, %rdi
callq 0x60d0
testl %eax, %eax
je 0x23d54
leaq 0x11692(%rip), %rsi     # 0x35271
movq %r14, %rdi
callq 0x60d0
testl %eax, %eax
jne 0x23d3d
testl %ebx, %ebx
jle 0x23d45
addq $0x40, %r14
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22e99
addq $0x40, %r14
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x21eb0
leaq 0x40(%r15), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x6410
movq (%r13), %rdi
leaq 0x38(%rsp), %r13
cmpq %r13, %rdi
je 0x23c56
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6340
leaq 0x1150a(%rip), %rsi     # 0x35167
movq %r12, %rdi
callq 0x60d0
testl %ebx, %ebx
jle 0x23cdb
testl %eax, %eax
jne 0x23cdb
movq (%r14), %rax
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xc5fa
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x22045
leaq 0x60(%r15), %rdi
leaq 0x28(%rsp), %r12
movq %r12, %rsi
callq 0x6410
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x23cc4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6340
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x23cdb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6340
leaq 0xa0(%r15), %r12
leaq 0xd6db(%rip), %rsi      # 0x313c4
movq %r12, %rdi
callq 0x60d0
testl %eax, %eax
je 0x23d3d
leaq 0xa0ea(%rip), %rsi      # 0x2dde6
movq %r12, %rdi
callq 0x60d0
testl %eax, %eax
je 0x23d77
leaq 0x11548(%rip), %rsi     # 0x35257
movq %r12, %rdi
callq 0x60d0
testl %eax, %eax
je 0x23d86
leaq 0x11541(%rip), %rsi     # 0x35263
movq %r12, %rdi
callq 0x60d0
testl %eax, %eax
jne 0x23d45
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x22b01
jmp 0x23d45
movb $0x1, 0x122(%r15)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %ebx, %ebx
jle 0x23d45
addq $0x40, %r14
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22c7d
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x2276a
jmp 0x23d45
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x2235c
jmp 0x23d45
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x23daf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6340
movq %rbx, %rdi
callq 0x6630