// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/lua/src/lgc.c
// Function: traversetable
static int traversetable (global_State *g, Table *h) {
  int i;
  int weakkey = 0;
  int weakvalue = 0;
  const TValue *mode;
  if (h->metatable)
    markobject(g, h->metatable);
  mode = gfasttm(g, h->metatable, TM_MODE);
  if (mode && ttisstring(mode)) {  /* is there a weak mode? */
    weakkey = (strchr(svalue(mode), 'k') != NULL);
    weakvalue = (strchr(svalue(mode), 'v') != NULL);
    if (weakkey || weakvalue) {  /* is really weak? */
      h->marked &= ~(KEYWEAK | VALUEWEAK);  /* clear bits */
      h->marked |= cast_byte((weakkey << KEYWEAKBIT) |
                             (weakvalue << VALUEWEAKBIT));
      h->gclist = g->weak;  /* must be cleared after GC, ... */
      g->weak = obj2gco(h);  /* ... so put in the appropriate list */
    }
  }
  if (weakkey && weakvalue) return 1;
  if (!weakvalue) {
    i = h->sizearray;
    while (i--)
      markvalue(g, &h->array[i]);
  }
  i = sizenode(h);
  while (i--) {
    Node *n = gnode(h, i);
    lua_assert(ttype(gkey(n)) != LUA_TDEADKEY || ttisnil(gval(n)));
    if (ttisnil(gval(n)))
      removeentry(n);  /* remove empty entries */
    else {
      lua_assert(!ttisnil(gkey(n)));
      if (!weakkey) markvalue(g, gkey(n));
      if (!weakvalue) markvalue(g, gval(n));
    }
  }
  return weakkey || weakvalue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xe800
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movzbl 0x9(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xe7fe
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xdf00
jmp 0xe800
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xe813
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0xe858
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movzbl 0xa(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xe82f
xorl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0xe850
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x140(%rax), %rdx
movl $0x3, %esi
callq 0x15ad0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xe917
movq -0x30(%rbp), %rax
cmpl $0x4, 0x8(%rax)
jne 0xe917
movq -0x30(%rbp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
movl $0x6b, %esi
callq 0x5170
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
movl $0x76, %esi
callq 0x5170
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0xe8cd
cmpl $0x0, -0x24(%rbp)
je 0xe915
movq -0x18(%rbp), %rax
movzbl 0x9(%rax), %ecx
andl $-0x19, %ecx
movb %cl, 0x9(%rax)
movl -0x20(%rbp), %eax
shll $0x3, %eax
movl -0x24(%rbp), %ecx
shll $0x4, %ecx
orl %ecx, %eax
movzbl %al, %edx
movq -0x18(%rbp), %rax
movzbl 0x9(%rax), %ecx
orl %edx, %ecx
movb %cl, 0x9(%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
jmp 0xe917
cmpl $0x0, -0x20(%rbp)
je 0xe92f
cmpl $0x0, -0x24(%rbp)
je 0xe92f
movl $0x1, -0x4(%rbp)
jmp 0xea92
cmpl $0x0, -0x24(%rbp)
jne 0xe9ad
movq -0x18(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x1c(%rbp)
cmpl $0x0, %eax
je 0xe9ab
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x4, 0x8(%rax)
jl 0xe9a9
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movzbl 0x9(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xe9a9
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0xdf00
jmp 0xe93f
jmp 0xe9ad
movq -0x18(%rbp), %rax
movzbl 0xb(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x1c(%rbp)
cmpl $0x0, %eax
je 0xea72
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0xe9ff
movq -0x38(%rbp), %rdi
callq 0xeee0
jmp 0xea6d
cmpl $0x0, -0x20(%rbp)
jne 0xea36
movq -0x38(%rbp), %rax
cmpl $0x4, 0x18(%rax)
jl 0xea34
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movzbl 0x9(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xea34
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xdf00
jmp 0xea36
cmpl $0x0, -0x24(%rbp)
jne 0xea6b
movq -0x38(%rbp), %rax
cmpl $0x4, 0x8(%rax)
jl 0xea69
movq -0x38(%rbp), %rax
movq (%rax), %rax
movzbl 0x9(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xea69
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rax
movq (%rax), %rsi
callq 0xdf00
jmp 0xea6b
jmp 0xea6d
jmp 0xe9bf
movb $0x1, %al
cmpl $0x0, -0x20(%rbp)
movb %al, -0x49(%rbp)
jne 0xea87
cmpl $0x0, -0x24(%rbp)
setne %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)