// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/t_zset.c
// Function: zunionInterGenericCommand
void zunionInterGenericCommand(redisClient *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 */
    // 取出要处理的有序集合的个数 setnum
    if ((getLongFromObjectOrReply(c, c->argv[2], &setnum, NULL) != REDIS_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 */
    // setnum 参数和传入的 key 数量不相同，出错
    if (setnum > c->argc-3) {
        addReply(c,shared.syntaxerr);
        return;
    }

    /* read keys to be used for input */
    // 为每个输入 key 创建一个迭代器
    src = zcalloc(sizeof(zsetopsrc) * setnum);
    for (i = 0, j = 3; i < setnum; i++, j++) {

        // 取出 key 对象
        robj *obj = lookupKeyWrite(c->db,c->argv[j]);

        // 创建迭代器
        if (obj != NULL) {
            if (obj->type != REDIS_ZSET && obj->type != REDIS_SET) {
                zfree(src);
                addReply(c,shared.wrongtypeerr);
                return;
            }

            src[i].subject = obj;
            src[i].type = obj->type;
            src[i].encoding = obj->encoding;

        // 不存在的对象设为 NULL
        } else {
            src[i].subject = NULL;
        }

        /* Default all weights to 1. */
        // 默认权重为 1.0
        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") != REDIS_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));

    // ZINTERSTORE 命令
    if (op == REDIS_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. */
            // 遍历基数最小的 src[0] 集合
            zuiInitIterator(&src[0]);
            while (zuiNext(&src[0],&zval)) {
                double score, value;

                // 计算加权分值
                score = src[0].weight * zval.score;
                if (isnan(score)) score = 0;

                // 将 src[0] 集合中的元素和其他集合中的元素做加权聚合计算
                for (j = 1; j < setnum; j++) {
                    /* It is not safe to access the zset we are
                     * iterating, so explicitly check for equal object. */
                    // 如果当前迭代到的 src[j] 的对象和 src[0] 的对象一样，
                    // 那么 src[0] 出现的元素必然也出现在 src[j]
                    // 那么我们可以直接计算聚合值，
                    // 不必进行 zuiFind 去确保元素是否出现
                    // 这种情况在某个 key 输入了两次，
                    // 并且这个 key 是所有输入集合中基数最小的集合时会出现
                    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);

                    // 如果当前元素没出现在某个集合，那么跳出 for 循环
                    // 处理下个元素
                    } 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]);
        }

    // ZUNIONSTORE
    } else if (op == REDIS_OP_UNION) {

        // 遍历所有输入集合
        for (i = 0; i < setnum; i++) {

            // 跳过空集合
            if (zuiLength(&src[i]) == 0)
                continue;

            // 遍历所有集合元素
            zuiInitIterator(&src[i]);
            while (zuiNext(&src[i],&zval)) {
                double score, value;

                /* Skip an element that when already processed */
                // 跳过已处理元素
                if (dictFind(dstzset->dict,zuiObjectFromValue(&zval)) != NULL)
                    continue;

                /* Initialize score */
                // 初始化分值
                score = src[i].weight * zval.score;
                // 溢出时设为 0
                if (isnan(score)) score = 0;

                /* We need to check only next sets to see if this element
                 * exists, since we process every element just one time so
                 * it can't exist in a previous set (otherwise it would be
                 * already processed). */
                for (j = (i+1); j < setnum; j++) {
                    /* It is not safe to access the zset we are
                     * iterating, so explicitly check for equal object. */
                    // 当前元素的集合和被迭代集合一样
                    // 所以同一个元素必然出现在 src[j] 和 src[i]
                    // 程序直接计算它们的聚合值
                    // 而不必使用 zuiFind 来检查元素是否存在
                    if(src[j].subject == src[i].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);
                    }
                }

                // 取出成员
                tmp = zuiObjectFromValue(&zval);
                // 插入并集元素到跳跃表
                znode = zslInsert(dstzset->zsl,score,tmp);
                incrRefCount(zval.ele); /* added to skiplist */
                // 添加元素到字典
                dictAdd(dstzset->dict,tmp,&znode->score);
                incrRefCount(zval.ele); /* added to dictionary */

                // 更新字符串最大长度
                if (sdsEncodedObject(tmp)) {
                    if (sdslen(tmp->ptr) > maxelelen)
                        maxelelen = sdslen(tmp->ptr);
                }
            }
            zuiClearIterator(&src[i]);
        }
    } else {
        redisPanic("Unknown operator");
    }

    // 删除已存在的 dstkey ，等待后面用新对象代替它
    if (dbDelete(c->db,dstkey)) {
        signalModifiedKey(c->db,dstkey);
        touched = 1;
        server.dirty++;
    }

    // 如果结果集合的长度不为 0 
    if (dstzset->zsl->length) {
        /* Convert to ziplist when in limits. */
        // 看是否需要对结果集合进行编码转换
        if (dstzset->zsl->length <= server.zset_max_ziplist_entries &&
            maxelelen <= server.zset_max_ziplist_value)
                zsetConvert(dstobj,REDIS_ENCODING_ZIPLIST);

        // 将结果集合关联到数据库
        dbAdd(c->db,dstkey,dstobj);

        // 回复结果集合的长度
        addReplyLongLong(c,zsetLength(dstobj));

        if (!touched) signalModifiedKey(c->db,dstkey);

        notifyKeyspaceEvent(REDIS_NOTIFY_ZSET,
            (op == REDIS_OP_UNION) ? "zunionstore" : "zinterstore",
            dstkey,c->db->id);

        server.dirty++;

    // 结果集为空
    } else {

        decrRefCount(dstobj);

        addReply(c,shared.czero);

        if (touched)
            notifyKeyspaceEvent(REDIS_NOTIFY_GENERIC,"del",dstkey,c->db->id);
    }

    zfree(src);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r13
movq 0x38(%rdi), %rax
movq 0x10(%rax), %rsi
leaq 0x10(%rsp), %rdx
xorl %ecx, %ecx
callq 0x310df
testl %eax, %eax
jne 0x409dc
movq 0x10(%rsp), %rax
testq %rax, %rax
jle 0x401e5
movslq 0x30(%r13), %rcx
addq $-0x3, %rcx
cmpq %rcx, %rax
jle 0x401f9
leaq 0x8a62f(%rip), %rax     # 0xca800
movq 0x80(%rax), %rsi
movq %r13, %rdi
callq 0x2d6f0
jmp 0x409dc
leaq 0x59275(%rip), %rsi     # 0x99461
movq %r13, %rdi
callq 0x2d9d7
jmp 0x409dc
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
callq 0x2975b
cmpq $0x0, 0x10(%rsp)
movq %rbx, 0x78(%rsp)
movq %rax, 0x8(%rsp)
movl %ebp, 0x24(%rsp)
jle 0x40295
movl $0x3, %r12d
movabsq $0x3ff0000000000000, %rbx # imm = 0x3FF0000000000000
movq %rax, %r14
movq 0x8(%r13), %rdi
movq 0x38(%r13), %rax
movq (%rax,%r12,8), %rsi
callq 0x31454
testq %rax, %rax
je 0x4026d
movl (%rax), %ecx
andl $0xe, %ecx
cmpl $0x2, %ecx
jne 0x406a5
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 0x40274
movq $0x0, (%r14)
movq %rbx, 0x10(%r14)
leaq 0x1(%r12), %r15
addq $0x30, %r14
addq $-0x2, %r12
cmpq %r12, 0x10(%rsp)
movq %r15, %r12
jg 0x4022f
movl 0x24(%rsp), %ebp
jmp 0x4029b
movl $0x3, %r15d
movl 0x30(%r13), %r12d
subl %r15d, %r12d
setle %al
sete %cl
orb %al, %cl
movl $0x1, %ebx
je 0x40561
movq 0x10(%rsp), %rsi
leaq -0x163(%rip), %rcx      # 0x4015e
movl $0x30, %edx
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x1f820
callq 0x3066e
movq %rax, 0x68(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x80(%rsp)
movapd %xmm0, 0x90(%rsp)
movapd %xmm0, 0xa0(%rsp)
movapd %xmm0, 0xb0(%rsp)
movapd %xmm0, 0xc0(%rsp)
cmpl $0x2, %ebp
movq %r13, 0x70(%rsp)
je 0x406bf
testl %ebp, %ebp
jne 0x409ee
cmpq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rax
jle 0x4088c
leaq 0x30(%rax), %rcx
movq %rcx, 0x60(%rsp)
xorl %ecx, %ecx
movl $0x1, %edx
movq %rdx, 0x58(%rsp)
leaq 0x80(%rsp), %r13
leaq 0x18(%rsp), %r12
movl $0x0, 0x4(%rsp)
movq %rcx, 0x50(%rsp)
leaq (%rcx,%rcx,2), %rbp
shlq $0x4, %rbp
addq %rax, %rbp
movq %rbp, %rdi
callq 0x3fc20
testl %eax, %eax
je 0x40539
movq %rbp, %rdi
callq 0x3fa72
movq %rbp, %rdi
movq %r13, %rsi
callq 0x3fcd0
testl %eax, %eax
je 0x40531
movq 0x50(%rsp), %rax
incq %rax
movq %rax, 0x48(%rsp)
movq 0x28(%rsp), %rax
movq (%rax), %r14
movq %r13, %rdi
callq 0x3ff41
movq %r14, %rdi
movq %rax, %rsi
callq 0x224dc
testq %rax, %rax
jne 0x4051e
movsd 0x10(%rbp), %xmm0
mulsd 0xc8(%rsp), %xmm0
movapd %xmm0, %xmm1
cmpordsd %xmm0, %xmm1
andpd %xmm0, %xmm1
movq 0x48(%rsp), %rax
cmpq %rax, 0x10(%rsp)
jle 0x4049e
movq 0x60(%rsp), %r14
movq 0x58(%rsp), %r15
movq (%r14), %rax
cmpq (%rbp), %rax
je 0x4045c
movapd %xmm1, 0x30(%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x3ffff
testl %eax, %eax
je 0x40486
movsd 0x10(%r14), %xmm0
mulsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
cmpl $0x2, %ebx
movapd 0x30(%rsp), %xmm1
je 0x40476
cmpl $0x1, %ebx
jne 0x4047c
addsd %xmm0, %xmm1
ucomisd %xmm1, %xmm1
jnp 0x4048c
xorpd %xmm1, %xmm1
jmp 0x4048c
movsd 0xc8(%rsp), %xmm0
mulsd 0x10(%r14), %xmm0
movsd %xmm0, 0x18(%rsp)
cmpl $0x2, %ebx
jne 0x40447
minsd %xmm1, %xmm0
jmp 0x40480
maxsd %xmm1, %xmm0
movapd %xmm0, %xmm1
jmp 0x4048c
movapd 0x30(%rsp), %xmm1
incq %r15
addq $0x30, %r14
cmpq %r15, 0x10(%rsp)
jg 0x40409
movapd %xmm1, 0x30(%rsp)
movq %r13, %rdi
callq 0x3ff41
movq %rax, %r14
movq 0x28(%rsp), %r12
movq 0x8(%r12), %rdi
movapd 0x30(%rsp), %xmm0
movq %rax, %rsi
callq 0x3d096
movq %rax, %r15
movq 0xa8(%rsp), %rdi
callq 0x3041b
movq (%r12), %rdi
addq $0x8, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x222b6
movq 0xa8(%rsp), %rdi
callq 0x3041b
movl (%r14), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x40519
movq 0x8(%r14), %rax
movslq -0x8(%rax), %rax
movl 0x4(%rsp), %edx
movl %edx, %ecx
cmpq %rcx, %rax
cmovbel %edx, %eax
movl %eax, 0x4(%rsp)
leaq 0x18(%rsp), %r12
movq %rbp, %rdi
movq %r13, %rsi
callq 0x3fcd0
testl %eax, %eax
jne 0x403b0
movq %rbp, %rdi
callq 0x3fb9c
movq 0x50(%rsp), %rcx
incq %rcx
incq 0x58(%rsp)
addq $0x30, 0x60(%rsp)
cmpq %rcx, 0x10(%rsp)
movq 0x8(%rsp), %rax
jg 0x40368
jmp 0x408b5
movq 0x8(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x30(%rsp)
movslq %r12d, %rax
movslq %r15d, %r14
cmpq %rax, 0x10(%rsp)
jge 0x4059c
movq 0x38(%r13), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rdi
leaq 0x58f0d(%rip), %rsi     # 0x9949c
callq 0x1f2e0
testl %eax, %eax
je 0x4061d
cmpl $0x2, %r12d
jl 0x40896
movq 0x38(%r13), %rbx
movq (%rbx,%r14,8), %rax
movq 0x8(%rax), %rdi
leaq 0x58f07(%rip), %rsi     # 0x994c0
callq 0x1f2e0
testl %eax, %eax
jne 0x40896
movq 0x8(%rbx,%r14,8), %rax
movq 0x8(%rax), %r14
movq %r14, %rdi
leaq 0x59569(%rip), %rsi     # 0x99b42
callq 0x1f2e0
testl %eax, %eax
je 0x40616
movq %r14, %rdi
leaq 0x58ede(%rip), %rsi     # 0x994ca
callq 0x1f2e0
testl %eax, %eax
je 0x4068a
movq %r14, %rdi
leaq 0x635e3(%rip), %rsi     # 0xa3be6
callq 0x1f2e0
movl $0x3, %ebx
testl %eax, %eax
je 0x4068f
jmp 0x40896
movl $0x1, %ebx
jmp 0x4068f
decl %r12d
incl %r15d
cmpq $0x0, 0x10(%rsp)
jle 0x40697
movl %r12d, 0x28(%rsp)
movq %r13, %r12
movslq %r15d, %r13
shlq $0x3, %r13
movq 0x30(%rsp), %r14
xorl %ebp, %ebp
movq %r12, %rdi
movq 0x38(%r12), %rax
addq %r13, %rax
movq (%rax,%rbp,8), %rsi
movq %r14, %rdx
leaq 0x58e4a(%rip), %rcx     # 0x994a4
callq 0x30dec
testl %eax, %eax
jne 0x409d2
incq %rbp
addq $0x30, %r14
cmpq %rbp, 0x10(%rsp)
jg 0x40641
addl %ebp, %r15d
movl 0x28(%rsp), %eax
subl %ebp, %eax
movq %r12, %r13
movl %eax, %r12d
movl 0x24(%rsp), %ebp
jmp 0x40697
movl $0x2, %ebx
addl $0x2, %r15d
addl $-0x2, %r12d
testl %r12d, %r12d
jne 0x4056f
jmp 0x402b5
movq 0x8(%rsp), %rdi
callq 0x2984b
leaq 0x8a14a(%rip), %rax     # 0xca800
movq 0x70(%rax), %rsi
jmp 0x401d8
movq %r14, %rdi
callq 0x3fc20
testl %eax, %eax
jle 0x4088c
movq %r14, %rdi
callq 0x3fa72
leaq 0x80(%rsp), %rsi
movq %r14, %rdi
callq 0x3fcd0
testl %eax, %eax
je 0x408a5
movq %r14, %rax
addq $0x30, %rax
movq %rax, 0x48(%rsp)
movl $0x0, 0x4(%rsp)
leaq 0x80(%rsp), %r12
leaq 0x18(%rsp), %r13
movq %r14, %rdi
movq 0x28(%rsp), %r15
movsd 0x10(%rdi), %xmm0
mulsd 0xc8(%rsp), %xmm0
movapd %xmm0, %xmm1
cmpordsd %xmm0, %xmm1
andpd %xmm0, %xmm1
movl $0x1, %ebp
cmpq $0x2, 0x10(%rsp)
jl 0x407ff
movq 0x48(%rsp), %r14
movq (%r14), %rax
cmpq (%rdi), %rax
je 0x407a4
movapd %xmm1, 0x30(%rsp)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3ffff
testl %eax, %eax
je 0x407f4
movsd 0x10(%r14), %xmm0
mulsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
cmpl $0x2, %ebx
movapd 0x30(%rsp), %xmm1
je 0x407c9
cmpl $0x1, %ebx
movq 0x8(%rsp), %rdi
jne 0x407c3
addsd %xmm0, %xmm1
ucomisd %xmm1, %xmm1
jnp 0x407e0
xorpd %xmm1, %xmm1
jmp 0x407e0
movsd 0xc8(%rsp), %xmm0
mulsd 0x10(%r14), %xmm0
movsd %xmm0, 0x18(%rsp)
cmpl $0x2, %ebx
je 0x407d8
cmpl $0x1, %ebx
je 0x40794
maxsd %xmm1, %xmm0
jmp 0x407dc
minsd %xmm1, %xmm0
movapd %xmm0, %xmm1
movq 0x8(%rsp), %rdi
jmp 0x407e0
minsd %xmm1, %xmm0
movapd %xmm0, %xmm1
incq %rbp
addq $0x30, %r14
cmpq %rbp, 0x10(%rsp)
jg 0x40749
jmp 0x407ff
movq 0x8(%rsp), %rdi
movapd 0x30(%rsp), %xmm1
cmpq %rbp, 0x10(%rsp)
jne 0x40875
movq %r12, %rdi
movapd %xmm1, 0x30(%rsp)
callq 0x3ff41
movq %rax, %r14
movq 0x8(%r15), %rdi
movapd 0x30(%rsp), %xmm0
movq %rax, %rsi
callq 0x3d096
movq %rax, %rbp
movq %r14, %rdi
callq 0x3041b
movq (%r15), %rdi
addq $0x8, %rbp
movq %r14, %rsi
movq %rbp, %rdx
callq 0x222b6
movq %r14, %rdi
callq 0x3041b
movl (%r14), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x40870
movq 0x8(%r14), %rax
movslq -0x8(%rax), %rax
movl 0x4(%rsp), %edx
movl %edx, %ecx
cmpq %rcx, %rax
cmovbel %edx, %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x3fcd0
movq 0x8(%rsp), %rdi
testl %eax, %eax
jne 0x40718
jmp 0x408b0
movl $0x0, 0x4(%rsp)
jmp 0x408b5
movq 0x8(%rsp), %rdi
callq 0x2984b
jmp 0x401ca
movl $0x0, 0x4(%rsp)
movq %r14, %rdi
callq 0x3fb9c
movq 0x70(%rsp), %r14
movq 0x8(%r14), %rdi
movq 0x78(%rsp), %r15
movq %r15, %rsi
callq 0x3174b
movl %eax, %ebp
testl %eax, %eax
je 0x408eb
movq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x316b7
leaq 0x896c4(%rip), %rax     # 0xc9fa8
incq 0x560(%rax)
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
movl 0x24(%rsp), %r12d
movq 0x68(%rsp), %r13
je 0x40998
leaq 0x89696(%rip), %rbx     # 0xc9fa8
cmpq 0x780(%rbx), %rax
ja 0x40935
movl 0x4(%rsp), %eax
cmpq %rax, 0x788(%rbx)
jb 0x40935
movq %r13, %rdi
movl $0x5, %esi
callq 0x3ea98
movq 0x8(%r14), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x314ef
movq %r13, %rdi
callq 0x3ea49
movl %eax, %esi
movq %r14, %rdi
callq 0x2dea3
testl %ebp, %ebp
jne 0x40966
movq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x316b7
testl %r12d, %r12d
leaq 0x53a54(%rip), %rax     # 0x943c4
leaq 0x53a59(%rip), %rsi     # 0x943d0
cmoveq %rax, %rsi
movq 0x8(%r14), %rax
movl 0x30(%rax), %ecx
movl $0x80, %edi
movq %r15, %rdx
callq 0x608b5
incq 0x560(%rbx)
jmp 0x409d2
movq %r13, %rdi
callq 0x30834
leaq 0x89e59(%rip), %rax     # 0xca800
movq 0x20(%rax), %rsi
movq %r14, %rdi
callq 0x2d6f0
testl %ebp, %ebp
je 0x409d2
movq 0x8(%r14), %rax
movl 0x30(%rax), %ecx
leaq 0x53ac8(%rip), %rsi     # 0x9448d
movl $0x4, %edi
movq %r15, %rdx
callq 0x608b5
movq 0x8(%rsp), %rdi
callq 0x2984b
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x58ad9(%rip), %rdi     # 0x994ce
leaq 0x587ba(%rip), %rsi     # 0x991b6
movl $0xb66, %edx            # imm = 0xB66
callq 0x4d0e5
movl $0x1, %edi
callq 0x1f3b0