// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/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, %r14d
movq %rsi, %rbx
movq %rdi, %rbp
movq 0x40(%rdi), %rax
movq 0x10(%rax), %rsi
leaq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0x41718
testl %eax, %eax
jne 0x53d5f
movq 0x18(%rsp), %rax
testq %rax, %rax
jle 0x534c3
movslq 0x38(%rbp), %rcx
addq $-0x3, %rcx
cmpq %rcx, %rax
jle 0x534d7
leaq 0xaee61(%rip), %rax     # 0x102310
movq 0x80(%rax), %rsi
movq %rbp, %rdi
callq 0x3c854
jmp 0x53d5f
leaq 0x70525(%rip), %rsi     # 0xc39ef
movq %rbp, %rdi
callq 0x3cc06
jmp 0x53d5f
movl %r14d, 0x24(%rsp)
movq %rbx, 0x50(%rsp)
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
callq 0x38323
movq 0x18(%rsp), %r12
testq %r12, %r12
movq %rax, 0x10(%rsp)
jle 0x53574
movl $0x3, %r13d
movabsq $0x3ff0000000000000, %rbx # imm = 0x3FF0000000000000
movq %rax, %r14
movq 0x10(%rbp), %rdi
movq 0x40(%rbp), %rax
movq (%rax,%r13,8), %rsi
callq 0x41ad6
testq %rax, %rax
je 0x5354e
movl (%rax), %ecx
andl $0xe, %ecx
cmpl $0x2, %ecx
jne 0x5399a
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 0x53555
movq $0x0, (%r14)
movq %rbx, 0x10(%r14)
leaq 0x1(%r13), %r15
movq 0x18(%rsp), %r12
addq $0x30, %r14
addq $-0x2, %r13
cmpq %r13, %r12
movq %r15, %r13
jg 0x53510
jmp 0x5357a
movl $0x3, %r15d
movl 0x38(%rbp), %r13d
subl %r15d, %r13d
setle %al
sete %cl
orb %al, %cl
movl $0x1, %ebx
movq %rbp, 0x28(%rsp)
je 0x5385d
leaq -0x165(%rip), %rcx      # 0x5343b
movl $0x30, %edx
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x26890
callq 0x40ad6
movq %rax, %r13
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)
movl 0x24(%rsp), %r12d
testl %r12d, %r12d
je 0x539b4
cmpl $0x2, %r12d
jne 0x53d71
movq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x52e86
testl %eax, %eax
movq 0x50(%rsp), %r14
jle 0x53c54
movq %r13, 0x48(%rsp)
movq %r15, %rdi
callq 0x52cdc
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq 0x52f36
testl %eax, %eax
je 0x53c5f
movq %r15, %rax
addq $0x30, %rax
movq %rax, 0x60(%rsp)
movq $0x0, 0x8(%rsp)
leaq 0x70(%rsp), %r13
leaq 0x68(%rsp), %r12
movq %r15, %rdi
movq 0x58(%rsp), %r15
movsd 0x10(%rdi), %xmm0
mulsd 0xb8(%rsp), %xmm0
movapd %xmm0, %xmm1
cmpordsd %xmm0, %xmm1
andpd %xmm0, %xmm1
movq 0x18(%rsp), %rax
movl $0x1, %ebp
cmpq $0x2, %rax
jl 0x53759
movq 0x60(%rsp), %r14
movq (%r14), %rax
cmpq (%rdi), %rax
je 0x536fb
movapd %xmm1, 0x30(%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x532dc
testl %eax, %eax
je 0x5374e
movsd 0x10(%r14), %xmm0
mulsd 0x68(%rsp), %xmm0
movsd %xmm0, 0x68(%rsp)
cmpl $0x2, %ebx
movapd 0x30(%rsp), %xmm1
je 0x53720
cmpl $0x1, %ebx
movq 0x10(%rsp), %rdi
jne 0x5371a
addsd %xmm0, %xmm1
ucomisd %xmm1, %xmm1
jnp 0x53737
xorpd %xmm1, %xmm1
jmp 0x53737
movsd 0xb8(%rsp), %xmm0
mulsd 0x10(%r14), %xmm0
movsd %xmm0, 0x68(%rsp)
cmpl $0x2, %ebx
je 0x5372f
cmpl $0x1, %ebx
je 0x536eb
maxsd %xmm1, %xmm0
jmp 0x53733
minsd %xmm1, %xmm0
movapd %xmm0, %xmm1
movq 0x10(%rsp), %rdi
jmp 0x53737
minsd %xmm1, %xmm0
movapd %xmm0, %xmm1
incq %rbp
movq 0x18(%rsp), %rax
addq $0x30, %r14
cmpq %rbp, %rax
jg 0x536a0
jmp 0x53759
movq 0x18(%rsp), %rax
movapd 0x30(%rsp), %xmm1
cmpq %rbp, %rax
jne 0x537e2
movq %r13, %rdi
movapd %xmm1, 0x30(%rsp)
callq 0x531e3
movq %rax, %r14
movq 0x8(%r15), %rdi
movapd 0x30(%rsp), %xmm0
movq %rax, %rsi
callq 0x4feda
movq %rax, %rbp
movq %r14, %rdi
callq 0x407a8
movq (%r15), %rdi
addq $0x8, %rbp
movq %r14, %rsi
movq %rbp, %rdx
callq 0x2e9b8
movq %r14, %rdi
callq 0x407a8
movl (%r14), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x537e2
movq 0x8(%r14), %rax
movzbl -0x1(%rax), %ecx
movl %ecx, %edx
andl $0x7, %edx
cmpl $0x4, %edx
movq 0x28(%rsp), %rbp
ja 0x537e7
leaq 0x6feae(%rip), %rdi     # 0xc3680
movslq (%rdi,%rdx,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
movl %ecx, %esi
shrl $0x3, %esi
jmp 0x5381c
movq 0x28(%rsp), %rbp
movq 0x10(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x52f36
movq %r14, %rdi
testl %eax, %eax
jne 0x5366c
jmp 0x53c6b
movq -0x11(%rax), %rsi
jmp 0x5381c
movzwl -0x5(%rax), %esi
jmp 0x5381c
movl -0x9(%rax), %esi
jmp 0x5381c
movzbl -0x3(%rax), %esi
movl 0x8(%rsp), %edi
cmpq %rdi, %rsi
jbe 0x537e7
movl %edx, %edx
leaq 0x6fe66(%rip), %rsi     # 0xc3694
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
shrl $0x3, %ecx
movq %rcx, 0x8(%rsp)
jmp 0x537e7
movq -0x11(%rax), %rax
jmp 0x53856
movzwl -0x5(%rax), %eax
jmp 0x53856
movl -0x9(%rax), %eax
jmp 0x53856
movzbl -0x3(%rax), %eax
movq %rax, 0x8(%rsp)
jmp 0x537e7
movq 0x10(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x30(%rsp)
movslq %r13d, %rax
movslq %r15d, %r14
cmpq %rax, %r12
jge 0x53896
movq 0x40(%rbp), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rdi
leaq 0x701a1(%rip), %rsi     # 0xc3a2a
callq 0x262f0
testl %eax, %eax
je 0x53917
cmpl $0x2, %r13d
jl 0x53c45
movq 0x40(%rbp), %rbx
movq (%rbx,%r14,8), %rax
movq 0x8(%rax), %rdi
leaq 0x7019b(%rip), %rsi     # 0xc3a4e
callq 0x262f0
testl %eax, %eax
jne 0x53c45
movq 0x8(%rbx,%r14,8), %rax
movq 0x8(%rax), %r14
movq %r14, %rdi
leaq 0x7ba60(%rip), %rsi     # 0xcf333
callq 0x262f0
testl %eax, %eax
je 0x53910
movq %r14, %rdi
leaq 0x6a003(%rip), %rsi     # 0xbd8e9
callq 0x262f0
testl %eax, %eax
je 0x5397f
movq %r14, %rdi
leaq 0x8043d(%rip), %rsi     # 0xd3d3a
callq 0x262f0
movl $0x3, %ebx
testl %eax, %eax
je 0x53984
jmp 0x53c45
movl $0x1, %ebx
jmp 0x53984
incl %r15d
decl %r13d
testq %r12, %r12
jle 0x5398c
movl %r13d, 0x8(%rsp)
movslq %r15d, %r13
shlq $0x3, %r13
movq 0x30(%rsp), %r14
xorl %ebp, %ebp
movq 0x28(%rsp), %rdi
movq 0x40(%rdi), %rax
addq %r13, %rax
movq (%rax,%rbp,8), %rsi
movq %r14, %rdx
leaq 0x700e3(%rip), %rcx     # 0xc3a32
callq 0x41418
testl %eax, %eax
jne 0x53d55
incq %rbp
movq 0x18(%rsp), %r12
addq $0x30, %r14
cmpq %rbp, %r12
jg 0x53935
addl %ebp, %r15d
movl 0x8(%rsp), %r13d
subl %ebp, %r13d
movq 0x28(%rsp), %rbp
jmp 0x5398c
movl $0x2, %ebx
addl $0x2, %r15d
addl $-0x2, %r13d
testl %r13d, %r13d
jne 0x5386b
jmp 0x53599
movq 0x10(%rsp), %rdi
callq 0x38413
leaq 0xae965(%rip), %rax     # 0x102310
movq 0x70(%rax), %rsi
jmp 0x534b6
movq %r13, 0x48(%rsp)
leaq 0xad3f0(%rip), %rdi     # 0x100db0
movq $0x0, 0x8(%rsp)
xorl %esi, %esi
callq 0x2e68c
movq %rax, %r13
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x53bc6
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movq 0x10(%rsp), %r14
leaq (%r14,%rax), %rdi
addq $-0x30, %rdi
callq 0x52e86
movslq %eax, %rsi
movq %r13, %rdi
callq 0x2e6fa
cmpq $0x0, 0x18(%rsp)
jle 0x53bc6
movq %r14, %rax
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 0x52e86
testl %eax, %eax
je 0x53bae
movq %rbp, %rdi
callq 0x52cdc
movq %rbp, %rdi
movq %r12, %rsi
callq 0x52f36
testl %eax, %eax
je 0x53ba6
movsd 0x10(%rbp), %xmm0
mulsd 0xb8(%rsp), %xmm0
movapd %xmm0, %xmm1
cmpordsd %xmm0, %xmm1
andpd %xmm0, %xmm1
movapd %xmm1, 0x30(%rsp)
movq %r12, %rdi
callq 0x531e3
movq %r13, %rdi
movq %rax, %rsi
callq 0x2ebca
testq %rax, %rax
je 0x53ac2
movsd 0x8(%rax), %xmm0
cmpl $0x2, %ebx
je 0x53b07
cmpl $0x1, %ebx
jne 0x53b13
movapd 0x30(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
ucomisd %xmm1, %xmm1
jnp 0x53b21
xorpd %xmm0, %xmm0
jmp 0x53b21
movq %r12, %rdi
callq 0x531e3
movq %rax, %r14
movl (%rax), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x53b7f
movq 0x8(%r14), %rax
movzbl -0x1(%rax), %ecx
movl %ecx, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x53b7f
leaq 0x6fb61(%rip), %rdi     # 0xc3658
movslq (%rdi,%rdx,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
movl %ecx, %esi
shrl $0x3, %esi
jmp 0x53b40
movapd 0x30(%rsp), %xmm1
minsd %xmm0, %xmm1
jmp 0x53b1d
movapd 0x30(%rsp), %xmm1
maxsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd %xmm0, 0x8(%rax)
jmp 0x53a4d
movq -0x11(%rax), %rsi
jmp 0x53b40
movzwl -0x5(%rax), %esi
jmp 0x53b40
movl -0x9(%rax), %esi
jmp 0x53b40
movzbl -0x3(%rax), %esi
movl 0x8(%rsp), %edi
cmpq %rdi, %rsi
jbe 0x53b7f
movl %edx, %edx
leaq 0x6fb1a(%rip), %rsi     # 0xc366c
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
shrl $0x3, %ecx
movq %rcx, 0x8(%rsp)
jmp 0x53b7f
movq -0x11(%rax), %rax
jmp 0x53b7a
movzwl -0x5(%rax), %eax
jmp 0x53b7a
movl -0x9(%rax), %eax
jmp 0x53b7a
movzbl -0x3(%rax), %eax
movq %rax, 0x8(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x2e9fb
movq %rax, %r15
movq %r14, %rdi
callq 0x407a8
movapd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8(%r15)
jmp 0x53a4d
movq %rbp, %rdi
callq 0x52e02
movq 0x60(%rsp), %rcx
incq %rcx
cmpq %rcx, 0x18(%rsp)
movq 0x10(%rsp), %rax
jg 0x53a25
movq %r13, %rdi
callq 0x2efbb
movq %rax, %r14
movq 0x58(%rsp), %rbx
movq (%rbx), %rdi
movq 0x48(%r13), %rsi
addq 0x28(%r13), %rsi
callq 0x2e6fa
movq %r14, %rdi
callq 0x2f015
testq %rax, %rax
je 0x53c2e
movq (%rax), %r15
movsd 0x8(%rax), %xmm0
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x4feda
movq %rax, %r12
movq %r15, %rdi
callq 0x407a8
movq (%rbx), %rdi
addq $0x8, %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x2e9b8
movq %r15, %rdi
callq 0x407a8
jmp 0x53be6
movq %r14, %rdi
callq 0x2f0dd
movq %r13, %rdi
callq 0x2eef3
movq 0x28(%rsp), %rbp
jmp 0x53c70
movq 0x10(%rsp), %rdi
callq 0x38413
jmp 0x534a8
movq $0x0, 0x8(%rsp)
jmp 0x53c7f
movq $0x0, 0x8(%rsp)
movq %r15, %rdi
callq 0x52e02
movq 0x50(%rsp), %r14
movl 0x24(%rsp), %r12d
movq 0x48(%rsp), %r13
movq 0x10(%rbp), %rdi
movq %r14, %rsi
callq 0x41e5f
movq %rbp, %rbx
movl %eax, %ebp
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x53cfc
movl 0x8(%rsp), %esi
movq %r13, %rdi
callq 0x51db4
movq 0x10(%rbx), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x41b77
movq %r13, %rdi
callq 0x51a88
movl %eax, %esi
movq %rbx, %rdi
callq 0x3d23f
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x41d90
testl %r12d, %r12d
leaq 0x689ef(%rip), %rax     # 0xbc6d2
leaq 0x689f4(%rip), %rsi     # 0xbc6de
cmoveq %rax, %rsi
movq 0x10(%rbx), %rax
movl 0x30(%rax), %ecx
movl $0x80, %edi
jmp 0x53d3f
movq %r13, %rdi
callq 0x40c8f
leaq 0xae605(%rip), %rax     # 0x102310
movq 0x20(%rax), %rsi
movq %rbx, %rdi
callq 0x3c854
testl %ebp, %ebp
movq 0x10(%rsp), %rdi
je 0x53d5a
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x41d90
movq 0x10(%rbx), %rax
movl 0x30(%rax), %ecx
leaq 0x6a7ee(%rip), %rsi     # 0xbe528
movl $0x4, %edi
movq %r14, %rdx
callq 0x7c665
leaq 0xadb5a(%rip), %rax     # 0x1018a8
incq 0x720(%rax)
movq 0x10(%rsp), %rdi
callq 0x38413
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6fce0(%rip), %rdi     # 0xc3a58
leaq 0x6f957(%rip), %rsi     # 0xc36d6
movl $0x864, %edx            # imm = 0x864
callq 0x619b4
movl $0x1, %edi
callq 0x263c0