// File: /workspace/github_c_makefile_star2_O0/kieselsteini[P]PiXL-old/lua53.c
// Function: luaH_resize
void luaH_resize (lua_State *L, Table *t, unsigned int nasize,
                                          unsigned int nhsize) {
  unsigned int i;
  int j;
  unsigned int oldasize = t->sizearray;
  int oldhsize = allocsizenode(t);
  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]))
        luaH_setint(L, t, i + 1, &t->array[i]);
    }
    /* shrink array */
    luaM_reallocvector(L, t->array, oldasize, nasize, TValue);
  }
  /* re-insert elements from hash part */
  for (j = oldhsize - 1; j >= 0; j--) {
    Node *old = nold + j;
    if (!ttisnil(gval(old))) {
      /* doesn't need barrier/invalidate cache, as entry was
         already present in the table */
      setobjt2t(L, luaH_set(L, t, gkey(old)), gval(old));
    }
  }
  if (oldhsize > 0)  /* not the dummy node? */
    luaM_freearray(L, nold, cast(size_t, oldhsize)); /* free old hash */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0xa982
xorl %eax, %eax
movl %eax, -0x44(%rbp)
jmp 0xa994
movq -0x10(%rbp), %rax
movzbl 0xb(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jbe 0xa9be
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x1e830
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %edx
callq 0x1e8c0
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0xaa6e
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0xaa40
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0xaa33
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movl -0x1c(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rcx
callq 0xb960
jmp 0xaa35
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa9ea
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x24(%rbp), %eax
movl %eax, %edx
shlq $0x4, %rdx
movl -0x14(%rbp), %eax
movl %eax, %ecx
shlq $0x4, %rcx
callq 0x14540
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x28(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jl 0xab3a
movq -0x30(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0xab2a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq $0x10, %rdx
callq 0xb850
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xab24
movq -0x40(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x3f, %eax
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jne 0xab26
cmpq $0x0, -0x8(%rbp)
je 0xab24
movq -0x40(%rbp), %rax
movq (%rax), %rax
movzbl 0x9(%rax), %eax
xorl $0x3, %eax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movzbl 0x54(%rcx), %ecx
xorl $0x3, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xab26
jmp 0xab28
jmp 0xab28
jmp 0xab2a
jmp 0xab2c
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xaa77
cmpl $0x0, -0x28(%rbp)
jle 0xab59
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movslq -0x28(%rbp), %rdx
shlq $0x5, %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x14540
addq $0x50, %rsp
popq %rbp
retq
nop