// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/scripting.c
// Function: luaRedisGenericCommand
int luaRedisGenericCommand(lua_State *lua, int raise_error) {
    int j, argc = lua_gettop(lua);
    struct redisCommand *cmd;
    client *c = server.lua_client;
    sds reply;

    /* Cached across calls. */
    static robj **argv = NULL;
    static int argv_size = 0;
    static robj *cached_objects[LUA_CMD_OBJCACHE_SIZE];
    static size_t cached_objects_len[LUA_CMD_OBJCACHE_SIZE];
    static int inuse = 0;   /* Recursive calls detection. */

    /* By using Lua debug hooks it is possible to trigger a recursive call
     * to luaRedisGenericCommand(), which normally should never happen.
     * To make this function reentrant is futile and makes it slower, but
     * we should at least detect such a misuse, and abort. */
    if (inuse) {
        char *recursion_warning =
            "luaRedisGenericCommand() recursive call detected. "
            "Are you doing funny stuff with Lua debug hooks?";
        serverLog(LL_WARNING,"%s",recursion_warning);
        luaPushError(lua,recursion_warning);
        return 1;
    }
    inuse++;

    /* Require at least one argument */
    if (argc == 0) {
        luaPushError(lua,
            "Please specify at least one argument for redis.call()");
        inuse--;
        return raise_error ? luaRaiseError(lua) : 1;
    }

    /* Build the arguments vector */
    if (argv_size < argc) {
        argv = zrealloc(argv,sizeof(robj*)*argc);
        argv_size = argc;
    }

    for (j = 0; j < argc; j++) {
        char *obj_s;
        size_t obj_len;
        char dbuf[64];

        if (lua_type(lua,j+1) == LUA_TNUMBER) {
            /* We can't use lua_tolstring() for number -> string conversion
             * since Lua uses a format specifier that loses precision. */
            lua_Number num = lua_tonumber(lua,j+1);

            obj_len = snprintf(dbuf,sizeof(dbuf),"%.17g",(double)num);
            obj_s = dbuf;
        } else {
            obj_s = (char*)lua_tolstring(lua,j+1,&obj_len);
            if (obj_s == NULL) break; /* Not a string. */
        }

        /* Try to use a cached object. */
        if (j < LUA_CMD_OBJCACHE_SIZE && cached_objects[j] &&
            cached_objects_len[j] >= obj_len)
        {
            sds s = cached_objects[j]->ptr;
            argv[j] = cached_objects[j];
            cached_objects[j] = NULL;
            memcpy(s,obj_s,obj_len+1);
            sdssetlen(s, obj_len);
        } else {
            argv[j] = createStringObject(obj_s, obj_len);
        }
    }

    /* Check if one of the arguments passed by the Lua script
     * is not a string or an integer (lua_isstring() return true for
     * integers as well). */
    if (j != argc) {
        j--;
        while (j >= 0) {
            decrRefCount(argv[j]);
            j--;
        }
        luaPushError(lua,
            "Lua redis() command arguments must be strings or integers");
        inuse--;
        return raise_error ? luaRaiseError(lua) : 1;
    }

    /* Setup our fake client for command execution */
    c->argv = argv;
    c->argc = argc;

    /* Log the command if debugging is active. */
    if (ldb.active && ldb.step) {
        sds cmdlog = sdsnew("<redis>");
        for (j = 0; j < c->argc; j++) {
            if (j == 10) {
                cmdlog = sdscatprintf(cmdlog," ... (%d more)",
                    c->argc-j-1);
                break;
            } else {
                cmdlog = sdscatlen(cmdlog," ",1);
                cmdlog = sdscatsds(cmdlog,c->argv[j]->ptr);
            }
        }
        ldbLog(cmdlog);
    }

    /* Command lookup */
    cmd = lookupCommand(argv[0]->ptr);
    if (!cmd || ((cmd->arity > 0 && cmd->arity != argc) ||
                   (argc < -cmd->arity)))
    {
        if (cmd)
            luaPushError(lua,
                "Wrong number of args calling Redis command From Lua script");
        else
            luaPushError(lua,"Unknown Redis command called from Lua script");
        goto cleanup;
    }
    c->cmd = c->lastcmd = cmd;

    /* There are commands that are not allowed inside scripts. */
    if (cmd->flags & CMD_NOSCRIPT) {
        luaPushError(lua, "This Redis command is not allowed from scripts");
        goto cleanup;
    }

    /* Write commands are forbidden against read-only slaves, or if a
     * command marked as non-deterministic was already called in the context
     * of this script. */
    if (cmd->flags & CMD_WRITE) {
        if (server.lua_random_dirty && !server.lua_replicate_commands) {
            luaPushError(lua,
                "Write commands not allowed after non deterministic commands. Call redis.replicate_commands() at the start of your script in order to switch to single commands replication mode.");
            goto cleanup;
        } else if (server.masterhost && server.repl_slave_ro &&
                   !server.loading &&
                   !(server.lua_caller->flags & CLIENT_MASTER))
        {
            luaPushError(lua, shared.roslaveerr->ptr);
            goto cleanup;
        } else if (server.stop_writes_on_bgsave_err &&
                   server.saveparamslen > 0 &&
                   server.lastbgsave_status == C_ERR)
        {
            luaPushError(lua, shared.bgsaveerr->ptr);
            goto cleanup;
        }
    }

    /* If we reached the memory limit configured via maxmemory, commands that
     * could enlarge the memory usage are not allowed, but only if this is the
     * first write in the context of this script, otherwise we can't stop
     * in the middle. */
    if (server.maxmemory && server.lua_write_dirty == 0 &&
        (cmd->flags & CMD_DENYOOM))
    {
        if (freeMemoryIfNeeded() == C_ERR) {
            luaPushError(lua, shared.oomerr->ptr);
            goto cleanup;
        }
    }

    if (cmd->flags & CMD_RANDOM) server.lua_random_dirty = 1;
    if (cmd->flags & CMD_WRITE) server.lua_write_dirty = 1;

    /* If this is a Redis Cluster node, we need to make sure Lua is not
     * trying to access non-local keys, with the exception of commands
     * received from our master or when loading the AOF back in memory. */
    if (server.cluster_enabled && !server.loading &&
        !(server.lua_caller->flags & CLIENT_MASTER))
    {
        /* Duplicate relevant flags in the lua client. */
        c->flags &= ~(CLIENT_READONLY|CLIENT_ASKING);
        c->flags |= server.lua_caller->flags & (CLIENT_READONLY|CLIENT_ASKING);
        if (getNodeByQuery(c,c->cmd,c->argv,c->argc,NULL,NULL) !=
                           server.cluster->myself)
        {
            luaPushError(lua,
                "Lua script attempted to access a non local key in a "
                "cluster node");
            goto cleanup;
        }
    }

    /* If we are using single commands replication, we need to wrap what
     * we propagate into a MULTI/EXEC block, so that it will be atomic like
     * a Lua script in the context of AOF and slaves. */
    if (server.lua_replicate_commands &&
        !server.lua_multi_emitted &&
        server.lua_write_dirty &&
        server.lua_repl != PROPAGATE_NONE)
    {
        execCommandPropagateMulti(server.lua_caller);
        server.lua_multi_emitted = 1;
    }

    /* Run the command */
    int call_flags = CMD_CALL_SLOWLOG | CMD_CALL_STATS;
    if (server.lua_replicate_commands) {
        /* Set flags according to redis.set_repl() settings. */
        if (server.lua_repl & PROPAGATE_AOF)
            call_flags |= CMD_CALL_PROPAGATE_AOF;
        if (server.lua_repl & PROPAGATE_REPL)
            call_flags |= CMD_CALL_PROPAGATE_REPL;
    }
    call(c,call_flags);

    /* Convert the result of the Redis command into a suitable Lua type.
     * The first thing we need is to create a single string from the client
     * output buffers. */
    if (listLength(c->reply) == 0 && c->bufpos < PROTO_REPLY_CHUNK_BYTES) {
        /* This is a fast path for the common case of a reply inside the
         * client static buffer. Don't create an SDS string but just use
         * the client buffer directly. */
        c->buf[c->bufpos] = '\0';
        reply = c->buf;
        c->bufpos = 0;
    } else {
        reply = sdsnewlen(c->buf,c->bufpos);
        c->bufpos = 0;
        while(listLength(c->reply)) {
            robj *o = listNodeValue(listFirst(c->reply));

            reply = sdscatlen(reply,o->ptr,sdslen(o->ptr));
            listDelNode(c->reply,listFirst(c->reply));
        }
    }
    if (raise_error && reply[0] != '-') raise_error = 0;
    redisProtocolToLuaType(lua,reply);

    /* If the debugger is active, log the reply from Redis. */
    if (ldb.active && ldb.step)
        ldbLogRedisReply(reply);

    /* Sort the output array if needed, assuming it is a non-null multi bulk
     * reply as expected. */
    if ((cmd->flags & CMD_SORT_FOR_SCRIPT) &&
        (server.lua_replicate_commands == 0) &&
        (reply[0] == '*' && reply[1] != '-')) {
            luaSortArray(lua);
    }
    if (reply != c->buf) sdsfree(reply);
    c->reply_bytes = 0;

cleanup:
    /* Clean up. Command code may have changed argv/argc so we use the
     * argv/argc of the client instead of the local variables. */
    for (j = 0; j < c->argc; j++) {
        robj *o = c->argv[j];

        /* Try to cache the object in the cached_objects array.
         * The object must be small, SDS-encoded, and with refcount = 1
         * (we must be the only owner) for us to cache it. */
        if (j < LUA_CMD_OBJCACHE_SIZE &&
            o->refcount == 1 &&
            (o->encoding == OBJ_ENCODING_RAW ||
             o->encoding == OBJ_ENCODING_EMBSTR) &&
            sdslen(o->ptr) <= LUA_CMD_OBJCACHE_MAX_LEN)
        {
            sds s = o->ptr;
            if (cached_objects[j]) decrRefCount(cached_objects[j]);
            cached_objects[j] = o;
            cached_objects_len[j] = sdsalloc(s);
        } else {
            decrRefCount(o);
        }
    }

    if (c->argv != argv) {
        zfree(c->argv);
        argv = NULL;
        argv_size = 0;
    }

    if (raise_error) {
        /* If we are here we should have an error in the stack, in the
         * form of a table with an "err" field. Extract the string to
         * return the plain error. */
        inuse--;
        return luaRaiseError(lua);
    }
    inuse--;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0xac540
movl %eax, -0x1c(%rbp)
leaq 0xef7d3(%rip), %rax     # 0x1781d8
movq 0x9d0(%rax), %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, 0x1044e9(%rip)    # 0x18cf00
je 0x88a54
leaq 0xbae7e(%rip), %rax     # 0x14389e
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdx
movl $0x3, %edi
leaq 0xbdc52(%rip), %rsi     # 0x146686
movb $0x0, %al
callq 0x2fc60
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x88420
movl $0x1, -0x4(%rbp)
jmp 0x89512
movl 0x1044a6(%rip), %eax    # 0x18cf00
addl $0x1, %eax
movl %eax, 0x10449d(%rip)    # 0x18cf00
cmpl $0x0, -0x1c(%rbp)
jne 0x88aba
movq -0x10(%rbp), %rdi
leaq 0xbae8c(%rip), %rsi     # 0x143900
callq 0x88420
movl 0x104481(%rip), %eax    # 0x18cf00
addl $-0x1, %eax
movl %eax, 0x104478(%rip)    # 0x18cf00
cmpl $0x0, -0x14(%rbp)
je 0x88a9f
movq -0x10(%rbp), %rdi
callq 0x88560
movl %eax, -0xcc(%rbp)
jmp 0x88aac
movl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x88aac
movl -0xcc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x89512
movl 0x104238(%rip), %eax    # 0x18ccf8
cmpl -0x1c(%rbp), %eax
jge 0x88ae9
movq 0x104224(%rip), %rdi    # 0x18ccf0
movslq -0x1c(%rbp), %rsi
shlq $0x3, %rsi
callq 0x3ae40
movq %rax, 0x104210(%rip)    # 0x18ccf0
movl -0x1c(%rbp), %eax
movl %eax, 0x10420f(%rip)    # 0x18ccf8
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x88c5a
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
addl $0x1, %esi
callq 0xacaa0
cmpl $0x3, %eax
jne 0x88b5c
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
addl $0x1, %esi
callq 0xace10
movsd %xmm0, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
movsd -0x98(%rbp), %xmm0
movl $0x40, %esi
leaq 0xb1f4d(%rip), %rdx     # 0x13aa8f
movb $0x1, %al
callq 0x26120
cltq
movq %rax, -0x50(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x88b81
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
addl $0x1, %esi
leaq -0x50(%rbp), %rdx
callq 0xacf60
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x88b7f
jmp 0x88c5a
jmp 0x88b81
cmpl $0x20, -0x18(%rbp)
jge 0x88c2b
movslq -0x18(%rbp), %rcx
leaq 0x10416a(%rip), %rax    # 0x18cd00
cmpq $0x0, (%rax,%rcx,8)
je 0x88c2b
movslq -0x18(%rbp), %rcx
leaq 0x104254(%rip), %rax    # 0x18ce00
movq (%rax,%rcx,8), %rax
cmpq -0x50(%rbp), %rax
jb 0x88c2b
movslq -0x18(%rbp), %rcx
leaq 0x10413f(%rip), %rax    # 0x18cd00
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq %rax, -0xa0(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0x104125(%rip), %rax    # 0x18cd00
movq (%rax,%rcx,8), %rdx
movq 0x10410a(%rip), %rax    # 0x18ccf0
movslq -0x18(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movslq -0x18(%rbp), %rcx
leaq 0x104107(%rip), %rax    # 0x18cd00
movq $0x0, (%rax,%rcx,8)
movq -0xa0(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq $0x1, %rdx
callq 0x26c60
movq -0xa0(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x89520
jmp 0x88c4a
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x486a0
movq %rax, %rdx
movq 0x1040ae(%rip), %rax    # 0x18ccf0
movslq -0x18(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x88c4c
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x88af0
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
je 0x88ce1
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x88c90
movq 0x104078(%rip), %rax    # 0x18ccf0
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x48f70
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x88c6b
movq -0x10(%rbp), %rdi
leaq 0xbac9b(%rip), %rsi     # 0x143936
callq 0x88420
movl 0x10425a(%rip), %eax    # 0x18cf00
addl $-0x1, %eax
movl %eax, 0x104251(%rip)    # 0x18cf00
cmpl $0x0, -0x14(%rbp)
je 0x88cc6
movq -0x10(%rbp), %rdi
callq 0x88560
movl %eax, -0xd0(%rbp)
jmp 0x88cd3
movl $0x1, %eax
movl %eax, -0xd0(%rbp)
jmp 0x88cd3
movl -0xd0(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x89512
movq 0x104008(%rip), %rcx    # 0x18ccf0
movq -0x30(%rbp), %rax
movq %rcx, 0x40(%rax)
movl -0x1c(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x38(%rax)
cmpl $0x0, 0x103e93(%rip)    # 0x18cb94
je 0x88dd1
cmpl $0x0, 0x103fae(%rip)    # 0x18ccbc
je 0x88dd1
leaq 0xbac55(%rip), %rdi     # 0x143970
callq 0x38510
movq %rax, -0xa8(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x88dc5
cmpl $0xa, -0x18(%rbp)
jne 0x88d6f
movq -0xa8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl 0x38(%rax), %edx
subl -0x18(%rbp), %edx
subl $0x1, %edx
leaq 0xbac19(%rip), %rsi     # 0x143978
movb $0x0, %al
callq 0x395b0
movq %rax, -0xa8(%rbp)
jmp 0x88dc5
movq -0xa8(%rbp), %rdi
leaq 0xb63cc(%rip), %rsi     # 0x13f149
movl $0x1, %edx
callq 0x39040
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rsi
callq 0x39110
movq %rax, -0xa8(%rbp)
jmp 0x88db7
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x88d2e
movq -0xa8(%rbp), %rdi
callq 0x88530
movq 0x103f18(%rip), %rax    # 0x18ccf0
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x33b00
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x88e15
movq -0x28(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jle 0x88e05
movq -0x28(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x88e15
movl -0x1c(%rbp), %eax
movq -0x28(%rbp), %rdx
xorl %ecx, %ecx
subl 0x10(%rdx), %ecx
cmpl %ecx, %eax
jge 0x88e43
cmpq $0x0, -0x28(%rbp)
je 0x88e2e
movq -0x10(%rbp), %rdi
leaq 0xbab60(%rip), %rsi     # 0x143987
callq 0x88420
jmp 0x88e3e
movq -0x10(%rbp), %rdi
leaq 0xbab89(%rip), %rsi     # 0x1439c2
callq 0x88420
jmp 0x89391
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x30(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x88e7b
movq -0x10(%rbp), %rdi
leaq 0xbab7e(%rip), %rsi     # 0x1439ef
callq 0x88420
jmp 0x89391
movq -0x28(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x88f86
leaq 0xef343(%rip), %rax     # 0x1781d8
cmpl $0x0, 0x9fc(%rax)
je 0x88ec3
leaq 0xef333(%rip), %rax     # 0x1781d8
cmpl $0x0, 0xa00(%rax)
jne 0x88ec3
movq -0x10(%rbp), %rdi
leaq 0xbab65(%rip), %rsi     # 0x143a1e
callq 0x88420
jmp 0x89391
leaq 0xef30e(%rip), %rax     # 0x1781d8
cmpq $0x0, 0x828(%rax)
je 0x88f30
leaq 0xef2fd(%rip), %rax     # 0x1781d8
cmpl $0x0, 0x884(%rax)
je 0x88f30
leaq 0xef2ed(%rip), %rax     # 0x1781d8
cmpl $0x0, 0x31c(%rax)
jne 0x88f30
leaq 0xef2dd(%rip), %rax     # 0x1781d8
movq 0x9d8(%rax), %rax
movl 0x98(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x88f30
movq -0x10(%rbp), %rdi
leaq 0xefd25(%rip), %rax     # 0x178c40
movq 0xc0(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x88420
jmp 0x89391
leaq 0xef2a1(%rip), %rax     # 0x1781d8
cmpl $0x0, 0x784(%rax)
je 0x88f80
leaq 0xef291(%rip), %rax     # 0x1781d8
cmpl $0x0, 0x740(%rax)
jle 0x88f80
leaq 0xef281(%rip), %rax     # 0x1781d8
cmpl $-0x1, 0x780(%rax)
jne 0x88f80
movq -0x10(%rbp), %rdi
leaq 0xefcd5(%rip), %rax     # 0x178c40
movq 0xb0(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x88420
jmp 0x89391
jmp 0x88f82
jmp 0x88f84
jmp 0x88f86
leaq 0xef24b(%rip), %rax     # 0x1781d8
cmpq $0x0, 0x908(%rax)
je 0x88fe2
leaq 0xef23a(%rip), %rax     # 0x1781d8
cmpl $0x0, 0x9f8(%rax)
jne 0x88fe2
movq -0x28(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x88fe2
callq 0x34910
cmpl $-0x1, %eax
jne 0x88fe0
movq -0x10(%rbp), %rdi
leaq 0xefc75(%rip), %rax     # 0x178c40
movq 0xe8(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x88420
jmp 0x89391
jmp 0x88fe2
movq -0x28(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x89004
leaq 0xef1de(%rip), %rax     # 0x1781d8
movl $0x1, 0x9fc(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x89024
leaq 0xef1be(%rip), %rax     # 0x1781d8
movl $0x1, 0x9f8(%rax)
leaq 0xef1ad(%rip), %rax     # 0x1781d8
cmpl $0x0, 0x99c(%rax)
je 0x890fe
leaq 0xef199(%rip), %rax     # 0x1781d8
cmpl $0x0, 0x31c(%rax)
jne 0x890fe
leaq 0xef185(%rip), %rax     # 0x1781d8
movq 0x9d8(%rax), %rax
movl 0x98(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x890fe
movq -0x30(%rbp), %rax
movl 0x98(%rax), %ecx
andl $0xfffdfdff, %ecx       # imm = 0xFFFDFDFF
movl %ecx, 0x98(%rax)
leaq 0xef14f(%rip), %rax     # 0x1781d8
movq 0x9d8(%rax), %rax
movl 0x98(%rax), %ecx
andl $0x20200, %ecx          # imm = 0x20200
movq -0x30(%rbp), %rax
orl 0x98(%rax), %ecx
movl %ecx, 0x98(%rax)
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rdx
movq -0x30(%rbp), %rax
movl 0x38(%rax), %ecx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x86e10
leaq 0xef0fd(%rip), %rcx     # 0x1781d8
movq 0x9b0(%rcx), %rcx
cmpq (%rcx), %rax
je 0x890fc
movq -0x10(%rbp), %rdi
leaq 0xba9dd(%rip), %rsi     # 0x143acf
callq 0x88420
jmp 0x89391
jmp 0x890fe
leaq 0xef0d3(%rip), %rax     # 0x1781d8
cmpl $0x0, 0xa00(%rax)
je 0x89162
leaq 0xef0c3(%rip), %rax     # 0x1781d8
cmpl $0x0, 0xa04(%rax)
jne 0x89162
leaq 0xef0b3(%rip), %rax     # 0x1781d8
cmpl $0x0, 0x9f8(%rax)
je 0x89162
leaq 0xef0a3(%rip), %rax     # 0x1781d8
cmpl $0x0, 0xa08(%rax)
je 0x89162
leaq 0xef093(%rip), %rax     # 0x1781d8
movq 0x9d8(%rax), %rdi
callq 0x75bb0
leaq 0xef080(%rip), %rax     # 0x1781d8
movl $0x1, 0xa04(%rax)
movl $0x3, -0xac(%rbp)
leaq 0xef065(%rip), %rax     # 0x1781d8
cmpl $0x0, 0xa00(%rax)
je 0x891c6
leaq 0xef055(%rip), %rax     # 0x1781d8
movl 0xa08(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x891a0
movl -0xac(%rbp), %eax
orl $0x4, %eax
movl %eax, -0xac(%rbp)
leaq 0xef031(%rip), %rax     # 0x1781d8
movl 0xa08(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x891c4
movl -0xac(%rbp), %eax
orl $0x8, %eax
movl %eax, -0xac(%rbp)
jmp 0x891c6
movq -0x30(%rbp), %rdi
movl -0xac(%rbp), %esi
callq 0x33d50
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rax
cmpq $0x0, 0x28(%rax)
jne 0x8922c
movq -0x30(%rbp), %rax
cmpl $0x4000, 0x1c0(%rax)    # imm = 0x4000
jge 0x8922c
movq -0x30(%rbp), %rax
movq -0x30(%rbp), %rcx
movslq 0x1c0(%rcx), %rcx
movb $0x0, 0x1c4(%rax,%rcx)
movq -0x30(%rbp), %rax
addq $0x1c4, %rax            # imm = 0x1C4
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movl $0x0, 0x1c0(%rax)
jmp 0x892e4
movq -0x30(%rbp), %rdi
addq $0x1c4, %rdi            # imm = 0x1C4
movq -0x30(%rbp), %rax
movslq 0x1c0(%rax), %rsi
callq 0x38230
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movl $0x0, 0x1c0(%rax)
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x892e2
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xd8(%rbp)
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x895c0
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movq %rax, %rdx
callq 0x39040
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rsi
callq 0x271e0
jmp 0x89259
jmp 0x892e4
cmpl $0x0, -0x14(%rbp)
je 0x892fd
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x892fd
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x88070
cmpl $0x0, 0x103883(%rip)    # 0x18cb94
je 0x89325
cmpl $0x0, 0x1039a2(%rip)    # 0x18ccbc
je 0x89325
movq -0x38(%rbp), %rdi
callq 0x89650
movq -0x28(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x89368
leaq 0xeee9b(%rip), %rax     # 0x1781d8
cmpl $0x0, 0xa00(%rax)
jne 0x89368
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x89368
movq -0x38(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
je 0x89368
movq -0x10(%rbp), %rdi
callq 0x885a0
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
addq $0x1c4, %rcx            # imm = 0x1C4
cmpq %rcx, %rax
je 0x89385
movq -0x38(%rbp), %rdi
callq 0x38620
movq -0x30(%rbp), %rax
movq $0x0, 0x70(%rax)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x894a6
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xc0(%rbp)
cmpl $0x20, -0x18(%rbp)
jge 0x8948a
movq -0xc0(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0x8948a
movq -0xc0(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x89406
movq -0xc0(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x8948a
movq -0xc0(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x895c0
cmpq $0x40, %rax
ja 0x8948a
movq -0xc0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xc8(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0x1038c7(%rip), %rax    # 0x18cd00
cmpq $0x0, (%rax,%rcx,8)
je 0x89454
movslq -0x18(%rbp), %rcx
leaq 0x1038b5(%rip), %rax    # 0x18cd00
movq (%rax,%rcx,8), %rdi
callq 0x48f70
movq -0xc0(%rbp), %rdx
movslq -0x18(%rbp), %rcx
leaq 0x10389a(%rip), %rax    # 0x18cd00
movq %rdx, (%rax,%rcx,8)
movq -0xc8(%rbp), %rdi
callq 0x89690
movq %rax, %rdx
movslq -0x18(%rbp), %rcx
leaq 0x10397c(%rip), %rax    # 0x18ce00
movq %rdx, (%rax,%rcx,8)
jmp 0x89496
movq -0xc0(%rbp), %rdi
callq 0x48f70
jmp 0x89498
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x89398
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
cmpq 0x10383b(%rip), %rax    # 0x18ccf0
je 0x894d9
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x3afa0
movq $0x0, 0x103821(%rip) # 0x18ccf0
movl $0x0, 0x10381f(%rip)    # 0x18ccf8
cmpl $0x0, -0x14(%rbp)
je 0x894fc
movl 0x103a1b(%rip), %eax    # 0x18cf00
addl $-0x1, %eax
movl %eax, 0x103a12(%rip)    # 0x18cf00
movq -0x10(%rbp), %rdi
callq 0x88560
movl %eax, -0x4(%rbp)
jmp 0x89512
movl 0x1039fe(%rip), %eax    # 0x18cf00
addl $-0x1, %eax
movl %eax, 0x1039f5(%rip)    # 0x18cf00
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nop