// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/lua/src/lua_cmsgpack.c
// Function: table_is_an_array
int table_is_an_array(lua_State *L) {
    int count = 0, max = 0;
#if LUA_VERSION_NUM < 503
    lua_Number n;
#else
    lua_Integer n;
#endif

    /* Stack top on function entry */
    int stacktop;

    stacktop = lua_gettop(L);

    lua_pushnil(L);
    while(lua_next(L,-2)) {
        /* Stack: ... key value */
        lua_pop(L,1); /* Stack: ... key */
        /* The <= 0 check is valid here because we're comparing indexes. */
#if LUA_VERSION_NUM < 503
        if ((LUA_TNUMBER != lua_type(L,-1)) || (n = lua_tonumber(L, -1)) <= 0 ||
            !IS_INT_EQUIVALENT(n))
#else
        if (!lua_isinteger(L,-1) || (n = lua_tointeger(L, -1)) <= 0)
#endif
        {
            lua_settop(L, stacktop);
            return 0;
        }
        max = (n > max ? n : max);
        count++;
    }
    /* We have the total number of elements in "count". Also we have
     * the max index encountered in "max". We can't reach this code
     * if there are indexes <= 0. If you also note that there can not be
     * repeated keys into a table, you have that if max==count you are sure
     * that there are all the keys form 1 to count (both included). */
    lua_settop(L, stacktop);
    return max == count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xac540
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0xad2c0
movq -0x10(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xae690
cmpl $0x0, %eax
je 0xccdfe
movq -0x10(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xac570
movq -0x10(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xacaa0
movl %eax, %ecx
movl $0x3, %eax
cmpl %ecx, %eax
jne 0xccda9
movq -0x10(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xace10
movaps %xmm0, %xmm1
movsd %xmm1, -0x20(%rbp)
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jae 0xccda9
movsd -0x20(%rbp), %xmm1
movaps %xmm1, %xmm0
movaps 0x6dcb5(%rip), %xmm2    # 0x13aa10
pand %xmm2, %xmm0
movq %xmm1, %rdx
movl $0x1, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x0, %rdx
cmovll %eax, %ecx
movsd 0x6dc83(%rip), %xmm1    # 0x13aa00
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setnp %sil
sete %dl
testb %sil, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
jne 0xccda9
cvttsd2si -0x20(%rbp), %eax
cvtsi2sd %eax, %xmm0
ucomisd -0x20(%rbp), %xmm0
jne 0xccda9
jp 0xccda9
jmp 0xccdbe
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0xac570
movl $0x0, -0x4(%rbp)
jmp 0xcce1b
movsd -0x20(%rbp), %xmm0
cvtsi2sdl -0x18(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xccdda
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0xccde4
cvtsi2sdl -0x18(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xcccef
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0xac570
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)