// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r13d
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movl 0xc(%rsi), %r12d
cmpq $0x0, 0x20(%rsi)
je 0x955a
movb 0xb(%r15), %cl
movl $0x1, %eax
shll %cl, %eax
movl %eax, 0x4(%rsp)
jmp 0x9562
movl $0x0, 0x4(%rsp)
movq 0x18(%r15), %rax
movq %rax, 0x8(%rsp)
cmpl %ebp, %r12d
jae 0x95ba
movq 0x10(%r15), %rsi
movq %r12, %rdx
shlq $0x4, %rdx
movl %ebp, %r14d
movq %r14, %rcx
shlq $0x4, %rcx
movq %rbx, %rdi
callq 0xfa30
movq %rax, 0x10(%r15)
movl 0xc(%r15), %ecx
cmpl %ebp, %ecx
jae 0x95b6
subq %rcx, %r14
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x8, %rax
movl $0x0, (%rax)
addq $0x10, %rax
decq %r14
jne 0x95a7
movl %ebp, 0xc(%r15)
testl %r13d, %r13d
movq %r12, 0x10(%rsp)
je 0x95eb
decl %r13d
xorl %eax, %eax
cmpl $0x100, %r13d           # imm = 0x100
jb 0x9600
xorl %eax, %eax
movl %r13d, %ecx
addl $0x8, %eax
shrl $0x8, %ecx
cmpl $0xffff, %r13d          # imm = 0xFFFF
movl %ecx, %r13d
ja 0x95d7
jmp 0x9603
leaq 0x266de(%rip), %rax     # 0x2fcd0
movq %rax, 0x18(%r15)
movb $0x0, 0xb(%r15)
xorl %r12d, %r12d
jmp 0x966f
movl %r13d, %ecx
movl %ecx, %ecx
leaq 0x26494(%rip), %rdx     # 0x2faa0
movzbl (%rcx,%rdx), %r13d
addl %eax, %r13d
cmpl $0x1f, %r13d
jge 0x9772
movl $0x1, %r14d
movl %r13d, %ecx
shll %cl, %r14d
movq %r14, %r12
shlq $0x5, %r12
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r12, %rcx
callq 0xfa30
movq %rax, 0x18(%r15)
movl $0x1c, %eax
movq 0x18(%r15), %rcx
movq $0x0, -0x4(%rcx,%rax)
movl $0x0, -0x14(%rcx,%rax)
addq $0x20, %rax
decq %r14
jne 0x9649
movb %r13b, 0xb(%r15)
addq 0x18(%r15), %r12
movq %r12, 0x20(%r15)
movq 0x10(%rsp), %rax
cmpl %ebp, %eax
jbe 0x96e5
movl %ebp, 0xc(%r15)
movl %ebp, %r13d
leaq 0x1(%r13), %r14
movq %rax, %rbp
movq %r13, %r12
shlq $0x4, %r12
negq %rbp
movq 0x10(%r15), %rcx
cmpl $0x0, 0x8(%rcx,%r12)
je 0x96b1
addq %r12, %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x9dc2
addq $0x10, %r12
leaq (%r14,%rbp), %rax
incq %rax
incq %r14
cmpq $0x1, %rax
jne 0x9694
movq 0x10(%r15), %rsi
movq 0x10(%rsp), %rdx
shlq $0x4, %rdx
shlq $0x4, %r13
movq %rbx, %rdi
movq %r13, %rcx
callq 0xfa30
movq %rax, 0x10(%r15)
movl 0x4(%rsp), %eax
movl %eax, %r12d
testl %eax, %eax
jle 0x9736
leaq 0x1(%r12), %r13
movq %r12, %rax
shlq $0x5, %rax
movq 0x8(%rsp), %rcx
leaq (%rax,%rcx), %r14
addq $-0x10, %r14
cmpl $0x0, -0x8(%r14)
je 0x9729
leaq -0x10(%r14), %rbp
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x9d19
movups (%rbp), %xmm0
movups %xmm0, (%rax)
decq %r13
addq $-0x20, %r14
cmpq $0x1, %r13
jg 0x9709
cmpl $0x0, 0x4(%rsp)
jle 0x9763
shlq $0x5, %r12
movq 0x18(%rbx), %rbx
movq 0x8(%rbx), %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq *(%rbx)
testq %r14, %r14
cmoveq %r14, %r12
subq %r12, 0x18(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x282aa(%rip), %rsi     # 0x31a23
movq %rbx, %rdi
xorl %eax, %eax
callq 0xf158