// File: /workspace/github_c_makefile_star2_O2/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 $0xc8, %rsp
movl %edx, %ebx
movq %rsi, %r13
movq %rdi, %r12
movq 0x38(%rdi), %rax
movq 0x10(%rax), %rsi
leaq 0x20(%rsp), %rdx
xorl %ecx, %ecx
callq 0x2f672
testl %eax, %eax
jne 0x3d9c7
movq 0x20(%rsp), %rax
testq %rax, %rax
jle 0x3d2c6
movslq 0x30(%r12), %rcx
addq $-0x3, %rcx
cmpq %rcx, %rax
jle 0x3d2da
leaq 0x8a546(%rip), %rax     # 0xc7800
movq 0x80(%rax), %rsi
jmp 0x3d4d2
leaq 0x521a1(%rip), %rsi     # 0x8f46e
movq %r12, %rdi
callq 0x2c2da
jmp 0x3d9c7
movl %ebx, 0xc(%rsp)
imulq $0x30, %rax, %rdi
callq 0x282df
pushq $0x3
popq %rbx
movabsq $0x3ff0000000000000, %r14 # imm = 0x3FF0000000000000
movq %rax, (%rsp)
movq %rax, %r15
leaq -0x3(%rbx), %rax
movq 0x20(%rsp), %rbp
cmpq %rax, %rbp
jle 0x3d35a
movq 0x8(%r12), %rdi
movq 0x38(%r12), %rax
movq (%rax,%rbx,8), %rsi
callq 0x2f988
testq %rax, %rax
je 0x3d349
movl (%rax), %ecx
andl $0xe, %ecx
cmpl $0x2, %ecx
jne 0x3d4be
movq %rax, (%r15)
movl (%rax), %ecx
andl $0xf, %ecx
movl %ecx, 0x8(%r15)
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
movl %eax, 0xc(%r15)
jmp 0x3d34d
andq $0x0, (%r15)
movq %r14, 0x10(%r15)
incq %rbx
addq $0x30, %r15
jmp 0x3d2fb
movq %r12, 0x28(%rsp)
movl 0x30(%r12), %ecx
cmpl %ebx, %ecx
movq %r13, 0x58(%rsp)
jle 0x3d4df
subl %ebx, %ecx
movq (%rsp), %rax
addq $0x10, %rax
movq %rax, 0x10(%rsp)
pushq $0x1
popq %r12
movslq %ebx, %r13
movslq %ecx, %r15
leaq 0x1(%r13), %r14
leal -0x1(%r15), %eax
testl %r15d, %r15d
je 0x3d4f3
movq %rax, 0x18(%rsp)
cmpq %r15, %rbp
jge 0x3d3ca
movq 0x28(%rsp), %rax
movq 0x38(%rax), %rax
movq (%rax,%r13,8), %rax
movq 0x8(%rax), %rdi
leaq 0x520ec(%rip), %rsi     # 0x8f4a9
callq 0x1f2e0
testl %eax, %eax
je 0x3d465
cmpl $0x2, %r15d
movq 0x28(%rsp), %r12
jl 0x3d4e5
movq 0x38(%r12), %rbx
movq (%rbx,%r13,8), %rax
movq 0x8(%rax), %rdi
leaq 0x520e0(%rip), %rsi     # 0x8f4cd
callq 0x1f2e0
testl %eax, %eax
jne 0x3d4e5
movq 0x8(%rbx,%r13,8), %rax
movq 0x8(%rax), %rbx
movq %rbx, %rdi
leaq 0x52741(%rip), %rsi     # 0x8fb4e
callq 0x1f2e0
pushq $0x1
popq %r12
testl %eax, %eax
je 0x3d44c
movq %rbx, %rdi
leaq 0x520b3(%rip), %rsi     # 0x8f4d7
callq 0x1f2e0
pushq $0x2
popq %r12
testl %eax, %eax
je 0x3d44c
movq %rbx, %rdi
leaq 0x5c84c(%rip), %rsi     # 0x99c87
callq 0x1f2e0
pushq $0x3
popq %r12
testl %eax, %eax
jne 0x3d9d9
addq $-0x2, %r15
addq $0x2, %r13
addq $0x2, %r14
movq 0x18(%rsp), %rax
addl $-0x2, %eax
jmp 0x3d392
movq 0x10(%rsp), %rbx
xorl %r15d, %r15d
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rbp
cmpq %r15, %rbp
jle 0x3d4b3
movq 0x28(%rsp), %rdi
movq 0x38(%rdi), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdx
movq %rcx, %rbp
leaq 0x5201b(%rip), %rcx     # 0x8f4b1
callq 0x2f399
movq %rbp, %rcx
incq %r15
addq $0x30, %rbx
incq %r14
decl %ecx
testl %eax, %eax
je 0x3d472
jmp 0x3d9fa
leal (%r15,%r13), %ebx
incl %ebx
jmp 0x3d384
movq (%rsp), %rdi
callq 0x283cd
leaq 0x8a332(%rip), %rax     # 0xc7800
movq 0x70(%rax), %rsi
movq %r12, %rdi
callq 0x2c10d
jmp 0x3d9c7
pushq $0x1
popq %r12
jmp 0x3d4f8
movq (%rsp), %rdi
callq 0x283cd
jmp 0x3d2b3
movq 0x58(%rsp), %r13
leaq -0x2b9(%rip), %rcx      # 0x3d246
pushq $0x30
popq %rdx
movq (%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
callq 0x1f820
callq 0x2ec8c
movq %rax, 0x50(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x18(%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 0xc(%rsp), %ebp
cmpl $0x2, %ebp
je 0x3d71c
testl %ebp, %ebp
jne 0x3da00
movq (%rsp), %rax
addq $0x30, %rax
movq %rax, 0x30(%rsp)
xorl %eax, %eax
pushq $0x1
popq %rcx
movq %rcx, 0x60(%rsp)
leaq 0x70(%rsp), %r13
leaq 0x40(%rsp), %rbp
movl $0x0, 0x10(%rsp)
movl %r12d, 0x4c(%rsp)
cmpq %rax, 0x20(%rsp)
jle 0x3d87d
movq %rax, 0x68(%rsp)
imulq $0x30, %rax, %rbx
addq (%rsp), %rbx
movq %rbx, %rdi
callq 0x3cd1e
testl %eax, %eax
je 0x3d704
movq %rbx, %rdi
callq 0x3cb7b
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3cdc9
testl %eax, %eax
je 0x3d6fc
movq 0x18(%rsp), %rax
movq (%rax), %r15
movq %r13, %rdi
callq 0x3d034
movq %r15, %rdi
movq %rax, %rsi
callq 0x21b64
testq %rax, %rax
jne 0x3d5c5
movsd 0x10(%rbx), %xmm0
mulsd 0xb8(%rsp), %xmm0
movapd %xmm0, %xmm1
cmpordsd %xmm0, %xmm1
andpd %xmm0, %xmm1
movlpd %xmm1, 0x40(%rsp)
movq 0x60(%rsp), %r14
movq 0x30(%rsp), %r15
cmpq %r14, 0x20(%rsp)
jle 0x3d67d
movq (%r15), %rax
cmpq (%rbx), %rax
je 0x3d654
movq %r15, %rdi
movq %r13, %rsi
leaq 0x38(%rsp), %rdx
callq 0x3d0eb
testl %eax, %eax
je 0x3d674
movsd 0x10(%r15), %xmm0
mulsd 0x38(%rsp), %xmm0
jmp 0x3d663
movsd 0xb8(%rsp), %xmm0
mulsd 0x10(%r15), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rbp, %rdi
movl %r12d, %esi
callq 0x3da20
addq $0x30, %r15
incq %r14
jmp 0x3d623
movq %r13, %rdi
callq 0x3d034
movq %rax, %r15
movq 0x18(%rsp), %r12
movq 0x8(%r12), %rdi
movsd 0x40(%rsp), %xmm0
movq %rax, %rsi
callq 0x3a577
movq %rax, %r14
movq 0x98(%rsp), %rdi
callq 0x2eacc
movq (%r12), %rdi
addq $0x8, %r14
movq %r15, %rsi
movq %r14, %rdx
callq 0x21956
movq 0x98(%rsp), %rdi
callq 0x2eacc
movl (%r15), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x3d6f2
movq 0x8(%r15), %rax
movslq -0x8(%rax), %rax
movl 0x10(%rsp), %edx
movl %edx, %ecx
cmpq %rcx, %rax
cmovbel %edx, %eax
movl %eax, 0x10(%rsp)
movl 0x4c(%rsp), %r12d
jmp 0x3d5c5
movq %rbx, %rdi
callq 0x3cc9c
movq 0x68(%rsp), %rax
incq %rax
addq $0x30, 0x30(%rsp)
incq 0x60(%rsp)
jmp 0x3d595
movq %r14, %rdi
callq 0x3cd1e
testl %eax, %eax
jle 0x3d89e
movq %r14, %rdi
callq 0x3cb7b
movq %r14, %r13
addq $0x30, %r13
movl $0x0, 0x10(%rsp)
leaq 0x70(%rsp), %rbx
leaq 0x40(%rsp), %r14
movq %r13, 0x30(%rsp)
movq (%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3cdc9
testl %eax, %eax
je 0x3d88c
movsd 0x10(%r15), %xmm0
mulsd 0xb8(%rsp), %xmm0
movapd %xmm0, %xmm1
cmpordsd %xmm0, %xmm1
andpd %xmm0, %xmm1
movlpd %xmm1, 0x40(%rsp)
movq %r13, %rbp
pushq $0x1
popq %r15
movq 0x20(%rsp), %rax
cmpq %r15, %rax
jle 0x3d7f7
movq (%rbp), %rax
movq (%rsp), %rcx
cmpq (%rcx), %rax
je 0x3d7ca
movq %rbp, %rdi
movq %rbx, %rsi
leaq 0x38(%rsp), %rdx
callq 0x3d0eb
testl %eax, %eax
je 0x3d7f2
movsd 0x10(%rbp), %xmm0
mulsd 0x38(%rsp), %xmm0
jmp 0x3d7d8
movsd 0xb8(%rsp), %xmm0
mulsd 0x10(%rbp), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %r14, %rdi
movl %r12d, %esi
callq 0x3da20
incq %r15
addq $0x30, %rbp
jmp 0x3d792
movq 0x20(%rsp), %rax
cmpq %r15, %rax
jne 0x3d874
movq %rbx, %rdi
callq 0x3d034
movq %rax, %r15
movq 0x18(%rsp), %r13
movq 0x8(%r13), %rdi
movsd 0x40(%rsp), %xmm0
movq %rax, %rsi
callq 0x3a577
movq %rax, %rbp
movq %r15, %rdi
callq 0x2eacc
movq (%r13), %rdi
addq $0x8, %rbp
movq %r15, %rsi
movq %rbp, %rdx
callq 0x21956
movq %r15, %rdi
callq 0x2eacc
movl (%r15), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x3d866
movq 0x8(%r15), %rax
movslq -0x8(%rax), %rax
movl 0x10(%rsp), %edx
movl %edx, %ecx
cmpq %rcx, %rax
cmovbel %edx, %eax
movl %eax, 0x10(%rsp)
movl 0xc(%rsp), %ebp
movq 0x30(%rsp), %r13
jmp 0x3d752
movl 0xc(%rsp), %ebp
jmp 0x3d752
movq 0x58(%rsp), %r13
movq (%rsp), %r14
movl 0xc(%rsp), %ebp
jmp 0x3d8a6
movq %r15, %rdi
callq 0x3cc9c
movq 0x58(%rsp), %r13
movq %r15, %r14
jmp 0x3d8a6
movl $0x0, 0x10(%rsp)
movq 0x28(%rsp), %r15
movq 0x8(%r15), %rdi
movq %r13, %rsi
callq 0x2fc3b
movl %eax, %ebx
testl %eax, %eax
je 0x3d8d7
movq 0x8(%r15), %rdi
movq %r13, %rsi
callq 0x2fbc0
leaq 0x896d8(%rip), %rax     # 0xc6fa8
incq 0x560(%rax)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x3d985
leaq 0x896b4(%rip), %rcx     # 0xc6fa8
cmpq 0x780(%rcx), %rax
ja 0x3d917
movl 0x10(%rsp), %eax
cmpq %rax, 0x788(%rcx)
jb 0x3d917
pushq $0x5
popq %rsi
movq 0x50(%rsp), %rdi
callq 0x3bc66
movq 0x8(%r15), %rdi
movq %r13, %rsi
movq 0x50(%rsp), %r12
movq %r12, %rdx
callq 0x2fa09
movq %r12, %rdi
callq 0x3bc1e
movl %eax, %esi
movq %r15, %rdi
callq 0x2c794
testl %ebx, %ebx
jne 0x3d94d
movq 0x8(%r15), %rdi
movq %r13, %rsi
callq 0x2fbc0
testl %ebp, %ebp
leaq 0x4ca7e(%rip), %rax     # 0x8a3d4
leaq 0x4ca83(%rip), %rsi     # 0x8a3e0
cmoveq %rax, %rsi
movq 0x8(%r15), %rax
movl 0x30(%rax), %ecx
movl $0x80, %edi
movq %r13, %rdx
callq 0x5b488
leaq 0x8962c(%rip), %rax     # 0xc6fa8
incq 0x560(%rax)
jmp 0x3d9bf
movq 0x50(%rsp), %rdi
callq 0x2ee1f
leaq 0x89e6a(%rip), %rax     # 0xc7800
movq 0x20(%rax), %rsi
movq %r15, %rdi
callq 0x2c10d
testl %ebx, %ebx
je 0x3d9bf
movq 0x8(%r15), %rax
movl 0x30(%rax), %ecx
leaq 0x4cae9(%rip), %rsi     # 0x8a49d
pushq $0x4
popq %rdi
movq %r13, %rdx
callq 0x5b488
movq %r14, %rdi
callq 0x283cd
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rdi
callq 0x283cd
leaq 0x89e17(%rip), %rax     # 0xc7800
movq 0x80(%rax), %rsi
movq 0x28(%rsp), %rdi
jmp 0x3d4d5
movq (%rsp), %rdi
jmp 0x3d9c2
leaq 0x51ad4(%rip), %rdi     # 0x8f4db
leaq 0x517b5(%rip), %rsi     # 0x8f1c3
movl $0xb66, %edx            # imm = 0xB66
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0