// File: yayuntian[P]user_agent/bot.cpp
// Function: checkBot(UserAgent&, std::vector<Section, std::allocator<Section>>&, int)
void checkBot(UserAgent& p, vector<Section>& sections, int slen) {
    if (slen == 1 && sections[0].name != "Mozilla") {
        p.mozilla = "";
        if (boost::regex_search(sections[0].name, botRegexp)) {
            setSimple(p, sections[0].name, "", true);
            return;
        }

        string name = getFromSite(sections[0].comment);
        if (name != "") {
            setSimple(p, sections[0].name, sections[0].version, true);
            return;
        }

        setSimple(p, sections[0].name, sections[0].version, false);
    } else {
        for (int i = 0; i < slen; i++) {
            string name = getFromSite(sections[i].comment);
            if (name != "") {
                vector<string> s;
                split(s, name, is_any_of("/"));
                string version = "";
                if (s.size() == 2) {
                    version = s[1];
                }
                setSimple(p, s[0], version, true);
                return;
            }
        }
        fixOther(p, sections, slen);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
jne 0x56b8e
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15670
movq %rax, %rdi
leaq 0x11df4(%rip), %rsi     # 0x6865b
callq 0x4f770
testb $0x1, %al
jne 0x56875
jmp 0x56b8e
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
leaq 0x13b88(%rip), %rsi     # 0x6a40c
callq 0x8670
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15670
movq %rax, %rdi
leaq 0x3bda8(%rip), %rsi     # 0x92648
xorl %edx, %edx
callq 0x571e0
testb $0x1, %al
jne 0x568b0
jmp 0x56972
movq -0x8(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15670
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
callq 0x81c0
leaq -0x59(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x88c0
movq -0x1e0(%rbp), %rdx
leaq 0x13b1a(%rip), %rsi     # 0x6a40c
leaq -0x58(%rbp), %rdi
callq 0x13330
jmp 0x568fd
movq -0x1e8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x58(%rbp), %rdx
movl $0x1, %ecx
callq 0x566a0
jmp 0x56918
leaq -0x58(%rbp), %rdi
callq 0x89e8
leaq -0x59(%rbp), %rdi
callq 0x8510
leaq -0x38(%rbp), %rdi
callq 0x89e8
jmp 0x56e6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x5695b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x89e8
leaq -0x59(%rbp), %rdi
callq 0x8510
leaq -0x38(%rbp), %rdi
callq 0x89e8
jmp 0x56e76
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15670
movq %rax, %rsi
addq $0x40, %rsi
leaq -0x90(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x56240
movq -0x1f8(%rbp), %rdi
leaq 0x13a65(%rip), %rsi     # 0x6a40c
callq 0x4f770
movb %al, -0x1e9(%rbp)
jmp 0x569b4
movb -0x1e9(%rbp), %al
testb $0x1, %al
jne 0x569c3
jmp 0x56a9e
movq -0x8(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15670
movq %rax, %rsi
leaq -0xb0(%rbp), %rdi
callq 0x81c0
jmp 0x569ec
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15670
movq %rax, %rsi
addq $0x20, %rsi
leaq -0xd0(%rbp), %rdi
callq 0x81c0
jmp 0x56a0e
movq -0x200(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
movl $0x1, %ecx
callq 0x566a0
jmp 0x56a2f
leaq -0xd0(%rbp), %rdi
callq 0x89e8
leaq -0xb0(%rbp), %rdi
callq 0x89e8
movl $0x1, -0xd4(%rbp)
jmp 0x56b29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x56b7d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x56a8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x89e8
leaq -0xb0(%rbp), %rdi
callq 0x89e8
jmp 0x56b7d
movq -0x8(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15670
movq %rax, %rsi
leaq -0xf8(%rbp), %rdi
callq 0x81c0
jmp 0x56ac7
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15670
movq %rax, %rsi
addq $0x20, %rsi
leaq -0x118(%rbp), %rdi
callq 0x81c0
jmp 0x56ae9
movq -0x208(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
leaq -0x118(%rbp), %rdx
xorl %ecx, %ecx
callq 0x566a0
jmp 0x56b07
leaq -0x118(%rbp), %rdi
callq 0x89e8
leaq -0xf8(%rbp), %rdi
callq 0x89e8
movl $0x0, -0xd4(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x89e8
movl -0xd4(%rbp), %eax
testl %eax, %eax
je 0x56b46
jmp 0x56b41
jmp 0x56e6d
jmp 0x56e6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x56b71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x89e8
leaq -0xf8(%rbp), %rdi
callq 0x89e8
leaq -0x90(%rbp), %rdi
callq 0x89e8
jmp 0x56e76
movl $0x0, -0x11c(%rbp)
movl -0x11c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x56e5d
movq -0x10(%rbp), %rdi
movslq -0x11c(%rbp), %rsi
callq 0x15670
movq %rax, %rsi
addq $0x40, %rsi
leaq -0x140(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0x56240
movq -0x218(%rbp), %rdi
leaq 0x1382d(%rip), %rsi     # 0x6a40c
callq 0x4f770
movb %al, -0x209(%rbp)
jmp 0x56bec
movb -0x209(%rbp), %al
testb $0x1, %al
jne 0x56bfb
jmp 0x56e15
leaq -0x158(%rbp), %rdi
callq 0x15710
leaq 0x1423e(%rip), %rsi     # 0x6ae4c
leaq -0x170(%rbp), %rdi
callq 0x4f8f0
jmp 0x56c1c
leaq -0x158(%rbp), %rdi
leaq -0x140(%rbp), %rsi
leaq -0x170(%rbp), %rdx
movl $0x1, %ecx
callq 0x4f820
jmp 0x56c3d
leaq -0x170(%rbp), %rdi
callq 0x4f940
leaq -0x191(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0x88c0
movq -0x220(%rbp), %rdx
leaq 0x137a2(%rip), %rsi     # 0x6a40c
leaq -0x190(%rbp), %rdi
callq 0x13330
jmp 0x56c78
leaq -0x191(%rbp), %rdi
callq 0x8510
leaq -0x158(%rbp), %rdi
callq 0x15690
cmpq $0x2, %rax
jne 0x56d2b
leaq -0x158(%rbp), %rdi
movl $0x1, %esi
callq 0x4f7a0
movq %rax, %rsi
leaq -0x190(%rbp), %rdi
callq 0x8060
jmp 0x56cbc
jmp 0x56d2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x56e4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x56e07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x4f940
jmp 0x56e07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x191(%rbp), %rdi
callq 0x8510
jmp 0x56e07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x56dfb
movq -0x8(%rbp), %rax
movq %rax, -0x228(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0x4f7a0
movq %rax, %rsi
leaq -0x1b8(%rbp), %rdi
callq 0x81c0
jmp 0x56d57
leaq -0x1d8(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x81c0
jmp 0x56d6c
movq -0x228(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
leaq -0x1d8(%rbp), %rdx
movl $0x1, %ecx
callq 0x566a0
jmp 0x56d8d
leaq -0x1d8(%rbp), %rdi
callq 0x89e8
leaq -0x1b8(%rbp), %rdi
callq 0x89e8
movl $0x1, -0xd4(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x89e8
leaq -0x158(%rbp), %rdi
callq 0x15790
jmp 0x56e1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x56def
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x89e8
leaq -0x1b8(%rbp), %rdi
callq 0x89e8
leaq -0x190(%rbp), %rdi
callq 0x89e8
leaq -0x158(%rbp), %rdi
callq 0x15790
jmp 0x56e4f
movl $0x0, -0xd4(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x89e8
movl -0xd4(%rbp), %eax
testl %eax, %eax
je 0x56e39
jmp 0x56e37
jmp 0x56e6d
jmp 0x56e3b
movl -0x11c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x11c(%rbp)
jmp 0x56b98
leaq -0x140(%rbp), %rdi
callq 0x89e8
jmp 0x56e76
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x567b0
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x88a0
nop