// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: traverseephemeron
static int traverseephemeron (global_State *g, Table *h) {
  int marked = 0;  /* true if an object is marked in this traversal */
  int hasclears = 0;  /* true if table has white keys */
  int prop = 0;  /* true if table has entry "white-key -> white-value" */
  Node *n, *limit = gnodelast(h);
  int i;
  /* traverse array part (numeric keys are 'strong') */
  for (i = 0; i < h->sizearray; i++) {
    if (valiswhite(&h->array[i])) {
      marked = 1;
      reallymarkobject(g, gcvalue(&h->array[i]));
    }
  }
  /* traverse hash part */
  for (n = gnode(h, 0); n < limit; n++) {
    checkdeadkey(n);
    if (ttisnil(gval(n)))  /* entry is empty? */
      removeentry(n);  /* remove it */
    else if (iscleared(g, gkey(n))) {  /* key is not marked (yet)? */
      hasclears = 1;  /* table must be cleared */
      if (valiswhite(gval(n)))  /* value not marked yet? */
        prop = 1;  /* must propagate again */
    }
    else if (valiswhite(gval(n))) {  /* value not marked yet? */
      marked = 1;
      reallymarkobject(g, gcvalue(gval(n)));  /* mark it now */
    }
  }
  if (prop)
    linktable(h, &g->ephemeron);  /* have to propagate again */
  else if (hasclears)  /* does table have white keys? */
    linktable(h, &g->allweak);  /* may have to clean white keys */
  else  /* no white keys */
    linktable(h, &g->grayagain);  /* no need to clean */
  return marked;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x28(%rsp), %rcx
movzbl 0xb(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x28(%rsp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x153ca
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x153b8
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movzbl 0x9(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x153b8
movl $0x1, 0x24(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x12b10
jmp 0x153ba
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x15338
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
jae 0x154a7
movq 0x10(%rsp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x15402
movq 0x10(%rsp), %rdi
callq 0x156d0
jmp 0x15492
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x10, %rsi
callq 0x15710
cmpl $0x0, %eax
je 0x15450
movl $0x1, 0x20(%rsp)
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x1544e
movq 0x10(%rsp), %rax
movq (%rax), %rax
movzbl 0x9(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x1544e
movl $0x1, 0x1c(%rsp)
jmp 0x15490
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x1548e
movq 0x10(%rsp), %rax
movq (%rax), %rax
movzbl 0x9(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x1548e
movl $0x1, 0x24(%rsp)
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
callq 0x12b10
jmp 0x15490
jmp 0x15492
jmp 0x15494
movq 0x10(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x10(%rsp)
jmp 0x153d8
cmpl $0x0, 0x1c(%rsp)
je 0x154d6
movq 0x30(%rsp), %rax
movq 0x98(%rax), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x98(%rax)
jmp 0x1552d
cmpl $0x0, 0x20(%rsp)
je 0x15505
movq 0x30(%rsp), %rax
movq 0xa0(%rax), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0xa0(%rax)
jmp 0x1552b
movq 0x30(%rsp), %rax
movq 0x88(%rax), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x88(%rax)
jmp 0x1552d
movl 0x24(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)