// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/cluster.c
// Function: migrateCommand
void migrateCommand(client *c) {
    migrateCachedSocket *cs;
    int copy, replace, j;
    long timeout;
    long dbid;
    robj **ov = NULL; /* Objects to migrate. */
    robj **kv = NULL; /* Key names. */
    robj **newargv = NULL; /* Used to rewrite the command as DEL ... keys ... */
    rio cmd, payload;
    int may_retry = 1;
    int write_error = 0;
    int argv_rewritten = 0;

    /* To support the KEYS option we need the following additional state. */
    int first_key = 3; /* Argument index of the first key. */
    int num_keys = 1;  /* By default only migrate the 'key' argument. */

    /* Initialization */
    copy = 0;
    replace = 0;

    /* Parse additional options */
    for (j = 6; j < c->argc; j++) {
        if (!strcasecmp(c->argv[j]->ptr,"copy")) {
            copy = 1;
        } else if (!strcasecmp(c->argv[j]->ptr,"replace")) {
            replace = 1;
        } else if (!strcasecmp(c->argv[j]->ptr,"keys")) {
            if (sdslen(c->argv[3]->ptr) != 0) {
                addReplyError(c,
                    "When using MIGRATE KEYS option, the key argument"
                    " must be set to the empty string");
                return;
            }
            first_key = j+1;
            num_keys = c->argc - j - 1;
            break; /* All the remaining args are keys. */
        } else {
            addReply(c,shared.syntaxerr);
            return;
        }
    }

    /* Sanity check */
    if (getLongFromObjectOrReply(c,c->argv[5],&timeout,NULL) != C_OK ||
        getLongFromObjectOrReply(c,c->argv[4],&dbid,NULL) != C_OK)
    {
        return;
    }
    if (timeout <= 0) timeout = 1000;

    /* Check if the keys are here. If at least one key is to migrate, do it
     * otherwise if all the keys are missing reply with "NOKEY" to signal
     * the caller there was nothing to migrate. We don't return an error in
     * this case, since often this is due to a normal condition like the key
     * expiring in the meantime. */
    ov = zrealloc(ov,sizeof(robj*)*num_keys);
    kv = zrealloc(kv,sizeof(robj*)*num_keys);
    int oi = 0;

    for (j = 0; j < num_keys; j++) {
        if ((ov[oi] = lookupKeyRead(c->db,c->argv[first_key+j])) != NULL) {
            kv[oi] = c->argv[first_key+j];
            oi++;
        }
    }
    num_keys = oi;
    if (num_keys == 0) {
        zfree(ov); zfree(kv);
        addReplySds(c,sdsnew("+NOKEY\r\n"));
        return;
    }

try_again:
    write_error = 0;

    /* Connect */
    cs = migrateGetSocket(c,c->argv[1],c->argv[2],timeout);
    if (cs == NULL) {
        zfree(ov); zfree(kv);
        return; /* error sent to the client by migrateGetSocket() */
    }

    rioInitWithBuffer(&cmd,sdsempty());

    /* Send the SELECT command if the current DB is not already selected. */
    int select = cs->last_dbid != dbid; /* Should we emit SELECT? */
    if (select) {
        serverAssertWithInfo(c,NULL,rioWriteBulkCount(&cmd,'*',2));
        serverAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,"SELECT",6));
        serverAssertWithInfo(c,NULL,rioWriteBulkLongLong(&cmd,dbid));
    }

    /* Create RESTORE payload and generate the protocol to call the command. */
    for (j = 0; j < num_keys; j++) {
        long long ttl = 0;
        long long expireat = getExpire(c->db,kv[j]);

        if (expireat != -1) {
            ttl = expireat-mstime();
            if (ttl < 1) ttl = 1;
        }
        serverAssertWithInfo(c,NULL,rioWriteBulkCount(&cmd,'*',replace ? 5 : 4));
        if (server.cluster_enabled)
            serverAssertWithInfo(c,NULL,
                rioWriteBulkString(&cmd,"RESTORE-ASKING",14));
        else
            serverAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,"RESTORE",7));
        serverAssertWithInfo(c,NULL,sdsEncodedObject(kv[j]));
        serverAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,kv[j]->ptr,
                sdslen(kv[j]->ptr)));
        serverAssertWithInfo(c,NULL,rioWriteBulkLongLong(&cmd,ttl));

        /* Emit the payload argument, that is the serialized object using
         * the DUMP format. */
        createDumpPayload(&payload,ov[j]);
        serverAssertWithInfo(c,NULL,
            rioWriteBulkString(&cmd,payload.io.buffer.ptr,
                               sdslen(payload.io.buffer.ptr)));
        sdsfree(payload.io.buffer.ptr);

        /* Add the REPLACE option to the RESTORE command if it was specified
         * as a MIGRATE option. */
        if (replace)
            serverAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,"REPLACE",7));
    }

    /* Transfer the query to the other node in 64K chunks. */
    errno = 0;
    {
        sds buf = cmd.io.buffer.ptr;
        size_t pos = 0, towrite;
        int nwritten = 0;

        while ((towrite = sdslen(buf)-pos) > 0) {
            towrite = (towrite > (64*1024) ? (64*1024) : towrite);
            nwritten = syncWrite(cs->fd,buf+pos,towrite,timeout);
            if (nwritten != (signed)towrite) {
                write_error = 1;
                goto socket_err;
            }
            pos += nwritten;
        }
    }

    char buf1[1024]; /* Select reply. */
    char buf2[1024]; /* Restore reply. */

    /* Read the SELECT reply if needed. */
    if (select && syncReadLine(cs->fd, buf1, sizeof(buf1), timeout) <= 0)
        goto socket_err;

    /* Read the RESTORE replies. */
    int error_from_target = 0;
    int socket_error = 0;
    int del_idx = 1; /* Index of the key argument for the replicated DEL op. */

    if (!copy) newargv = zmalloc(sizeof(robj*)*(num_keys+1));

    for (j = 0; j < num_keys; j++) {
        if (syncReadLine(cs->fd, buf2, sizeof(buf2), timeout) <= 0) {
            socket_error = 1;
            break;
        }
        if ((select && buf1[0] == '-') || buf2[0] == '-') {
            /* On error assume that last_dbid is no longer valid. */
            if (!error_from_target) {
                cs->last_dbid = -1;
                addReplyErrorFormat(c,"Target instance replied with error: %s",
                    (select && buf1[0] == '-') ? buf1+1 : buf2+1);
                error_from_target = 1;
            }
        } else {
            if (!copy) {
                /* No COPY option: remove the local key, signal the change. */
                dbDelete(c->db,kv[j]);
                signalModifiedKey(c->db,kv[j]);
                server.dirty++;

                /* Populate the argument vector to replace the old one. */
                newargv[del_idx++] = kv[j];
                incrRefCount(kv[j]);
            }
        }
    }

    /* On socket error, if we want to retry, do it now before rewriting the
     * command vector. We only retry if we are sure nothing was processed
     * and we failed to read the first reply (j == 0 test). */
    if (!error_from_target && socket_error && j == 0 && may_retry &&
        errno != ETIMEDOUT)
    {
        goto socket_err; /* A retry is guaranteed because of tested conditions.*/
    }

    /* On socket errors, close the migration socket now that we still have
     * the original host/port in the ARGV. Later the original command may be
     * rewritten to DEL and will be too later. */
    if (socket_error) migrateCloseSocket(c->argv[1],c->argv[2]);

    if (!copy) {
        /* Translate MIGRATE as DEL for replication/AOF. Note that we do
         * this only for the keys for which we received an acknowledgement
         * from the receiving Redis server, by using the del_idx index. */
        if (del_idx > 1) {
            newargv[0] = createStringObject("DEL",3);
            /* Note that the following call takes ownership of newargv. */
            replaceClientCommandVector(c,del_idx,newargv);
            argv_rewritten = 1;
        } else {
            /* No key transfer acknowledged, no need to rewrite as DEL. */
            zfree(newargv);
        }
        newargv = NULL; /* Make it safe to call zfree() on it in the future. */
    }

    /* If we are here and a socket error happened, we don't want to retry.
     * Just signal the problem to the client, but only do it if we did not
     * already queue a different error reported by the destination server. */
    if (!error_from_target && socket_error) {
        may_retry = 0;
        goto socket_err;
    }

    if (!error_from_target) {
        /* Success! Update the last_dbid in migrateCachedSocket, so that we can
         * avoid SELECT the next time if the target DB is the same. Reply +OK.
         *
         * Note: If we reached this point, even if socket_error is true
         * still the SELECT command succeeded (otherwise the code jumps to
         * socket_err label. */
        cs->last_dbid = dbid;
        addReply(c,shared.ok);
    } else {
        /* On error we already sent it in the for loop above, and set
         * the curretly selected socket to -1 to force SELECT the next time. */
    }

    sdsfree(cmd.io.buffer.ptr);
    zfree(ov); zfree(kv); zfree(newargv);
    return;

/* On socket errors we try to close the cached socket and try again.
 * It is very common for the cached socket to get closed, if just reopening
 * it works it's a shame to notify the error to the caller. */
socket_err:
    /* Cleanup we want to perform in both the retry and no retry case.
     * Note: Closing the migrate socket will also force SELECT next time. */
    sdsfree(cmd.io.buffer.ptr);

    /* If the command was rewritten as DEL and there was a socket error,
     * we already closed the socket earlier. While migrateCloseSocket()
     * is idempotent, the host/port arguments are now gone, so don't do it
     * again. */
    if (!argv_rewritten) migrateCloseSocket(c->argv[1],c->argv[2]);
    zfree(newargv);
    newargv = NULL; /* This will get reallocated on retry. */

    /* Retry only if it's not a timeout and we never attempted a retry
     * (or the code jumping here did not set may_retry to zero). */
    if (errno != ETIMEDOUT && may_retry) {
        may_retry = 0;
        goto try_again;
    }

    /* Cleanup we want to do if no retry is attempted. */
    zfree(ov); zfree(kv);
    addReplySds(c,
        sdscatprintf(sdsempty(),
            "-IOERR error or timeout %s to target instance\r\n",
            write_error ? "writing" : "reading"));
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x968, %rsp            # imm = 0x968
movslq 0x38(%rdi), %r13
movq %rdi, 0x10(%rsp)
movq 0x40(%rdi), %rbp
xorl %r14d, %r14d
movabsq $0x700000000, %r15      # imm = 0x700000000
pushq $0x1
popq %rbx
pushq $0x3
popq %rax
movq %rax, 0x30(%rsp)
movl $0x0, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
leaq 0x6(%r14), %rax
cmpq %r13, %rax
jge 0x6111b
movq 0x30(%rbp,%r14,8), %rax
movq 0x8(%rax), %r12
movq %r12, %rdi
leaq 0x58fb1(%rip), %rsi     # 0xba011
callq 0x262f0
testl %eax, %eax
je 0x61082
movq %r12, %rdi
leaq 0x58ee7(%rip), %rsi     # 0xb9f5a
callq 0x262f0
testl %eax, %eax
jne 0x61098
movl %ebx, 0x24(%rsp)
jmp 0x61086
movl %ebx, 0x20(%rsp)
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r15
incq %r14
jmp 0x61040
leaq 0x58af2(%rip), %rsi     # 0xb9b91
movq %r12, %rdi
callq 0x262f0
testl %eax, %eax
je 0x610d4
leaq 0x9925e(%rip), %rax     # 0xfa310
movq 0x80(%rax), %rsi
movq 0x10(%rsp), %rdi
addq $0x968, %rsp            # imm = 0x968
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x36987
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5b5fd
testq %rax, %rax
je 0x61108
leaq 0x58f29(%rip), %rsi     # 0xba016
movq 0x10(%rsp), %rdi
addq $0x968, %rsp            # imm = 0x968
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x36b6f
subl %r14d, %r13d
addl $-0x7, %r13d
sarq $0x20, %r15
movq %r15, 0x30(%rsp)
movl %r13d, %ebx
movq 0x28(%rbp), %rsi
leaq 0x38(%rsp), %rdx
movq 0x10(%rsp), %rbp
movq %rbp, %rdi
xorl %ecx, %ecx
callq 0x3ab5e
testl %eax, %eax
jne 0x617f3
movq 0x40(%rbp), %rax
movq 0x20(%rax), %rsi
leaq 0x60(%rsp), %rdx
movq %rbp, %rdi
xorl %ecx, %ecx
callq 0x3ab5e
testl %eax, %eax
jne 0x617f3
cmpq $0x0, 0x38(%rsp)
jg 0x6116b
movq $0x3e8, 0x38(%rsp)      # imm = 0x3E8
movslq %ebx, %r15
leaq (,%r15,8), %rbx
xorl %r12d, %r12d
xorl %edi, %edi
movq %rbx, %rsi
callq 0x32863
movq %rax, 0x28(%rsp)
xorl %edi, %edi
movq %rbx, %rsi
callq 0x32863
movq %rax, %r14
testl %r15d, %r15d
cmovlel %r12d, %r15d
movq 0x30(%rsp), %r13
movslq %r12d, %rbx
subq $0x1, %r15
jb 0x611df
movq 0x10(%rbp), %rdi
movq 0x40(%rbp), %rax
movq (%rax,%r13,8), %rsi
callq 0x3aebb
movq 0x28(%rsp), %rcx
movq %rax, (%rcx,%rbx,8)
testq %rax, %rax
je 0x611da
movq 0x40(%rbp), %rax
movq (%rax,%r13,8), %rax
movq %rax, (%r14,%rbx,8)
incl %ebx
movl %ebx, %r12d
incq %r13
jmp 0x611a1
testl %r12d, %r12d
je 0x61768
cmpl $0x1, 0x24(%rsp)
pushq $0x5
popq %rax
sbbl $0x0, %eax
movl %eax, 0x6c(%rsp)
xorl %eax, %eax
testl %r12d, %r12d
cmovlel %eax, %r12d
movq %r12, 0x30(%rsp)
movq %rbx, 0x70(%rsp)
leaq 0x8(,%rbx,8), %rax
movq %rax, 0x88(%rsp)
pushq $0x1
popq %rax
movb $0x1, %cl
leaq 0x90(%rsp), %r13
movl $0x0, 0x54(%rsp)
movl %eax, 0xc(%rsp)
movl %ecx, 0x68(%rsp)
movq 0x40(%rbp), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq 0x38(%rsp), %rcx
movq %rbp, %rdi
callq 0x60d05
testq %rax, %rax
je 0x61793
movq %rax, %rbx
callq 0x3114c
movq %r13, %rdi
movq %rax, %rsi
callq 0x66a98
movq 0x8(%rbx), %rax
movq 0x60(%rsp), %rcx
movq %rax, 0x40(%rsp)
movq %rcx, 0x80(%rsp)
cmpq %rcx, %rax
je 0x612cf
movq %r13, %rdi
pushq $0x2a
popq %rsi
pushq $0x2
popq %rdx
callq 0x66bc1
testq %rax, %rax
je 0x618f1
movq %r13, %rdi
leaq 0x58de6(%rip), %rsi     # 0xba08e
pushq $0x6
popq %rdx
callq 0x66c85
testq %rax, %rax
je 0x61927
movq 0x60(%rsp), %rsi
movq %r13, %rdi
callq 0x66ced
testq %rax, %rax
je 0x6190c
movq %rbx, 0x48(%rsp)
xorl %r12d, %r12d
cmpq %r12, 0x30(%rsp)
je 0x6142c
movq 0x10(%rbp), %rdi
movq (%r14,%r12,8), %rsi
callq 0x3c0d3
cmpq $-0x1, %rax
je 0x6130d
movq %rax, %r15
callq 0x2b8ae
subq %rax, %r15
cmpq $0x2, %r15
pushq $0x1
popq %rax
cmovlq %rax, %r15
jmp 0x61310
xorl %r15d, %r15d
movq %r13, %rdi
pushq $0x2a
popq %rsi
movl 0x6c(%rsp), %edx
callq 0x66bc1
testq %rax, %rax
je 0x6185f
leaq 0x98579(%rip), %rax     # 0xf98a8
cmpl $0x0, 0x99c(%rax)
je 0x61354
movq %r13, %rdi
leaq 0x58dc3(%rip), %rsi     # 0xba105
pushq $0xe
popq %rdx
callq 0x66c85
testq %rax, %rax
jne 0x6136f
jmp 0x6187a
movq %r13, %rdi
leaq 0x58de3(%rip), %rsi     # 0xba141
pushq $0x7
popq %rdx
callq 0x66c85
testq %rax, %rax
je 0x618cb
movq (%r14,%r12,8), %rax
movl (%rax), %ecx
shrl $0x4, %ecx
testb $0x7, %cl
jne 0x618b0
movq 0x8(%rax), %rbx
movq %rbx, %rdi
callq 0x5b5fd
movq %r13, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x66c85
testq %rax, %rax
je 0x61805
movq %r13, %rdi
movq %r15, %rsi
callq 0x66ced
testq %rax, %rax
je 0x61823
movq 0x28(%rsp), %rax
movq (%rax,%r12,8), %rsi
leaq 0xf8(%rsp), %rdi
callq 0x609ac
movq 0x138(%rsp), %rbx
movq %rbx, %rdi
callq 0x5b5fd
movq %r13, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x66c85
testq %rax, %rax
je 0x61841
movq 0x138(%rsp), %rdi
callq 0x311c8
cmpl $0x0, 0x24(%rsp)
je 0x61424
movq %r13, %rdi
leaq 0x58e18(%rip), %rsi     # 0xba22b
pushq $0x7
popq %rdx
callq 0x66c85
testq %rax, %rax
je 0x61895
incq %r12
jmp 0x612d7
callq 0x26880
movq %rax, 0x78(%rsp)
andl $0x0, (%rax)
movq 0xd0(%rsp), %rbp
xorl %r12d, %r12d
movq %rbp, %rdi
callq 0x5b5fd
movq %rax, %rbx
movq %rax, %r15
subq %r12, %r15
je 0x61487
movl $0x10000, %eax          # imm = 0x10000
cmpq %rax, %r15
cmovaeq %rax, %r15
movq 0x48(%rsp), %rax
movl (%rax), %edi
leaq (%r12,%rbp), %rsi
movq 0x38(%rsp), %rcx
movq %r15, %rdx
callq 0x5a9e8
cmpl %r15d, %eax
jne 0x614d5
cltq
addq %rax, %r12
jmp 0x61444
movq 0x80(%rsp), %rax
cmpq %rax, 0x40(%rsp)
movq 0x10(%rsp), %rbp
je 0x614c2
movq 0x48(%rsp), %rax
movl (%rax), %edi
movq 0x38(%rsp), %rcx
movl $0x400, %edx            # imm = 0x400
leaq 0x560(%rsp), %rsi
callq 0x5ab2a
testq %rax, %rax
jle 0x616b7
movl 0x20(%rsp), %ebp
testl %ebp, %ebp
je 0x614dd
movq $0x0, 0x58(%rsp)
jmp 0x614ef
xorl %r15d, %r15d
jmp 0x616db
movq 0x88(%rsp), %rdi
callq 0x327b9
movq %rax, 0x58(%rsp)
xorl %r15d, %r15d
movl $0x0, 0xc(%rsp)
pushq $0x1
popq %rax
movl %eax, 0x1c(%rsp)
cmpq %r15, 0x30(%rsp)
je 0x61602
movq 0x48(%rsp), %rax
movl (%rax), %edi
movq 0x38(%rsp), %rcx
movl $0x400, %edx            # imm = 0x400
leaq 0x160(%rsp), %rsi
callq 0x5ab2a
testq %rax, %rax
jle 0x61609
movq 0x80(%rsp), %rax
cmpq %rax, 0x40(%rsp)
setne %cl
cmpb $0x2d, 0x560(%rsp)
sete %al
andb %cl, %al
jne 0x615b6
cmpb $0x2d, 0x160(%rsp)
je 0x615b6
testl %ebp, %ebp
jne 0x615fa
movq 0x10(%rsp), %rbp
movq 0x10(%rbp), %rdi
movq (%r14,%r15,8), %rsi
callq 0x3b1df
movq 0x10(%rbp), %rdi
movl 0x20(%rsp), %ebp
movq (%r14,%r15,8), %rsi
callq 0x3b125
leaq 0x9831a(%rip), %rax     # 0xf98a8
incq 0x720(%rax)
movq (%r14,%r15,8), %rdi
movl 0x1c(%rsp), %ecx
movslq %ecx, %rax
incl %ecx
movl %ecx, 0x1c(%rsp)
movq 0x58(%rsp), %rcx
movq %rdi, (%rcx,%rax,8)
callq 0x39e74
jmp 0x615fa
cmpl $0x0, 0xc(%rsp)
jne 0x615f3
movq 0x48(%rsp), %rcx
orq $-0x1, 0x8(%rcx)
testb %al, %al
leaq 0x160(%rsp), %rdx
leaq 0x560(%rsp), %rax
cmovneq %rax, %rdx
incq %rdx
movq 0x10(%rsp), %rdi
leaq 0x58c6c(%rip), %rsi     # 0xba258
xorl %eax, %eax
callq 0x36b96
pushq $0x1
popq %rax
movl %eax, 0xc(%rsp)
incq %r15
jmp 0x61501
movq 0x30(%rsp), %rax
jmp 0x6160c
movl %r15d, %eax
cmpq 0x70(%rsp), %r15
setl %cl
cmpl $0x0, 0xc(%rsp)
sete %dl
andb %cl, %dl
testl %eax, %eax
setne %al
movl 0x68(%rsp), %ecx
notb %cl
orb %al, %cl
testb $0x1, %cl
jne 0x6163e
testb %dl, %dl
je 0x6163e
movq 0x78(%rsp), %rax
cmpl $0x6e, (%rax)
jne 0x616a4
cmpq 0x70(%rsp), %r15
jge 0x61661
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rsi
movl %edx, %r15d
callq 0x60ed8
movl %r15d, %edx
testl %ebp, %ebp
movq 0x58(%rsp), %r15
jne 0x616cb
movb %dl, 0x40(%rsp)
movl 0x1c(%rsp), %ebp
cmpl $0x2, %ebp
jl 0x616bc
leaq 0x4d906(%rip), %rdi     # 0xaef84
pushq $0x3
popq %rsi
callq 0x39e29
movq %rax, (%r15)
movq 0x10(%rsp), %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x39011
xorl %r15d, %r15d
pushq $0x1
popq %rax
movl %eax, 0x54(%rsp)
jmp 0x616c7
pushq $0x1
popq %rax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rbp
movq 0x58(%rsp), %r15
jmp 0x616e0
xorl %r15d, %r15d
jmp 0x616e0
movq %r15, %rdi
callq 0x328f9
xorl %r15d, %r15d
movb 0x40(%rsp), %dl
testb %dl, %dl
je 0x617a2
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rbp
movq 0xd0(%rsp), %rdi
callq 0x311c8
cmpl $0x0, 0x54(%rsp)
jne 0x61705
movq 0x40(%rbp), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x60ed8
movq %r15, %rdi
callq 0x328f9
cmpl $0x0, 0xc(%rsp)
je 0x61729
xorl %ecx, %ecx
movq 0x78(%rsp), %rax
cmpl $0x6e, (%rax)
movl $0x0, %eax
jne 0x6122f
movq 0x28(%rsp), %rdi
callq 0x328f9
movq %r14, %rdi
callq 0x328f9
callq 0x3114c
cmpq %r12, %rbx
leaq 0x58b6d(%rip), %rcx     # 0xba2b7
leaq 0x58b5e(%rip), %rdx     # 0xba2af
cmoveq %rcx, %rdx
leaq 0x58b23(%rip), %rsi     # 0xba27f
movq %rax, %rdi
xorl %eax, %eax
callq 0x31a38
jmp 0x61786
movq 0x28(%rsp), %rdi
callq 0x328f9
movq %r14, %rdi
callq 0x328f9
leaq 0x588e6(%rip), %rdi     # 0xba067
callq 0x3115a
movq %rbp, %rdi
movq %rax, %rsi
callq 0x36a9d
jmp 0x617f3
movq 0x28(%rsp), %rdi
callq 0x328f9
movq %r14, %rdi
jmp 0x617ee
cmpl $0x0, 0xc(%rsp)
jne 0x617cc
movq 0x60(%rsp), %rax
movq 0x48(%rsp), %rcx
movq %rax, 0x8(%rcx)
leaq 0x98b52(%rip), %rax     # 0xfa310
movq 0x8(%rax), %rsi
movq 0x10(%rsp), %rdi
callq 0x36987
movq 0xd0(%rsp), %rdi
callq 0x311c8
movq 0x28(%rsp), %rdi
callq 0x328f9
movq %r14, %rdi
callq 0x328f9
movq %r15, %rdi
callq 0x328f9
addq $0x968, %rsp            # imm = 0x968
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5897a(%rip), %rdx     # 0xba186
leaq 0x56eea(%rip), %rcx     # 0xb86fd
movq %rbp, %rdi
xorl %esi, %esi
movl $0x129a, %r8d           # imm = 0x129A
jmp 0x618e4
leaq 0x58994(%rip), %rdx     # 0xba1be
leaq 0x56ecc(%rip), %rcx     # 0xb86fd
movq %rbp, %rdi
xorl %esi, %esi
movl $0x129b, %r8d           # imm = 0x129B
jmp 0x618e4
leaq 0x58995(%rip), %rdx     # 0xba1dd
leaq 0x56eae(%rip), %rcx     # 0xb86fd
movq %rbp, %rdi
xorl %esi, %esi
movl $0x12a2, %r8d           # imm = 0x12A2
jmp 0x618e4
leaq 0x58873(%rip), %rdx     # 0xba0d9
leaq 0x56e90(%rip), %rcx     # 0xb86fd
movq %rbp, %rdi
xorl %esi, %esi
movl $0x1292, %r8d           # imm = 0x1292
jmp 0x618e4
leaq 0x58893(%rip), %rdx     # 0xba114
leaq 0x56e75(%rip), %rcx     # 0xb86fd
movq %rbp, %rdi
xorl %esi, %esi
movl $0x1295, %r8d           # imm = 0x1295
jmp 0x618e4
leaq 0x58997(%rip), %rdx     # 0xba233
leaq 0x56e5a(%rip), %rcx     # 0xb86fd
movq %rbp, %rdi
xorl %esi, %esi
movl $0x12a8, %r8d           # imm = 0x12A8
jmp 0x618e4
leaq 0x588b7(%rip), %rdx     # 0xba16e
leaq 0x56e3f(%rip), %rcx     # 0xb86fd
movq %rbp, %rdi
xorl %esi, %esi
movl $0x1298, %r8d           # imm = 0x1298
jmp 0x618e4
leaq 0x58877(%rip), %rdx     # 0xba149
leaq 0x56e24(%rip), %rcx     # 0xb86fd
movq %rbp, %rdi
xorl %esi, %esi
movl $0x1297, %r8d           # imm = 0x1297
callq 0x588a4
pushq $0x1
popq %rdi
callq 0x263c0
leaq 0x58778(%rip), %rdx     # 0xba070
leaq 0x56dfe(%rip), %rcx     # 0xb86fd
movq %rbp, %rdi
xorl %esi, %esi
movl $0x1284, %r8d           # imm = 0x1284
jmp 0x618e4
leaq 0x587a6(%rip), %rdx     # 0xba0b9
leaq 0x56de3(%rip), %rcx     # 0xb86fd
movq %rbp, %rdi
xorl %esi, %esi
movl $0x1286, %r8d           # imm = 0x1286
jmp 0x618e4
leaq 0x58767(%rip), %rdx     # 0xba095
leaq 0x56dc8(%rip), %rcx     # 0xb86fd
movq %rbp, %rdi
xorl %esi, %esi
movl $0x1285, %r8d           # imm = 0x1285
jmp 0x618e4