// File: /workspace/github_c_makefile_star2_O3/jech[P]dht/dht.c
// Function: dht_periodic
int
dht_periodic(const void *buf, size_t buflen,
             const struct sockaddr *from, int fromlen,
             time_t *tosleep,
             dht_callback_t *callback, void *closure)
{
    dht_gettimeofday(&now, NULL);

    if(buflen > 0) {
        int message;
        struct parsed_message m;
        unsigned short ttid;

        if(is_martian(from))
            goto dontread;

        if(node_blacklisted(from, fromlen)) {
            debugf("Received packet from blacklisted node.\n");
            goto dontread;
        }

        if(((char*)buf)[buflen] != '\0') {
            debugf("Unterminated message.\n");
            errno = EINVAL;
            return -1;
        }

        memset(&m, 0, sizeof(m));
        message = parse_message(buf, buflen, &m);

        if(message < 0 || message == ERROR || id_cmp(m.id, zeroes) == 0) {
            debugf("Unparseable message: ");
            debug_printable(buf, buflen);
            debugf("\n");
            goto dontread;
        }

        if(id_cmp(m.id, myid) == 0) {
            debugf("Received message from self.\n");
            goto dontread;
        }

        if(message > REPLY) {
            /* Rate limit requests. */
            if(!token_bucket()) {
                debugf("Dropping request due to rate limiting.\n");
                goto dontread;
            }
        }

        switch(message) {
        case REPLY:
            if(m.tid_len != 4) {
                debugf("Broken node truncates transaction ids: ");
                debug_printable(buf, buflen);
                debugf("\n");
                /* This is really annoying, as it means that we will
                   time-out all our searches that go through this node.
                   Kill it. */
                blacklist_node(m.id, from, fromlen);
                goto dontread;
            }
            if(tid_match(m.tid, "pn", NULL)) {
                debugf("Pong!\n");
                new_node(m.id, from, fromlen, 2);
            } else if(tid_match(m.tid, "fn", NULL) ||
                      tid_match(m.tid, "gp", NULL)) {
                int gp = 0;
                struct search *sr = NULL;
                if(tid_match(m.tid, "gp", &ttid)) {
                    gp = 1;
                    sr = find_search(ttid, from->sa_family);
                }
                debugf("Nodes found (%d+%d)%s!\n",
                       m.nodes_len/26, m.nodes6_len/38,
                       gp ? " for get_peers" : "");
                if(m.nodes_len % 26 != 0 || m.nodes6_len % 38 != 0) {
                    debugf("Unexpected length for node info!\n");
                    blacklist_node(m.id, from, fromlen);
                } else if(gp && sr == NULL) {
                    debugf("Unknown search!\n");
                    new_node(m.id, from, fromlen, 1);
                } else {
                    int i;
                    new_node(m.id, from, fromlen, 2);
                    for(i = 0; i < m.nodes_len / 26; i++) {
                        unsigned char *ni = m.nodes + i * 26;
                        struct sockaddr_in sin;
                        if(id_cmp(ni, myid) == 0)
                            continue;
                        memset(&sin, 0, sizeof(sin));
                        sin.sin_family = AF_INET;
                        memcpy(&sin.sin_addr, ni + 20, 4);
                        memcpy(&sin.sin_port, ni + 24, 2);
                        new_node(ni, (struct sockaddr*)&sin, sizeof(sin), 0);
                        if(sr && sr->af == AF_INET) {
                            insert_search_node(ni,
                                               (struct sockaddr*)&sin,
                                               sizeof(sin),
                                               sr, 0, NULL, 0);
                        }
                    }
                    for(i = 0; i < m.nodes6_len / 38; i++) {
                        unsigned char *ni = m.nodes6 + i * 38;
                        struct sockaddr_in6 sin6;
                        if(id_cmp(ni, myid) == 0)
                            continue;
                        memset(&sin6, 0, sizeof(sin6));
                        sin6.sin6_family = AF_INET6;
                        memcpy(&sin6.sin6_addr, ni + 20, 16);
                        memcpy(&sin6.sin6_port, ni + 36, 2);
                        new_node(ni, (struct sockaddr*)&sin6, sizeof(sin6), 0);
                        if(sr && sr->af == AF_INET6) {
                            insert_search_node(ni,
                                               (struct sockaddr*)&sin6,
                                               sizeof(sin6),
                                               sr, 0, NULL, 0);
                        }
                    }
                    if(sr)
                        /* Since we received a reply, the number of
                           requests in flight has decreased.  Let's push
                           another request. */
                        search_send_get_peers(sr, NULL);
                }
                if(sr) {
                    insert_search_node(m.id, from, fromlen, sr,
                                       1, m.token, m.token_len);
                    if(m.values_len > 0 || m.values6_len > 0) {
                        debugf("Got values (%d+%d)!\n",
                               m.values_len / 6, m.values6_len / 18);
                        if(callback) {
                            if(m.values_len > 0)
                                (*callback)(closure, DHT_EVENT_VALUES, sr->id,
                                            (void*)m.values, m.values_len);

                            if(m.values6_len > 0)
                                (*callback)(closure, DHT_EVENT_VALUES6, sr->id,
                                            (void*)m.values6, m.values6_len);
                        }
                    }
                }
            } else if(tid_match(m.tid, "ap", &ttid)) {
                struct search *sr;
                debugf("Got reply to announce_peer.\n");
                sr = find_search(ttid, from->sa_family);
                if(!sr) {
                    debugf("Unknown search!\n");
                    new_node(m.id, from, fromlen, 1);
                } else {
                    int i;
                    new_node(m.id, from, fromlen, 2);
                    for(i = 0; i < sr->numnodes; i++)
                        if(id_cmp(sr->nodes[i].id, m.id) == 0) {
                            sr->nodes[i].request_time = 0;
                            sr->nodes[i].reply_time = now.tv_sec;
                            sr->nodes[i].acked = 1;
                            sr->nodes[i].pinged = 0;
                            break;
                        }
                    /* See comment for gp above. */
                    search_send_get_peers(sr, NULL);
                }
            } else {
                debugf("Unexpected reply: ");
                debug_printable(buf, buflen);
                debugf("\n");
            }
            break;
        case PING:
            debugf("Ping (%d)!\n", m.tid_len);
            new_node(m.id, from, fromlen, 1);
            debugf("Sending pong.\n");
            send_pong(from, fromlen, m.tid, m.tid_len);
            break;
        case FIND_NODE:
            debugf("Find node!\n");
            new_node(m.id, from, fromlen, 1);
            debugf("Sending closest nodes (%d).\n", m.want);
            send_closest_nodes(from, fromlen,
                               m.tid, m.tid_len, m.target, m.want,
                               0, NULL, NULL, 0);
            break;
        case GET_PEERS:
            debugf("Get_peers!\n");
            new_node(m.id, from, fromlen, 1);
            if(id_cmp(m.info_hash, zeroes) == 0) {
                debugf("Eek!  Got get_peers with no info_hash.\n");
                send_error(from, fromlen, m.tid, m.tid_len,
                           203, "Get_peers with no info_hash");
                break;
            } else {
                struct storage *st = find_storage(m.info_hash);
                unsigned char token[TOKEN_SIZE];
                make_token(from, 0, token);
                if(st && st->numpeers > 0) {
                     debugf("Sending found%s peers.\n",
                            from->sa_family == AF_INET6 ? " IPv6" : "");
                     send_closest_nodes(from, fromlen,
                                        m.tid, m.tid_len,
                                        m.info_hash, m.want,
                                        from->sa_family, st,
                                        token, TOKEN_SIZE);
                } else {
                    debugf("Sending nodes for get_peers.\n");
                    send_closest_nodes(from, fromlen,
                                       m.tid, m.tid_len, m.info_hash, m.want,
                                       0, NULL, token, TOKEN_SIZE);
                }
            }
            break;
        case ANNOUNCE_PEER:
            debugf("Announce peer!\n");
            new_node(m.id, from, fromlen, 1);
            if(id_cmp(m.info_hash, zeroes) == 0) {
                debugf("Announce_peer with no info_hash.\n");
                send_error(from, fromlen, m.tid, m.tid_len,
                           203, "Announce_peer with no info_hash");
                break;
            }
            if(!token_match(m.token, m.token_len, from)) {
                debugf("Incorrect token for announce_peer.\n");
                send_error(from, fromlen, m.tid, m.tid_len,
                           203, "Announce_peer with wrong token");
                break;
            }
            if(m.implied_port != 0) {
                /* Do this even if port > 0.  That's what the spec says. */
                switch(from->sa_family) {
                case AF_INET:
                    m.port = htons(((struct sockaddr_in*)from)->sin_port);
                    break;
                case AF_INET6:
                    m.port = htons(((struct sockaddr_in6*)from)->sin6_port);
                    break;
                }
            }
            if(m.port == 0) {
                debugf("Announce_peer with forbidden port %d.\n", m.port);
                send_error(from, fromlen, m.tid, m.tid_len,
                           203, "Announce_peer with forbidden port number");
                break;
            }
            storage_store(m.info_hash, from, m.port);
            /* Note that if storage_store failed, we lie to the requestor.
               This is to prevent them from backtracking, and hence
               polluting the DHT. */
            debugf("Sending peer announced.\n");
            send_peer_announced(from, fromlen, m.tid, m.tid_len);
        }
    }

 dontread:
    if(now.tv_sec >= rotate_secrets_time)
        rotate_secrets();

    if(now.tv_sec >= expire_stuff_time) {
        expire_buckets(buckets);
        expire_buckets(buckets6);
        expire_storage();
        expire_searches(callback, closure);
    }

    if(search_time > 0 && now.tv_sec >= search_time) {
        struct search *sr;
        sr = searches;
        while(sr) {
            if(!sr->done &&
               sr->step_time + DHT_SEARCH_RETRANSMIT / 2 + 1 <= now.tv_sec) {
                search_step(sr, callback, closure);
            }
            sr = sr->next;
        }

        search_time = 0;

        sr = searches;
        while(sr) {
            if(!sr->done) {
                time_t tm = sr->step_time +
                    DHT_SEARCH_RETRANSMIT + random() % DHT_SEARCH_RETRANSMIT;
                if(search_time == 0 || search_time > tm)
                    search_time = tm;
            }
            sr = sr->next;
        }
    }

    if(now.tv_sec >= confirm_nodes_time) {
        int soon = 0;

        soon |= bucket_maintenance(AF_INET);
        soon |= bucket_maintenance(AF_INET6);

        if(!soon) {
            if(mybucket_grow_time >= now.tv_sec - 150)
                soon |= neighbourhood_maintenance(AF_INET);
            if(mybucket6_grow_time >= now.tv_sec - 150)
                soon |= neighbourhood_maintenance(AF_INET6);
        }

        /* Given the timeouts in bucket_maintenance, with a 22-bucket
           table, worst case is a ping every 18 seconds (22 buckets plus
           11 buckets overhead for the larger buckets).  Keep the "soon"
           case within 15 seconds, which gives some margin for neighbourhood
           maintenance. */

        if(soon)
            confirm_nodes_time = now.tv_sec + 5 + random() % 10;
        else
            confirm_nodes_time = now.tv_sec + 60 + random() % 120;
    }

    if(confirm_nodes_time > now.tv_sec)
        *tosleep = confirm_nodes_time - now.tv_sec;
    else
        *tosleep = 0;

    if(search_time > 0) {
        if(search_time <= now.tv_sec)
            *tosleep = 0;
        else if(*tosleep > search_time - now.tv_sec)
            *tosleep = search_time - now.tv_sec;
    }

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1538, %rsp           # imm = 0x1538
movq %r9, 0x28(%rsp)
movq %r8, 0x50(%rsp)
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
leaq 0x93d8(%rip), %rdi      # 0xdc10
xorl %esi, %esi
callq 0x2130
testq %r13, %r13
je 0x4871
movq %r12, %rdi
callq 0x5d70
testl %eax, %eax
jne 0x4871
movq %r12, %rdi
movl %r14d, %esi
callq 0x5dec
testl %eax, %eax
je 0x4c48
leaq 0x4ab5(%rip), %rdi      # 0x931f
xorl %eax, %eax
callq 0x362c
movq 0x9398(%rip), %rax      # 0xdc10
cmpq 0x9439(%rip), %rax      # 0xdcb8
jl 0x488d
callq 0x4551
movq 0x9383(%rip), %rax      # 0xdc10
cmpq 0x942c(%rip), %rax      # 0xdcc0
movq 0x28(%rsp), %r14
movq 0x1570(%rsp), %rbp
jl 0x4a61
movq 0x93a2(%rip), %rdi      # 0xdc50
callq 0x45be
movq 0x939e(%rip), %rdi      # 0xdc58
callq 0x45be
movq 0x939a(%rip), %r13      # 0xdc60
testq %r13, %r13
je 0x49af
movq $-0x780, %rbp           # imm = 0xF880
leaq 0x9383(%rip), %rbx      # 0xdc60
leaq 0x4ffd(%rip), %r12      # 0x98e1
xorl %r15d, %r15d
movl 0x14(%r13), %edx
testl %edx, %edx
jle 0x4949
movq 0x931a(%rip), %rax      # 0xdc10
addq %rbp, %rax
xorl %ecx, %ecx
movq 0x20(%r13), %rdi
movslq %ecx, %rsi
shlq $0x5, %rsi
cmpq %rax, (%rdi,%rsi)
jge 0x4943
decl %edx
movl %ecx, %r8d
cmpl %edx, %ecx
je 0x493a
addq %rdi, %rsi
movslq %edx, %rdx
shlq $0x5, %rdx
movdqu (%rdi,%rdx), %xmm0
movdqu 0x10(%rdi,%rdx), %xmm1
movdqu %xmm1, 0x10(%rsi)
movdqu %xmm0, (%rsi)
movl 0x14(%r13), %r8d
decl %r8d
movl %r8d, 0x14(%r13)
movl %r8d, %edx
jmp 0x4945
incl %ecx
cmpl %edx, %ecx
jl 0x48fb
testl %edx, %edx
je 0x4956
movq 0x28(%r13), %r14
movq %r13, %r15
jmp 0x49a3
movq 0x20(%r13), %rdi
callq 0x2040
leaq 0x28(%r15), %r14
testq %r15, %r15
movq 0x28(%r13), %rax
cmoveq %rbx, %r14
movq %rax, (%r14)
movq %r13, %rdi
callq 0x2040
movq (%r14), %r14
movl 0x92ea(%rip), %eax      # 0xdc6c
leal -0x1(%rax), %ecx
movl %ecx, 0x92e1(%rip)      # 0xdc6c
testl %eax, %eax
jg 0x49a3
movq %r12, %rdi
xorl %eax, %eax
callq 0x362c
movl $0x0, 0x92c9(%rip)      # 0xdc6c
movq %r14, %r13
testq %r14, %r14
jne 0x48e7
movq 0x9252(%rip), %r12      # 0xdc08
movq 0x9253(%rip), %rax      # 0xdc10
testq %r12, %r12
je 0x4a54
xorl %r15d, %r15d
leaq 0x9238(%rip), %rbx      # 0xdc08
movq 0x28(%rsp), %r14
movq 0x1570(%rsp), %rbp
movq 0xce8(%r12), %r13
leaq -0xe88(%rax), %rcx
cmpq %rcx, 0x8(%r12)
jge 0x4a47
leaq 0xce8(%r15), %rax
testq %r15, %r15
cmoveq %rbx, %rax
movq %r13, (%rax)
decl 0x925e(%rip)            # 0xdc68
testq %r14, %r14
je 0x4a36
cmpl $0x0, 0x28(%r12)
jne 0x4a36
xorl %esi, %esi
cmpl $0x2, 0x4(%r12)
setne %sil
addl $0x3, %esi
leaq 0x10(%r12), %rdx
movq %rbp, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq *%r14
movq %r12, %rdi
callq 0x2040
movq 0x91cb(%rip), %rax      # 0xdc10
jmp 0x4a4a
movq %r12, %r15
movq %r13, %r12
testq %r13, %r13
jne 0x49dd
jmp 0x4a61
movq 0x28(%rsp), %r14
movq 0x1570(%rsp), %rbp
movq 0x91e0(%rip), %rcx      # 0xdc48
testq %rcx, %rcx
jle 0x4b4d
cmpq %rcx, %rax
jl 0x4b4d
movq 0x9187(%rip), %r12      # 0xdc08
testq %r12, %r12
je 0x4b40
cmpl $0x0, 0x28(%r12)
jne 0x4ab2
movq 0x8(%r12), %rax
addq $0x6, %rax
cmpq 0x916e(%rip), %rax      # 0xdc10
jg 0x4ab2
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x379c
movq 0xce8(%r12), %r12
testq %r12, %r12
jne 0x4a8a
movq 0x9142(%rip), %rbx      # 0xdc08
movq $0x0, 0x9177(%rip) # 0xdc48
testq %rbx, %rbx
je 0x4b4b
xorl %ecx, %ecx
movabsq $0x6666666666666667, %r14 # imm = 0x6666666666666667
cmpl $0x0, 0x28(%rbx)
jne 0x4b32
movq 0x8(%rbx), %r15
callq 0x2230
movq %rax, %rcx
imulq %r14
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
addq %rdx, %rdx
leaq (%rdx,%rdx,4), %rax
subq %rax, %rcx
leaq (%r15,%rcx), %rax
addq $0xa, %rax
movq 0x912a(%rip), %rcx      # 0xdc48
testq %rcx, %rcx
je 0x4b28
cmpq %rax, %rcx
jle 0x4b32
movq %rax, 0x9119(%rip)      # 0xdc48
movq %rax, %rcx
movq 0xce8(%rbx), %rbx
testq %rbx, %rbx
jne 0x4ae2
jmp 0x4b4d
movq $0x0, 0x90fd(%rip) # 0xdc48
xorl %ecx, %ecx
movq 0x90bc(%rip), %rax      # 0xdc10
movq 0x9135(%rip), %rdx      # 0xdc90
cmpq %rdx, %rax
jl 0x4c01
movl $0x2, %edi
callq 0x76a1
movl %eax, %ebp
movl $0xa, %edi
callq 0x76a1
orl %ebp, %eax
movq 0x908d(%rip), %rbx      # 0xdc10
jne 0x4bd5
leaq -0x96(%rbx), %rax
xorl %ebp, %ebp
cmpq %rax, 0x90eb(%rip)      # 0xdc80
jl 0x4bb1
movl $0x2, %edi
callq 0x7a42
movl %eax, %ebp
movq 0x9066(%rip), %rbx      # 0xdc10
leaq -0x96(%rbx), %rax
cmpq %rax, 0x90d0(%rip)      # 0xdc88
jl 0x4bcd
movl $0xa, %edi
callq 0x7a42
orl %eax, %ebp
movq 0x9043(%rip), %rbx      # 0xdc10
testl %ebp, %ebp
je 0x4c70
addq $0x5, %rbx
movl $0xa, %r14d
callq 0x2230
cqto
idivq %r14
addq %rbx, %rdx
movq %rdx, 0x909d(%rip)      # 0xdc90
movq 0x9016(%rip), %rax      # 0xdc10
movq 0x9047(%rip), %rcx      # 0xdc48
xorl %esi, %esi
subq %rax, %rdx
cmovgq %rdx, %rsi
movq 0x50(%rsp), %rdx
movq %rsi, (%rdx)
movl $0x1, %eax
testq %rcx, %rcx
jle 0x4c36
subq 0x8fed(%rip), %rcx      # 0xdc10
jle 0x4c2f
cmpq %rcx, %rsi
jle 0x4c36
movq %rcx, (%rdx)
jmp 0x4c36
movq $0x0, (%rdx)
addq $0x1538, %rsp           # imm = 0x1538
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x0, (%rbp,%r13)
je 0x4c7f
leaq 0x46f0(%rip), %rdi      # 0x9347
xorl %eax, %eax
callq 0x362c
callq 0x2060
movl $0x16, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x4c36
addq $0x3c, %rbx
movl $0x78, %r14d
jmp 0x4bdf
leaq 0x5a(%rsp), %rdi
movl $0x14de, %edx           # imm = 0x14DE
xorl %esi, %esi
callq 0x2140
movslq %r13d, %rbx
cmpb $0x0, (%rbp,%rbx)
je 0x4ca6
leaq 0x4d54(%rip), %rbx      # 0x99f5
jmp 0x4e86
leaq (%rbx,%rbp), %rax
movq %rax, 0x8(%rsp)
leaq 0x4d6e(%rip), %rdx      # 0x9a24
movl $0x3, %ecx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x21f0
testq %rax, %rax
je 0x4d2a
addq $0x3, %rax
leaq 0x30(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x21e0
movq (%r15), %rsi
testq %rsi, %rsi
je 0x4d2a
cmpb $0x3a, (%rsi)
jne 0x4d2a
leaq -0x1(%rax), %rcx
cmpq $0xe, %rcx
ja 0x4d2a
leaq (%rsi,%rax), %rcx
incq %rcx
cmpq 0x8(%rsp), %rcx
ja 0x4e7f
incq %rsi
leaq 0x5a(%rsp), %rdi
movq %rax, %r15
movq %rax, %rdx
callq 0x2200
leaq 0x5a(%rsp), %rax
movw %r15w, 0x10(%rax)
leaq 0x4950(%rip), %rdx      # 0x9681
movl $0x7, %ecx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x21f0
testq %rax, %rax
je 0x4d67
leaq 0x1b(%rax), %rcx
cmpq 0x8(%rsp), %rcx
ja 0x4e7f
movl 0x17(%rax), %ecx
movl %ecx, 0x7c(%rsp)
movdqu 0x7(%rax), %xmm0
movdqu %xmm0, 0x6c(%rsp)
leaq 0x491b(%rip), %rdx      # 0x9689
movl $0xe, %ecx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x21f0
testq %rax, %rax
je 0x4daa
leaq 0x22(%rax), %rcx
cmpq 0x8(%rsp), %rcx
ja 0x4e7f
movl 0x1e(%rax), %ecx
movl %ecx, 0x90(%rsp)
movdqu 0xe(%rax), %xmm0
movdqu %xmm0, 0x80(%rsp)
leaq 0x4c77(%rip), %rdx      # 0x9a28
movl $0x7, %ecx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x21f0
testq %rax, %rax
je 0x4e01
addq $0x7, %rax
leaq 0x30(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x21e0
movq (%r15), %rcx
testq %rcx, %rcx
je 0x4e01
cmpb $0x65, (%rcx)
jne 0x4e01
leaq -0x1(%rax), %rcx
cmpq $0xfffe, %rcx           # imm = 0xFFFE
ja 0x4e01
movw %ax, 0xa8(%rsp)
leaq 0x4c28(%rip), %rdx      # 0x9a30
movl $0x10, %ecx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x21f0
testq %rax, %rax
je 0x4e58
addq $0x10, %rax
leaq 0x30(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x21e0
movq (%r15), %rcx
testq %rcx, %rcx
je 0x4e58
cmpb $0x65, (%rcx)
jne 0x4e58
leaq -0x1(%rax), %rcx
cmpq $0xfffe, %rcx           # imm = 0xFFFE
ja 0x4e58
movw %ax, 0xaa(%rsp)
leaq 0x4ad3(%rip), %rdx      # 0x9932
movl $0xb, %ecx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x21f0
testq %rax, %rax
je 0x4ecd
leaq 0x1f(%rax), %rcx
cmpq 0x8(%rsp), %rcx
jbe 0x4eb5
leaq 0x4cb6(%rip), %rbx      # 0x9b3c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x362c
leaq 0x44c7(%rip), %rdi      # 0x935e
xorl %eax, %eax
callq 0x362c
movq %rbp, %rdi
movl %r13d, %esi
callq 0x5e4f
leaq 0x4467(%rip), %rdi      # 0x9317
jmp 0x486a
movl 0x1b(%rax), %ecx
movl %ecx, 0xa4(%rsp)
movdqu 0xb(%rax), %xmm0
movdqu %xmm0, 0x94(%rsp)
leaq 0x4b6d(%rip), %rdx      # 0x9a41
movl $0x7, %ecx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x21f0
testq %rax, %rax
je 0x4f51
addq $0x7, %rax
leaq 0x30(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x21e0
movq (%r15), %rsi
testq %rsi, %rsi
je 0x4f51
cmpb $0x3a, (%rsi)
jne 0x4f51
leaq -0x1(%rax), %rcx
cmpq $0x7e, %rcx
ja 0x4f51
leaq (%rsi,%rax), %rcx
incq %rcx
cmpq 0x8(%rsp), %rcx
ja 0x4e7f
incq %rsi
leaq 0xac(%rsp), %rdi
movq %rax, %r15
movq %rax, %rdx
callq 0x2200
leaq 0xac(%rsp), %rax
movw %r15w, 0x80(%rax)
leaq 0x4af1(%rip), %rdx      # 0x9a49
movl $0x7, %ecx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x21f0
testq %rax, %rax
je 0x4fd8
addq $0x7, %rax
leaq 0x30(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x21e0
movq (%r15), %rsi
testq %rsi, %rsi
je 0x4fd8
cmpb $0x3a, (%rsi)
jne 0x4fd8
leaq -0x1(%rax), %rcx
cmpq $0x19f, %rcx            # imm = 0x19F
ja 0x4fd8
leaq (%rsi,%rax), %rcx
incq %rcx
cmpq 0x8(%rsp), %rcx
ja 0x4e7f
incq %rsi
leaq 0x12e(%rsp), %rdi
movq %rax, %r15
movq %rax, %rdx
callq 0x2200
leaq 0x12e(%rsp), %rax
movw %r15w, 0x1a0(%rax)
leaq 0x4a72(%rip), %rdx      # 0x9a51
movl $0x8, %ecx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x21f0
testq %rax, %rax
je 0x505f
addq $0x8, %rax
leaq 0x30(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x21e0
movq (%r15), %rsi
testq %rsi, %rsi
je 0x505f
cmpb $0x3a, (%rsi)
jne 0x505f
leaq -0x1(%rax), %rcx
cmpq $0x25f, %rcx            # imm = 0x25F
ja 0x505f
leaq (%rsi,%rax), %rcx
incq %rcx
cmpq 0x8(%rsp), %rcx
ja 0x4e7f
incq %rsi
leaq 0x2d0(%rsp), %rdi
movq %rax, %r15
movq %rax, %rdx
callq 0x2200
leaq 0x2d0(%rsp), %rax
movw %r15w, 0x260(%rax)
leaq 0x4970(%rip), %rdx      # 0x99d6
movl $0x9, %ecx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x21f0
testq %rax, %rax
je 0x5201
subl %ebp, %eax
addl $0x9, %eax
movq %rax, 0x18(%rsp)
movslq %eax, %rdi
addq %rbp, %rdi
leaq 0x30(%rsp), %r15
movq %r15, %rsi
movl $0xa, %edx
callq 0x21e0
movq (%r15), %rcx
testq %rcx, %rcx
je 0x51b7
movl $0x0, 0x10(%rsp)
cmpb $0x3a, (%rcx)
jne 0x51bf
movl $0x0, 0x20(%rsp)
testq %rax, %rax
movq 0x18(%rsp), %r15
jle 0x51cc
movl $0x0, 0x10(%rsp)
movl $0x0, 0x20(%rsp)
leaq (%rcx,%rax), %rsi
incq %rsi
cmpq 0x8(%rsp), %rsi
ja 0x4e7f
incq %rcx
cmpq $0x12, %rax
je 0x513a
cmpq $0x6, %rax
jne 0x516c
movl 0x10(%rsp), %edx
cmpl $0x7fa, %edx            # imm = 0x7FA
jg 0x5182
movslq %edx, %rax
addl $0x6, %edx
movl %edx, 0x10(%rsp)
movzwl 0x4(%rcx), %edx
leaq 0xd34(%rsp), %rdi
movw %dx, -0x7fe(%rdi,%rax)
movl (%rcx), %ecx
movl %ecx, -0x802(%rdi,%rax)
jmp 0x5182
movl 0x20(%rsp), %edx
cmpl $0x7ee, %edx            # imm = 0x7EE
jg 0x5182
movslq %edx, %rax
addl $0x12, %edx
movl %edx, 0x20(%rsp)
movzwl 0x10(%rcx), %edx
leaq 0xd34(%rsp), %rdi
movw %dx, 0x10(%rdi,%rax)
movdqu (%rcx), %xmm0
movdqu %xmm0, (%rdi,%rax)
jmp 0x5182
leaq 0x48e7(%rip), %rdi      # 0x9a5a
movq %rsi, %r15
movl %eax, %esi
xorl %eax, %eax
callq 0x362c
movq %r15, %rsi
subq %rbp, %rsi
movq %rsi, %r15
movslq %esi, %rdi
addq %rbp, %rdi
leaq 0x30(%rsp), %rsi
movl $0xa, %edx
callq 0x21e0
movq 0x30(%rsp), %rcx
testq %rcx, %rcx
je 0x51cc
cmpb $0x3a, (%rcx)
jne 0x51cc
testq %rax, %rax
jg 0x50e4
jmp 0x51cc
movl $0x0, 0x10(%rsp)
movl $0x0, 0x20(%rsp)
movq 0x18(%rsp), %r15
cmpl %r13d, %r15d
jge 0x51db
movslq %r15d, %rax
cmpb $0x65, (%rbp,%rax)
je 0x51e9
leaq 0x489b(%rip), %rdi      # 0x9a7d
xorl %eax, %eax
callq 0x362c
movl 0x10(%rsp), %eax
movw %ax, 0xd32(%rsp)
movl 0x20(%rsp), %eax
movw %ax, 0x1534(%rsp)
leaq 0x4898(%rip), %rdx      # 0x9aa0
movl $0x7, %ecx
movq %rbp, %rdi
movq %rbx, 0x20(%rsp)
movq %rbx, %rsi
callq 0x21f0
testq %rax, %rax
je 0x5316
subl %ebp, %eax
addl $0x7, %eax
movw $0x0, 0x1536(%rsp)
movslq %eax, %r15
movb (%rbp,%r15), %dl
leal -0x31(%rdx), %ecx
cmpb $0x8, %cl
ja 0x52fe
addq %rbp, %r15
leaq 0x48e9(%rip), %rbx      # 0x9b3c
movl $0x0, 0x18(%rsp)
cmpb $0x3a, 0x1(%r15)
jne 0x5308
movzbl %dl, %esi
leal (%rax,%rsi), %ecx
addl $-0x2e, %ecx
cmpl %r13d, %ecx
jge 0x5308
movl %esi, %ecx
addq %r15, %rcx
addq $-0x2e, %rcx
cmpq 0x8(%rsp), %rcx
ja 0x4e86
movq %rax, 0x10(%rsp)
cmpl $0x32, %esi
jne 0x52a8
leaq 0x2(%r15), %rax
cmpw $0x346e, (%rax)         # imm = 0x346E
je 0x52bc
cmpw $0x366e, (%rax)         # imm = 0x366E
je 0x52c5
leaq 0x47f9(%rip), %rdi      # 0x9aa8
xorl %eax, %eax
callq 0x362c
movzbl (%r15), %ecx
jmp 0x52dd
movl 0x18(%rsp), %eax
orl $0x1, %eax
jmp 0x52cc
movl 0x18(%rsp), %eax
orl $0x2, %eax
movl %eax, 0x18(%rsp)
movw %ax, 0x1536(%rsp)
movl $0x32, %ecx
movq 0x10(%rsp), %rax
addl $-0x2e, %eax
addl %ecx, %eax
movslq %eax, %rcx
leaq (%rcx,%rbp), %r15
movb (%rbp,%rcx), %dl
leal -0x31(%rdx), %ecx
cmpb $0x9, %cl
jb 0x525b
cmpl %r13d, %eax
jge 0x5308
cmpb $0x65, %dl
je 0x5316
leaq 0x47bb(%rip), %rdi      # 0x9aca
xorl %eax, %eax
callq 0x362c
leaq 0x47ce(%rip), %rdx      # 0x9aeb
movl $0x6, %ecx
movq %rbp, %rdi
movq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x21f0
movl $0x1, %ebx
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x53e9
movl 0x7c(%rsp), %eax
orq 0x6c(%rsp), %rax
orq 0x74(%rsp), %rax
je 0x4e90
movdqu 0x6c(%rsp), %xmm0
movd 0x7c(%rsp), %xmm1
movd 0x88d3(%rip), %xmm2     # 0xdc40
pcmpeqb 0x88bb(%rip), %xmm0     # 0xdc30
pcmpeqb %xmm1, %xmm2
pand %xmm2, %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x54c2
leaq 0x6c(%rsp), %r15
cmpq $0x0, 0x8(%rsp)
je 0x54ce
cmpw $0x4, 0x6a(%rsp)
jne 0x553f
movzbl 0x5a(%rsp), %eax
cmpl $0x66, %eax
jg 0x5579
cmpl $0x61, %eax
je 0x55c5
cmpl $0x66, %eax
jne 0x56e6
cmpb $0x6e, 0x5b(%rsp)
jne 0x56e6
leaq 0x3f3d(%rip), %rcx      # 0x9318
movq $0x0, 0x10(%rsp)
jmp 0x5662
leaq 0x4702(%rip), %rdx      # 0x9af2
movl $0x6, %ecx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x21f0
testq %rax, %rax
jne 0x4e90
leaq 0x46e9(%rip), %rdx      # 0x9af9
movl $0x6, %ecx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x21f0
testq %rax, %rax
je 0x4e90
leaq 0x46d0(%rip), %rdx      # 0x9b00
movl $0x9, %ecx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x21f0
movl $0x2, %ebx
testq %rax, %rax
jne 0x5345
leaq 0x46b5(%rip), %rdx      # 0x9b0a
movl $0xe, %ecx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x21f0
movl $0x3, %ebx
testq %rax, %rax
jne 0x5345
leaq 0x469f(%rip), %rdx      # 0x9b19
movl $0xe, %ecx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x21f0
movl $0x4, %ebx
testq %rax, %rax
jne 0x5345
leaq 0x4689(%rip), %rdx      # 0x9b28
movl $0x13, %ecx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x21f0
movl $0x5, %ebx
testq %rax, %rax
jne 0x5345
jmp 0x4e90
leaq 0x3eab(%rip), %rdi      # 0x9374
jmp 0x486a
callq 0x5ea0
testl %eax, %eax
je 0x55b9
addl $-0x2, %ebx
leaq 0x3d3b(%rip), %rax      # 0x9220
movslq (%rax,%rbx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5a(%rsp), %r13
movzwl 0x10(%r13), %esi
leaq 0x3f88(%rip), %rdi      # 0x9487
xorl %eax, %eax
callq 0x362c
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
movl $0x1, %ecx
callq 0x600e
leaq 0x3f73(%rip), %rdi      # 0x9493
xorl %eax, %eax
callq 0x362c
movzwl 0x10(%r13), %ecx
movq %r12, %rdi
movl %r14d, %esi
movq %r13, %rdx
callq 0x6a5a
jmp 0x4871
leaq 0x3e73(%rip), %rdi      # 0x93b9
xorl %eax, %eax
callq 0x362c
movq %rbp, %rdi
movl %r13d, %esi
callq 0x5e4f
leaq 0x3db8(%rip), %rdi      # 0x9317
xorl %eax, %eax
callq 0x362c
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x5eec
jmp 0x4871
cmpl $0x67, %eax
je 0x561a
cmpl $0x70, %eax
jne 0x56e6
cmpb $0x6e, 0x5b(%rsp)
jne 0x56e6
leaq 0x3e44(%rip), %rdi      # 0x93e1
xorl %eax, %eax
callq 0x362c
leaq 0x6c(%rsp), %rdi
movq %r12, %rsi
movl %r14d, %edx
movl $0x2, %ecx
jmp 0x5933
leaq 0x3dd1(%rip), %rdi      # 0x9391
jmp 0x486a
cmpb $0x70, 0x5b(%rsp)
jne 0x56e6
movzwl 0x5c(%rsp), %ebx
leaq 0x3e7b(%rip), %rdi      # 0x9457
xorl %eax, %eax
callq 0x362c
movq 0x861e(%rip), %r13      # 0xdc08
testq %r13, %r13
je 0x5915
movzwl (%r12), %eax
cmpw %bx, (%r13)
jne 0x5609
cmpl %eax, 0x4(%r13)
je 0x5cc5
movq 0xce8(%r13), %r13
testq %r13, %r13
jne 0x55f8
jmp 0x5915
cmpb $0x70, 0x5b(%rsp)
jne 0x56e6
movq 0x85dc(%rip), %r13      # 0xdc08
leaq 0x3dcd(%rip), %rcx      # 0x9400
movb $0x1, %al
movq %rax, 0x10(%rsp)
testq %r13, %r13
je 0x5662
movzwl 0x5c(%rsp), %eax
movzwl (%r12), %edx
cmpw %ax, (%r13)
jne 0x5656
cmpl %edx, 0x4(%r13)
je 0x5665
movq 0xce8(%r13), %r13
testq %r13, %r13
jne 0x5649
xorl %r13d, %r13d
movzwl 0x2ce(%rsp), %r15d
movzwl 0x530(%rsp), %ebx
leaq 0x3d6b(%rip), %rdi      # 0x93e8
imull $0x4ec5, %r15d, %ebp    # imm = 0x4EC5
shrl $0x13, %ebp
imull $0xd795, %ebx, %edx     # imm = 0xD795
shrl $0x15, %edx
movl %edx, 0x8(%rsp)
movl %ebp, %esi
xorl %eax, %eax
callq 0x362c
leal (%rbp,%rbp,4), %eax
leal (%rax,%rax,4), %eax
addl %ebp, %eax
subl %eax, %r15d
imull $0x26, 0x8(%rsp), %eax
subl %eax, %ebx
orw %r15w, %bx
je 0x58ff
leaq 0x3d4e(%rip), %rdi      # 0x940f
xorl %eax, %eax
callq 0x362c
leaq 0x6c(%rsp), %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x5eec
testq %r13, %r13
jne 0x5bb4
jmp 0x4871
leaq 0x3d87(%rip), %rdi      # 0x9474
jmp 0x4e97
leaq 0x3dd2(%rip), %rdi      # 0x94cb
xorl %eax, %eax
callq 0x362c
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
movl $0x1, %ecx
callq 0x600e
movl 0x90(%rsp), %eax
orq 0x80(%rsp), %rax
orq 0x88(%rsp), %rax
je 0x597a
leaq 0x80(%rsp), %rbp
movq %rbp, %rdi
callq 0x35ea
movq %rax, %r13
leaq 0x30(%rsp), %rbx
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x72e7
testq %r13, %r13
je 0x593d
cmpl $0x0, 0x14(%r13)
jle 0x593d
cmpw $0xa, (%r12)
leaq 0x3dbd(%rip), %rax      # 0x9533
leaq 0x3b9b(%rip), %rsi      # 0x9318
cmoveq %rax, %rsi
leaq 0x3d93(%rip), %rdi      # 0x951b
xorl %eax, %eax
callq 0x362c
leaq 0x5a(%rsp), %rdx
movzwl 0x10(%rdx), %ecx
movzwl 0x14dc(%rdx), %r9d
movzwl (%r12), %eax
movq %r12, %rdi
movl %r14d, %esi
movq %rbp, %r8
pushq $0x8
pushq %rbx
pushq %r13
pushq %rax
jmp 0x596c
leaq 0x3d97(%rip), %rdi      # 0x9557
xorl %eax, %eax
callq 0x362c
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
movl $0x1, %ecx
callq 0x600e
movl 0x90(%rsp), %eax
orq 0x80(%rsp), %rax
orq 0x88(%rsp), %rax
je 0x599d
leaq 0xac(%rsp), %rdi
movzwl 0x80(%rdi), %esi
movq %r12, %rdx
callq 0x735b
testl %eax, %eax
je 0x59c0
cmpw $0x0, 0xaa(%rsp)
je 0x5840
movzwl (%r12), %eax
orl $0x8, %eax
cmpl $0xa, %eax
jne 0x5840
movzwl 0x2(%r12), %eax
rolw $0x8, %ax
movw %ax, 0xa8(%rsp)
movzwl 0xa8(%rsp), %eax
testw %ax, %ax
je 0x5c95
leaq 0x80(%rsp), %r13
movzwl %ax, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x73bc
leaq 0x3dce(%rip), %rdi      # 0x963c
xorl %eax, %eax
callq 0x362c
movzwl -0x16(%r13), %ecx
leaq 0x5a(%rsp), %rdx
movq %r12, %rdi
movl %r14d, %esi
callq 0x7592
jmp 0x4871
leaq 0x3c0c(%rip), %rdi      # 0x94a2
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x362c
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
movl $0x1, %ecx
callq 0x600e
leaq 0x94(%rsp), %r13
movzwl 0x14a2(%r13), %ebp
leaq 0x3be5(%rip), %rdi      # 0x94ae
movl %ebp, %esi
xorl %eax, %eax
callq 0x362c
movzwl -0x2a(%r13), %ecx
subq $0x20, %rsp
movl %ebx, 0x18(%rsp)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x8(%rsp)
movl %ebx, (%rsp)
leaq 0x7a(%rsp), %rdx
movq %r12, %rdi
movl %r14d, %esi
movq %r13, %r8
movl %ebp, %r9d
jmp 0x596c
testq %r13, %r13
setne %al
movq 0x10(%rsp), %rcx
xorb $0x1, %cl
orb %al, %cl
jne 0x59e3
leaq 0x3b15(%rip), %rdi      # 0x9431
xorl %eax, %eax
callq 0x362c
leaq 0x6c(%rsp), %rdi
movq %r12, %rsi
movl %r14d, %edx
movl $0x1, %ecx
callq 0x600e
jmp 0x4871
leaq 0x3bf5(%rip), %rdi      # 0x9539
xorl %eax, %eax
callq 0x362c
leaq 0x5a(%rsp), %rdx
movzwl 0x10(%rdx), %ecx
movzwl 0x14dc(%rdx), %r9d
movq %r12, %rdi
movl %r14d, %esi
movq %rbp, %r8
pushq $0x8
pushq %rbx
pushq $0x0
pushq $0x0
callq 0x6b69
addq $0x20, %rsp
jmp 0x4871
leaq 0x3b56(%rip), %rdi      # 0x94d7
xorl %eax, %eax
callq 0x362c
leaq 0x5a(%rsp), %rdx
movzwl 0x10(%rdx), %ecx
leaq 0x3b67(%rip), %r8       # 0x94ff
jmp 0x5cb5
leaq 0x3bc3(%rip), %rdi      # 0x9567
xorl %eax, %eax
callq 0x362c
leaq 0x5a(%rsp), %rdx
movzwl 0x10(%rdx), %ecx
leaq 0x3bce(%rip), %r8       # 0x9589
jmp 0x5cb5
leaq 0x3be2(%rip), %rdi      # 0x95a9
xorl %eax, %eax
callq 0x362c
leaq 0x5a(%rsp), %rdx
movzwl 0x10(%rdx), %ecx
leaq 0x3bef(%rip), %r8       # 0x95cd
jmp 0x5cb5
leaq 0x6c(%rsp), %rdi
movq %r12, %rsi
movl %r14d, %edx
movl $0x2, %ecx
callq 0x600e
cmpw $0x1a, 0x2ce(%rsp)
jb 0x5ac5
leaq 0x12e(%rsp), %rbp
xorl %ebx, %ebx
leaq 0x30(%rsp), %r15
movdqu (%rbp), %xmm0
movd 0x10(%rbp), %xmm1
movd 0x8218(%rip), %xmm2     # 0xdc40
pcmpeqb 0x8200(%rip), %xmm0     # 0xdc30
pcmpeqb %xmm1, %xmm2
pand %xmm2, %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x5aa4
movq $0x0, 0x38(%rsp)
movw $0x2, 0x30(%rsp)
movl 0x14(%rbp), %eax
movl %eax, 0x34(%rsp)
movzwl 0x18(%rbp), %eax
movw %ax, 0x32(%rsp)
movq %rbp, %rdi
movq %r15, %rsi
movl $0x10, %edx
xorl %ecx, %ecx
callq 0x600e
testq %r13, %r13
je 0x5aa4
cmpl $0x2, 0x4(%r13)
jne 0x5aa4
subq $0x8, %rsp
movq %rbp, %rdi
movq %r15, %rsi
movl $0x10, %edx
movq %r13, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x0
callq 0x65de
addq $0x10, %rsp
incq %rbx
movzwl 0x2ce(%rsp), %eax
imull $0x4ec5, %eax, %eax     # imm = 0x4EC5
shrl $0x13, %eax
addq $0x1a, %rbp
cmpq %rax, %rbx
jb 0x5a16
cmpw $0x26, 0x530(%rsp)
jb 0x5ba1
leaq 0x2d0(%rsp), %rbp
leaq 0x38(%rsp), %rbx
xorl %r15d, %r15d
movdqu (%rbp), %xmm0
movd 0x10(%rbp), %xmm1
movd 0x814a(%rip), %xmm2     # 0xdc40
pcmpeqb 0x8132(%rip), %xmm0     # 0xdc30
pcmpeqb %xmm1, %xmm2
pand %xmm2, %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x5b80
pxor %xmm0, %xmm0
movdqu %xmm0, -0x4(%rbx)
movq $0x0, 0xc(%rbx)
movw $0xa, 0x30(%rsp)
movdqu 0x14(%rbp), %xmm0
movdqu %xmm0, (%rbx)
movzwl 0x24(%rbp), %eax
movw %ax, 0x32(%rsp)
movq %rbp, %rdi
leaq 0x30(%rsp), %rsi
movl $0x1c, %edx
xorl %ecx, %ecx
callq 0x600e
testq %r13, %r13
je 0x5b80
cmpl $0xa, 0x4(%r13)
jne 0x5b80
subq $0x8, %rsp
movq %rbp, %rdi
leaq 0x38(%rsp), %rsi
movl $0x1c, %edx
movq %r13, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x0
callq 0x65de
addq $0x10, %rsp
incq %r15
movzwl 0x530(%rsp), %eax
imull $0xd795, %eax, %eax     # imm = 0xD795
shrl $0x15, %eax
addq $0x26, %rbp
cmpq %rax, %r15
jb 0x5ae4
testq %r13, %r13
je 0x4871
movq %r13, %rdi
xorl %esi, %esi
callq 0x6809
leaq 0xac(%rsp), %rbp
movzwl 0x80(%rbp), %eax
subq $0x8, %rsp
leaq 0x74(%rsp), %rdi
movq %r12, %rsi
movl %r14d, %edx
movq %r13, %rcx
movl $0x1, %r8d
movq %rbp, %r9
pushq %rax
callq 0x65de
addq $0x10, %rsp
movzwl 0xc86(%rbp), %ecx
movzwl 0x1488(%rbp), %eax
movl %ecx, %edx
orw %ax, %dx
je 0x4871
movzwl %cx, %ecx
imull $0xaaab, %ecx, %esi     # imm = 0xAAAB
shrl $0x12, %esi
movzwl %ax, %eax
imull $0xe38f, %eax, %edx     # imm = 0xE38F
shrl $0x14, %edx
leaq 0x3822(%rip), %rdi      # 0x9442
xorl %eax, %eax
callq 0x362c
cmpq $0x0, 0x28(%rsp)
je 0x4871
movzwl 0xd32(%rsp), %r8d
testq %r8, %r8
je 0x5c5e
leaq 0x10(%r13), %rdx
leaq 0x532(%rsp), %rcx
movq 0x1570(%rsp), %rdi
movl $0x1, %esi
callq *0x28(%rsp)
movzwl 0x1534(%rsp), %r8d
testq %r8, %r8
je 0x4871
addq $0x10, %r13
leaq 0xd34(%rsp), %rcx
movq 0x1570(%rsp), %rdi
movl $0x2, %esi
movq %r13, %rdx
callq *0x28(%rsp)
jmp 0x4871
leaq 0x3950(%rip), %rdi      # 0x95ec
xorl %esi, %esi
xorl %eax, %eax
callq 0x362c
leaq 0x5a(%rsp), %rdx
movzwl 0x10(%rdx), %ecx
leaq 0x395e(%rip), %r8       # 0x9613
movq %r12, %rdi
movl %r14d, %esi
callq 0x717b
jmp 0x4871
leaq 0x6c(%rsp), %rdi
movq %r12, %rsi
movl %r14d, %edx
movl $0x2, %ecx
callq 0x600e
movslq 0xce0(%r13), %rax
testq %rax, %rax
jle 0x5d61
imulq $0xe8, %rax, %rcx
xorl %eax, %eax
movdqu 0x6c(%rsp), %xmm0
movd 0x7c(%rsp), %xmm1
movdqu 0x30(%r13,%rax), %xmm2
pcmpeqb %xmm0, %xmm2
movd 0x40(%r13,%rax), %xmm3
pcmpeqb %xmm1, %xmm3
pand %xmm2, %xmm3
pmovmskb %xmm3, %edx
cmpl $0xffff, %edx           # imm = 0xFFFF
je 0x5d2e
addq $0xe8, %rax
cmpq %rax, %rcx
jne 0x5cfb
jmp 0x5d61
movq $0x0, 0xd0(%r13,%rax)
movq 0x7ecf(%rip), %rcx      # 0xdc10
movq %rcx, 0xd8(%r13,%rax)
movl $0x1, 0x114(%r13,%rax)
movl $0x0, 0xe0(%r13,%rax)
movq %r13, %rdi
xorl %esi, %esi
callq 0x6809
jmp 0x4871