// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/lua/src/ltable.c
// Function: resize
static void resize (lua_State *L, Table *t, int nasize, int nhsize) {
  int i;
  int oldasize = t->sizearray;
  int oldhsize = t->lsizenode;
  Node *nold = t->node;  /* save old hash ... */
  if (nasize > oldasize)  /* array part must grow? */
    setarrayvector(L, t, nasize);
  /* create new hash part with appropriate size */
  setnodevector(L, t, nhsize);  
  if (nasize < oldasize) {  /* array part must shrink? */
    t->sizearray = nasize;
    /* re-insert elements from vanishing slice */
    for (i=nasize; i<oldasize; i++) {
      if (!ttisnil(&t->array[i]))
        setobjt2t(L, luaH_setnum(L, t, i+1), &t->array[i]);
    }
    /* shrink array */
    luaM_reallocvector(L, t->array, oldasize, nasize, TValue);
  }
  /* re-insert elements from hash part */
  for (i = twoto(oldhsize) - 1; i >= 0; i--) {
    Node *old = nold+i;
    if (!ttisnil(gval(old)))
      setobjt2t(L, luaH_set(L, t, key2tval(old)), gval(old));
  }
  if (nold != dummynode)
    luaM_freearray(L, nold, twoto(oldhsize), Node);  /* free old array */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl 0xb(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x147af
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x14a10
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %edx
callq 0x14ad0
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x148aa
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x38(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x14853
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0x14846
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
addl $0x1, %edx
callq 0x15330
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x14848
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x147db
movl -0x14(%rbp), %eax
addl $0x1, %eax
cltq
movabsq $0xfffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFFF
cmpq %rcx, %rax
ja 0x14891
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movslq -0x20(%rbp), %rdx
shlq $0x4, %rdx
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
callq 0xf470
movq %rax, -0x60(%rbp)
jmp 0x1489e
movq -0x8(%rbp), %rdi
callq 0xf500
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x24(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jl 0x14927
movq -0x30(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x1491a
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq $0x10, %rdx
callq 0x150e0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x1491c
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x148ba
leaq 0x172f2(%rip), %rax     # 0x2bc20
cmpq %rax, -0x30(%rbp)
je 0x14955
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x24(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
cltq
imulq $0x28, %rax, %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0xf470
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)