// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_zset.c
// Function: zunionInterGenericCommand
void zunionInterGenericCommand(client *c, robj *dstkey, int op) {
    int i, j;
    long setnum;
    int aggregate = REDIS_AGGR_SUM;
    zsetopsrc *src;
    zsetopval zval;
    robj *tmp;
    unsigned int maxelelen = 0;
    robj *dstobj;
    zset *dstzset;
    zskiplistNode *znode;
    int touched = 0;

    /* expect setnum input keys to be given */
    if ((getLongFromObjectOrReply(c, c->argv[2], &setnum, NULL) != C_OK))
        return;

    if (setnum < 1) {
        addReplyError(c,
            "at least 1 input key is needed for ZUNIONSTORE/ZINTERSTORE");
        return;
    }

    /* test if the expected number of keys would overflow */
    if (setnum > c->argc-3) {
        addReply(c,shared.syntaxerr);
        return;
    }

    /* read keys to be used for input */
    src = zcalloc(sizeof(zsetopsrc) * setnum);
    for (i = 0, j = 3; i < setnum; i++, j++) {
        robj *obj = lookupKeyWrite(c->db,c->argv[j]);
        if (obj != NULL) {
            if (obj->type != OBJ_ZSET && obj->type != OBJ_SET) {
                zfree(src);
                addReply(c,shared.wrongtypeerr);
                return;
            }

            src[i].subject = obj;
            src[i].type = obj->type;
            src[i].encoding = obj->encoding;
        } else {
            src[i].subject = NULL;
        }

        /* Default all weights to 1. */
        src[i].weight = 1.0;
    }

    /* parse optional extra arguments */
    if (j < c->argc) {
        int remaining = c->argc - j;

        while (remaining) {
            if (remaining >= (setnum + 1) && !strcasecmp(c->argv[j]->ptr,"weights")) {
                j++; remaining--;
                for (i = 0; i < setnum; i++, j++, remaining--) {
                    if (getDoubleFromObjectOrReply(c,c->argv[j],&src[i].weight,
                            "weight value is not a float") != C_OK)
                    {
                        zfree(src);
                        return;
                    }
                }
            } else if (remaining >= 2 && !strcasecmp(c->argv[j]->ptr,"aggregate")) {
                j++; remaining--;
                if (!strcasecmp(c->argv[j]->ptr,"sum")) {
                    aggregate = REDIS_AGGR_SUM;
                } else if (!strcasecmp(c->argv[j]->ptr,"min")) {
                    aggregate = REDIS_AGGR_MIN;
                } else if (!strcasecmp(c->argv[j]->ptr,"max")) {
                    aggregate = REDIS_AGGR_MAX;
                } else {
                    zfree(src);
                    addReply(c,shared.syntaxerr);
                    return;
                }
                j++; remaining--;
            } else {
                zfree(src);
                addReply(c,shared.syntaxerr);
                return;
            }
        }
    }

    /* sort sets from the smallest to largest, this will improve our
     * algorithm's performance */
    qsort(src,setnum,sizeof(zsetopsrc),zuiCompareByCardinality);

    dstobj = createZsetObject();
    dstzset = dstobj->ptr;
    memset(&zval, 0, sizeof(zval));

    if (op == SET_OP_INTER) {
        /* Skip everything if the smallest input is empty. */
        if (zuiLength(&src[0]) > 0) {
            /* Precondition: as src[0] is non-empty and the inputs are ordered
             * by size, all src[i > 0] are non-empty too. */
            zuiInitIterator(&src[0]);
            while (zuiNext(&src[0],&zval)) {
                double score, value;

                score = src[0].weight * zval.score;
                if (isnan(score)) score = 0;

                for (j = 1; j < setnum; j++) {
                    /* It is not safe to access the zset we are
                     * iterating, so explicitly check for equal object. */
                    if (src[j].subject == src[0].subject) {
                        value = zval.score*src[j].weight;
                        zunionInterAggregate(&score,value,aggregate);
                    } else if (zuiFind(&src[j],&zval,&value)) {
                        value *= src[j].weight;
                        zunionInterAggregate(&score,value,aggregate);
                    } else {
                        break;
                    }
                }

                /* Only continue when present in every input. */
                if (j == setnum) {
                    tmp = zuiObjectFromValue(&zval);
                    znode = zslInsert(dstzset->zsl,score,tmp);
                    incrRefCount(tmp); /* added to skiplist */
                    dictAdd(dstzset->dict,tmp,&znode->score);
                    incrRefCount(tmp); /* added to dictionary */

                    if (sdsEncodedObject(tmp)) {
                        if (sdslen(tmp->ptr) > maxelelen)
                            maxelelen = sdslen(tmp->ptr);
                    }
                }
            }
            zuiClearIterator(&src[0]);
        }
    } else if (op == SET_OP_UNION) {
        dict *accumulator = dictCreate(&setDictType,NULL);
        dictIterator *di;
        dictEntry *de;
        double score;

        if (setnum) {
            /* Our union is at least as large as the largest set.
             * Resize the dictionary ASAP to avoid useless rehashing. */
            dictExpand(accumulator,zuiLength(&src[setnum-1]));
        }

        /* Step 1: Create a dictionary of elements -> aggregated-scores
         * by iterating one sorted set after the other. */
        for (i = 0; i < setnum; i++) {
            if (zuiLength(&src[i]) == 0) continue;

            zuiInitIterator(&src[i]);
            while (zuiNext(&src[i],&zval)) {
                /* Initialize value */
                score = src[i].weight * zval.score;
                if (isnan(score)) score = 0;

                /* Search for this element in the accumulating dictionary. */
                de = dictFind(accumulator,zuiObjectFromValue(&zval));
                /* If we don't have it, we need to create a new entry. */
                if (de == NULL) {
                    tmp = zuiObjectFromValue(&zval);
                    /* Remember the longest single element encountered,
                     * to understand if it's possible to convert to ziplist
                     * at the end. */
                    if (sdsEncodedObject(tmp)) {
                        if (sdslen(tmp->ptr) > maxelelen)
                            maxelelen = sdslen(tmp->ptr);
                    }
                    /* Add the element with its initial score. */
                    de = dictAddRaw(accumulator,tmp);
                    incrRefCount(tmp);
                    dictSetDoubleVal(de,score);
                } else {
                    /* Update the score with the score of the new instance
                     * of the element found in the current sorted set.
                     *
                     * Here we access directly the dictEntry double
                     * value inside the union as it is a big speedup
                     * compared to using the getDouble/setDouble API. */
                    zunionInterAggregate(&de->v.d,score,aggregate);
                }
            }
            zuiClearIterator(&src[i]);
        }

        /* Step 2: convert the dictionary into the final sorted set. */
        di = dictGetIterator(accumulator);

        /* We now are aware of the final size of the resulting sorted set,
         * let's resize the dictionary embedded inside the sorted set to the
         * right size, in order to save rehashing time. */
        dictExpand(dstzset->dict,dictSize(accumulator));

        while((de = dictNext(di)) != NULL) {
            robj *ele = dictGetKey(de);
            score = dictGetDoubleVal(de);
            znode = zslInsert(dstzset->zsl,score,ele);
            incrRefCount(ele); /* added to skiplist */
            dictAdd(dstzset->dict,ele,&znode->score);
            incrRefCount(ele); /* added to dictionary */
        }
        dictReleaseIterator(di);

        /* We can free the accumulator dictionary now. */
        dictRelease(accumulator);
    } else {
        serverPanic("Unknown operator");
    }

    if (dbDelete(c->db,dstkey))
        touched = 1;
    if (dstzset->zsl->length) {
        zsetConvertToZiplistIfNeeded(dstobj,maxelelen);
        dbAdd(c->db,dstkey,dstobj);
        addReplyLongLong(c,zsetLength(dstobj));
        signalModifiedKey(c->db,dstkey);
        notifyKeyspaceEvent(NOTIFY_ZSET,
            (op == SET_OP_UNION) ? "zunionstore" : "zinterstore",
            dstkey,c->db->id);
        server.dirty++;
    } else {
        decrRefCount(dstobj);
        addReply(c,shared.czero);
        if (touched) {
            signalModifiedKey(c->db,dstkey);
            notifyKeyspaceEvent(NOTIFY_GENERIC,"del",dstkey,c->db->id);
            server.dirty++;
        }
    }
    zfree(src);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r13
movq 0x40(%rdi), %rax
movq 0x10(%rax), %rsi
leaq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0x44ba1
testl %eax, %eax
jne 0x5759c
movq 0x18(%rsp), %rax
testq %rax, %rax
jle 0x56cf2
movslq 0x38(%r13), %rcx
addq $-0x3, %rcx
cmpq %rcx, %rax
jle 0x56d06
leaq 0xb05d2(%rip), %rax     # 0x1072b0
movq 0x80(%rax), %rsi
movq %r13, %rdi
callq 0x3fc19
jmp 0x5759c
leaq 0x6fc76(%rip), %rsi     # 0xc696f
movq %r13, %rdi
callq 0x3ffcb
jmp 0x5759c
movq %rbx, 0x50(%rsp)
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
callq 0x3b2ef
cmpq $0x0, 0x18(%rsp)
movq %rax, 0x10(%rsp)
jle 0x56d9a
movl $0x3, %r12d
movabsq $0x3ff0000000000000, %rbx # imm = 0x3FF0000000000000
movq %rax, %r14
movq 0x10(%r13), %rdi
movq 0x40(%r13), %rax
movq (%rax,%r12,8), %rsi
callq 0x44f66
testq %rax, %rax
je 0x56d76
movl (%rax), %ecx
andl $0xe, %ecx
cmpl $0x2, %ecx
jne 0x571c4
movq %rax, (%r14)
movl (%rax), %ecx
andl $0xf, %ecx
movl %ecx, 0x8(%r14)
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
movl %eax, 0xc(%r14)
jmp 0x56d7d
movq $0x0, (%r14)
movq %rbx, 0x10(%r14)
leaq 0x1(%r12), %r15
addq $0x30, %r14
addq $-0x2, %r12
cmpq %r12, 0x18(%rsp)
movq %r15, %r12
jg 0x56d38
jmp 0x56da0
movl $0x3, %r15d
movl 0x38(%r13), %r12d
subl %r15d, %r12d
setle %al
sete %cl
orb %al, %cl
movl $0x1, %ebx
movl %ebp, 0x3c(%rsp)
je 0x57080
movq 0x18(%rsp), %rsi
leaq -0x15f(%rip), %rcx      # 0x56c6b
movl $0x30, %edx
movq 0x10(%rsp), %rdi
callq 0x268a0
callq 0x43f3a
movq %rax, %r15
movq 0x8(%rax), %rax
movq %rax, 0x58(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x70(%rsp)
movapd %xmm0, 0x80(%rsp)
movapd %xmm0, 0x90(%rsp)
movapd %xmm0, 0xa0(%rsp)
movapd %xmm0, 0xb0(%rsp)
testl %ebp, %ebp
je 0x571de
cmpl $0x2, %ebp
jne 0x575ae
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x566b5
testl %eax, %eax
jle 0x5748d
movq %r15, 0x40(%rsp)
movq %r13, 0x48(%rsp)
movq %r14, %rdi
callq 0x56507
leaq 0x70(%rsp), %rsi
movq %r14, %rdi
callq 0x56765
testl %eax, %eax
je 0x5749d
movq %r14, %rax
addq $0x30, %rax
movq %rax, 0x60(%rsp)
movq $0x0, 0x8(%rsp)
leaq 0x70(%rsp), %r13
leaq 0x68(%rsp), %r12
movq %r14, %rdi
movq 0x58(%rsp), %r15
movsd 0x10(%rdi), %xmm0
mulsd 0xb8(%rsp), %xmm0
movapd %xmm0, %xmm1
cmpordsd %xmm0, %xmm1
andpd %xmm0, %xmm1
movl $0x1, %ebp
cmpq $0x2, 0x18(%rsp)
jl 0x56f6e
movq 0x60(%rsp), %r14
movq (%r14), %rax
cmpq (%rdi), %rax
je 0x56f18
movapd %xmm1, 0x20(%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x56b0c
testl %eax, %eax
je 0x56f68
movsd 0x10(%r14), %xmm0
mulsd 0x68(%rsp), %xmm0
movsd %xmm0, 0x68(%rsp)
cmpl $0x2, %ebx
movapd 0x20(%rsp), %xmm1
je 0x56f3d
cmpl $0x1, %ebx
movq 0x10(%rsp), %rdi
jne 0x56f37
addsd %xmm0, %xmm1
ucomisd %xmm1, %xmm1
jnp 0x56f54
xorpd %xmm1, %xmm1
jmp 0x56f54
movsd 0xb8(%rsp), %xmm0
mulsd 0x10(%r14), %xmm0
movsd %xmm0, 0x68(%rsp)
cmpl $0x2, %ebx
je 0x56f4c
cmpl $0x1, %ebx
je 0x56f08
maxsd %xmm1, %xmm0
jmp 0x56f50
minsd %xmm1, %xmm0
movapd %xmm0, %xmm1
movq 0x10(%rsp), %rdi
jmp 0x56f54
minsd %xmm1, %xmm0
movapd %xmm0, %xmm1
incq %rbp
addq $0x30, %r14
cmpq %rbp, 0x18(%rsp)
jg 0x56ebd
jmp 0x56f6e
movapd 0x20(%rsp), %xmm1
cmpq %rbp, 0x18(%rsp)
jne 0x57055
movq %r13, %rdi
movapd %xmm1, 0x20(%rsp)
callq 0x56a12
movq %rax, %r14
movq 0x8(%r15), %rdi
movapd 0x20(%rsp), %xmm0
movq %rax, %rsi
callq 0x5361a
movq %rax, %rbp
movq %r14, %rdi
callq 0x43c0c
movq (%r15), %rdi
addq $0x8, %rbp
movq %r14, %rsi
movq %rbp, %rdx
callq 0x31a95
movq %r14, %rdi
callq 0x43c0c
movl (%r14), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x57055
movq 0x8(%r14), %rax
movzbl -0x1(%rax), %ecx
movl %ecx, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x5700f
leaq 0x6f618(%rip), %rdi     # 0xc6600
movslq (%rdi,%rdx,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
movl %ecx, %esi
shrl $0x3, %esi
jmp 0x57011
movq -0x11(%rax), %rsi
jmp 0x57011
movzwl -0x5(%rax), %esi
jmp 0x57011
movl -0x9(%rax), %esi
jmp 0x57011
movzbl -0x3(%rax), %esi
jmp 0x57011
xorl %esi, %esi
movl 0x8(%rsp), %edi
cmpq %rdi, %rsi
jbe 0x57055
cmpl $0x4, %edx
ja 0x57075
movl %edx, %edx
leaq 0x6f5ec(%rip), %rsi     # 0xc6614
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
shrl $0x3, %ecx
movq %rcx, 0x8(%rsp)
jmp 0x57055
movq -0x11(%rax), %rax
jmp 0x57050
movzwl -0x5(%rax), %eax
jmp 0x57050
movl -0x9(%rax), %eax
jmp 0x57050
movzbl -0x3(%rax), %eax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x56765
movq %r14, %rdi
testl %eax, %eax
jne 0x56e8c
jmp 0x574a9
movq $0x0, 0x8(%rsp)
jmp 0x57055
movq 0x10(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x20(%rsp)
movslq %r12d, %rax
movslq %r15d, %r14
cmpq %rax, 0x18(%rsp)
jge 0x570bb
movq 0x40(%r13), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rdi
leaq 0x6f8fc(%rip), %rsi     # 0xc69aa
callq 0x26300
testl %eax, %eax
je 0x5713c
cmpl $0x2, %r12d
jl 0x5747e
movq 0x40(%r13), %rbx
movq (%rbx,%r14,8), %rax
movq 0x8(%rax), %rdi
leaq 0x6f8f6(%rip), %rsi     # 0xc69ce
callq 0x26300
testl %eax, %eax
jne 0x5747e
movq 0x8(%rbx,%r14,8), %rax
movq 0x8(%rax), %r14
movq %r14, %rdi
leaq 0x7b137(%rip), %rsi     # 0xd222f
callq 0x26300
testl %eax, %eax
je 0x57135
movq %r14, %rdi
leaq 0x6976c(%rip), %rsi     # 0xc0877
callq 0x26300
testl %eax, %eax
je 0x571a9
movq %r14, %rdi
leaq 0x80c7c(%rip), %rsi     # 0xd7d9e
callq 0x26300
movl $0x3, %ebx
testl %eax, %eax
je 0x571ae
jmp 0x5747e
movl $0x1, %ebx
jmp 0x571ae
incl %r15d
decl %r12d
cmpq $0x0, 0x18(%rsp)
jle 0x571b6
movl %r12d, 0x8(%rsp)
movq %r13, %r12
movslq %r15d, %r13
shlq $0x3, %r13
movq 0x20(%rsp), %r14
xorl %ebp, %ebp
movq %r12, %rdi
movq 0x40(%r12), %rax
addq %r13, %rax
movq (%rax,%rbp,8), %rsi
movq %r14, %rdx
leaq 0x6f839(%rip), %rcx     # 0xc69b2
callq 0x448a1
testl %eax, %eax
jne 0x57592
incq %rbp
addq $0x30, %r14
cmpq %rbp, 0x18(%rsp)
jg 0x57160
addl %ebp, %r15d
movl 0x8(%rsp), %eax
subl %ebp, %eax
movq %r12, %r13
movl %eax, %r12d
movl 0x3c(%rsp), %ebp
jmp 0x571b6
movl $0x2, %ebx
addl $0x2, %r15d
addl $-0x2, %r12d
testl %r12d, %r12d
jne 0x5708e
jmp 0x56dbe
movq 0x10(%rsp), %rdi
callq 0x3b3df
leaq 0xb00db(%rip), %rax     # 0x1072b0
movq 0x70(%rax), %rsi
jmp 0x56ce5
movq %r15, 0x40(%rsp)
movq %r13, 0x48(%rsp)
leaq 0xaeb21(%rip), %rdi     # 0x105d10
movq $0x0, 0x8(%rsp)
xorl %esi, %esi
callq 0x31774
movq %rax, %r13
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x57231
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
callq 0x566b5
movslq %eax, %rsi
movq %r13, %rdi
callq 0x317e2
cmpq $0x0, 0x18(%rsp)
movq 0x10(%rsp), %rax
jle 0x57404
xorl %ecx, %ecx
leaq 0x70(%rsp), %r12
movq $0x0, 0x8(%rsp)
movq %rcx, 0x60(%rsp)
leaq (%rcx,%rcx,2), %rbp
shlq $0x4, %rbp
addq %rax, %rbp
movq %rbp, %rdi
callq 0x566b5
testl %eax, %eax
je 0x573ec
movq %rbp, %rdi
callq 0x56507
movq %rbp, %rdi
movq %r12, %rsi
callq 0x56765
testl %eax, %eax
je 0x573e4
movsd 0x10(%rbp), %xmm0
mulsd 0xb8(%rsp), %xmm0
movapd %xmm0, %xmm1
cmpordsd %xmm0, %xmm1
andpd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
movq %r12, %rdi
callq 0x56a12
movq %r13, %rdi
movq %rax, %rsi
callq 0x31cca
testq %rax, %rax
je 0x572f4
movsd 0x8(%rax), %xmm0
cmpl $0x2, %ebx
je 0x57335
cmpl $0x1, %ebx
jne 0x57341
movapd 0x20(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rax)
ucomisd %xmm1, %xmm1
jnp 0x5727a
movq $0x0, 0x8(%rax)
jmp 0x5727a
movq %r12, %rdi
callq 0x56a12
movq %rax, %r14
movl (%rax), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x573b2
movq 0x8(%r14), %rax
movzbl -0x1(%rax), %ecx
movl %ecx, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x5736c
leaq 0x6f2b3(%rip), %rdi     # 0xc65d8
movslq (%rdi,%rdx,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
movl %ecx, %esi
shrl $0x3, %esi
jmp 0x5736e
movapd 0x20(%rsp), %xmm1
minsd %xmm0, %xmm1
jmp 0x5734b
movapd 0x20(%rsp), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rax)
jmp 0x5727a
movq -0x11(%rax), %rsi
jmp 0x5736e
movzwl -0x5(%rax), %esi
jmp 0x5736e
movl -0x9(%rax), %esi
jmp 0x5736e
movzbl -0x3(%rax), %esi
jmp 0x5736e
xorl %esi, %esi
movl 0x8(%rsp), %edi
cmpq %rdi, %rsi
jbe 0x573b2
cmpl $0x4, %edx
ja 0x573d9
movl %edx, %edx
leaq 0x6f267(%rip), %rsi     # 0xc65ec
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
shrl $0x3, %ecx
movq %rcx, 0x8(%rsp)
jmp 0x573b2
movq -0x11(%rax), %rax
jmp 0x573ad
movzwl -0x5(%rax), %eax
jmp 0x573ad
movl -0x9(%rax), %eax
jmp 0x573ad
movzbl -0x3(%rax), %eax
movq %rax, 0x8(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x31ad8
movq %rax, %r15
movq %r14, %rdi
callq 0x43c0c
movapd 0x20(%rsp), %xmm0
movsd %xmm0, 0x8(%r15)
jmp 0x5727a
movq $0x0, 0x8(%rsp)
jmp 0x573b2
movq %rbp, %rdi
callq 0x56631
movq 0x60(%rsp), %rcx
incq %rcx
cmpq %rcx, 0x18(%rsp)
movq 0x10(%rsp), %rax
jg 0x57252
movq %r13, %rdi
callq 0x320bb
movq %rax, %r14
movq 0x58(%rsp), %rbx
movq (%rbx), %rdi
movq 0x48(%r13), %rsi
addq 0x28(%r13), %rsi
callq 0x317e2
movq %r14, %rdi
callq 0x32116
testq %rax, %rax
je 0x5746c
movq (%rax), %r15
movsd 0x8(%rax), %xmm0
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x5361a
movq %rax, %r12
movq %r15, %rdi
callq 0x43c0c
movq (%rbx), %rdi
addq $0x8, %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x31a95
movq %r15, %rdi
callq 0x43c0c
jmp 0x57424
movq %r14, %rdi
callq 0x321d3
movq %r13, %rdi
callq 0x31ff3
jmp 0x574ae
movq 0x10(%rsp), %rdi
callq 0x3b3df
jmp 0x56cd7
movq $0x0, 0x8(%rsp)
movq 0x50(%rsp), %rbx
jmp 0x574bd
movq $0x0, 0x8(%rsp)
movq %r14, %rdi
callq 0x56631
movq 0x48(%rsp), %r13
movq 0x50(%rsp), %rbx
movq 0x40(%rsp), %r15
movq 0x10(%r13), %rdi
movq %rbx, %rsi
callq 0x452f3
movl %eax, %ebp
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x57539
movl 0x8(%rsp), %esi
movq %r15, %rdi
callq 0x554db
movq 0x10(%r13), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x45007
movq %r15, %rdi
callq 0x551a5
movl %eax, %esi
movq %r13, %rdi
callq 0x40606
movq 0x10(%r13), %rdi
movq %rbx, %rsi
callq 0x45220
cmpl $0x0, 0x3c(%rsp)
leaq 0x68162(%rip), %rax     # 0xbf682
leaq 0x68167(%rip), %rsi     # 0xbf68e
cmoveq %rax, %rsi
movq 0x10(%r13), %rax
movl 0x30(%rax), %ecx
movl $0x80, %edi
jmp 0x5757c
movq %r15, %rdi
callq 0x440f3
leaq 0xafd68(%rip), %rax     # 0x1072b0
movq 0x20(%rax), %rsi
movq %r13, %rdi
callq 0x3fc19
testl %ebp, %ebp
movq 0x10(%rsp), %rdi
je 0x57597
movq 0x10(%r13), %rdi
movq %rbx, %rsi
callq 0x45220
movq 0x10(%r13), %rax
movl 0x30(%rax), %ecx
leaq 0x69f3f(%rip), %rsi     # 0xc14b6
movl $0x4, %edi
movq %rbx, %rdx
callq 0x800c9
leaq 0xaf2cd(%rip), %rax     # 0x106858
incq 0x710(%rax)
movq 0x10(%rsp), %rdi
callq 0x3b3df
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6f423(%rip), %rdi     # 0xc69d8
leaq 0x6f09a(%rip), %rsi     # 0xc6656
movl $0x864, %edx            # imm = 0x864
callq 0x6558d
movl $0x1, %edi
callq 0x263d0