// File: /workspace/github_cpp_makefile_star2_O1/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 0xb668(%rip), %rsi      # 0x31613
movq %r14, %rdi
callq 0x70d0
testl %eax, %eax
je 0x2600c
leaq 0x112fd(%rip), %rsi     # 0x372bb
movq %r14, %rdi
callq 0x70d0
testl %eax, %eax
je 0x2614a
leaq 0x112ec(%rip), %rsi     # 0x372c1
movq %r14, %rdi
callq 0x70d0
testl %eax, %eax
jne 0x26133
testl %ebx, %ebx
jle 0x2613b
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 0x252a4
addq $0x40, %r14
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x242ec
leaq 0x40(%r15), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x7410
movq (%r13), %rdi
leaq 0x38(%rsp), %r13
cmpq %r13, %rdi
je 0x2604c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7340
leaq 0x11164(%rip), %rsi     # 0x371b7
movq %r12, %rdi
callq 0x70d0
testl %ebx, %ebx
jle 0x260d1
testl %eax, %eax
jne 0x260d1
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 0xe87a
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x24481
leaq 0x60(%r15), %rdi
leaq 0x28(%rsp), %r12
movq %r12, %rsi
callq 0x7410
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x260ba
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7340
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x260d1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7340
leaq 0xa0(%r15), %r12
leaq 0xd2e5(%rip), %rsi      # 0x333c4
movq %r12, %rdi
callq 0x70d0
testl %eax, %eax
je 0x26133
leaq 0x9cf4(%rip), %rsi      # 0x2fde6
movq %r12, %rdi
callq 0x70d0
testl %eax, %eax
je 0x2616d
leaq 0x111a2(%rip), %rsi     # 0x372a7
movq %r12, %rdi
callq 0x70d0
testl %eax, %eax
je 0x2617c
leaq 0x1119b(%rip), %rsi     # 0x372b3
movq %r12, %rdi
callq 0x70d0
testl %eax, %eax
jne 0x2613b
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x24f35
jmp 0x2613b
movb $0x1, 0x122(%r15)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %ebx, %ebx
jle 0x2613b
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 0x250b1
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x24ba8
jmp 0x2613b
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x24798
jmp 0x2613b
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x261a5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7340
movq %rbx, %rdi
callq 0x7630