// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/operatingSystem.cpp
// Function: gecko(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 gecko(UserAgent& p, vector<string>& comment, int slen) {
    if (slen <= 1) {
        return;
    }

    if (comment[1] == "U") {
        if (slen > 2) {
            p.os = normalizeOS(comment[2]);
        } else {
            p.os = normalizeOS(comment[1]);
        }
    } else {
        if (p.platform == "Android") {
            p.mobile = true;
            p.os = p.platform;
            p.platform = normalizeOS(comment[1]);
        } else if (comment[0] == "Mobile" || comment[0] == "Tablet") {
            p.mobile = true;
            p.os = "FirefoxOS";
        } else {
            if (p.os == "") {
                p.os = normalizeOS(comment[1]);
            }
        }
    }

    if (slen > 3 && !starts_with(comment[3], "rv:")) {
        p.localization = comment[3];
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
cmpl $0x2, %edx
jl 0x24ebf
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
addq $0x20, %rdi
leaq 0x126cb(%rip), %rsi     # 0x372a3
callq 0x70d0
testl %eax, %eax
je 0x24cbd
leaq 0x40(%rbx), %r15
leaq 0xc7b7(%rip), %rsi      # 0x313a7
movq %r15, %rdi
callq 0x70d0
testl %eax, %eax
je 0x24d63
movq (%r14), %rdi
leaq 0x1266c(%rip), %rsi     # 0x37276
callq 0x70d0
testl %eax, %eax
je 0x24d3b
movq (%r14), %rdi
leaq 0xbfbd(%rip), %rsi      # 0x30bde
callq 0x70d0
testl %eax, %eax
je 0x24d3b
leaq 0x60(%rbx), %r15
leaq 0xe78b(%rip), %rsi      # 0x333c4
movq %r15, %rdi
callq 0x70d0
testl %eax, %eax
jne 0x24e67
movq (%r14), %rax
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0xe87a
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x24481
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x7410
movq (%r12), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24ca5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7340
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x24e67
movq 0x38(%rsp), %rsi
jmp 0x24e5f
cmpl $0x2, %ebp
jne 0x24de7
movq (%r14), %rax
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0xe87a
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x24481
leaq 0x60(%rbx), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x7410
movq (%r15), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24d23
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7340
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x24e67
movq 0x78(%rsp), %rsi
jmp 0x24e5f
movb $0x1, 0x121(%rbx)
leaq 0x60(%rbx), %rdi
movq 0x68(%rbx), %rdx
leaq 0xbdde(%rip), %rcx      # 0x30b2f
movl $0x9, %r8d
xorl %esi, %esi
callq 0x7550
jmp 0x24e67
movb $0x1, 0x121(%rbx)
leaq 0x60(%rbx), %rdi
movq %r15, %rsi
callq 0x71f0
movq (%r14), %rax
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0xe87a
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x24481
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x7410
movq (%r12), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24dd2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7340
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x24e67
movq 0x58(%rsp), %rsi
jmp 0x24e5f
movq (%r14), %rax
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %r15
movq %r15, %rdi
callq 0xe87a
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x24481
leaq 0x60(%rbx), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x7410
movq (%r15), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24e4a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7340
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x24e67
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x7340
cmpl $0x4, %ebp
jl 0x24ebf
movq (%r14), %rsi
movq 0x68(%rsi), %rax
addq $0x60, %rsi
testq %rax, %rax
je 0x24eb3
decq %rax
cmpq $0x2, %rax
movl $0x2, %ecx
cmovbq %rax, %rcx
movq (%rsi), %rdx
incq %rcx
xorl %edi, %edi
leaq 0x123c6(%rip), %r8      # 0x37261
movb (%rdx,%rdi), %r9b
cmpb (%rdi,%r8), %r9b
jne 0x24eb3
incq %rdi
cmpq %rdi, %rcx
jne 0x24e9b
cmpq $0x1, %rax
ja 0x24ebf
subq $-0x80, %rbx
movq %rbx, %rdi
callq 0x71f0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x24f2d
movq 0x38(%rsp), %rsi
jmp 0x24f25
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x24f2d
movq 0x98(%rsp), %rsi
jmp 0x24f25
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x24f2d
movq 0x78(%rsp), %rsi
jmp 0x24f25
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x24f2d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7340
movq %rbx, %rdi
callq 0x7630