// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: atomic
static l_mem atomic (lua_State *L) {
  global_State *g = G(L);
  l_mem work = -cast(l_mem, g->GCmemtrav);  /* start counting work */
  GCObject *origweak, *origall;
  lua_assert(!iswhite(obj2gco(g->mainthread)));
  markobject(g, L);  /* mark running thread */
  /* registry and global metatables may be changed by API */
  markvalue(g, &g->l_registry);
  markmt(g);  /* mark basic metatables */
  /* remark occasional upvalues of (maybe) dead threads */
  remarkupvals(g);
  propagateall(g);  /* propagate changes */
  work += g->GCmemtrav;  /* stop counting (do not (re)count grays) */
  /* traverse objects caught by write barrier and by 'remarkupvals' */
  retraversegrays(g);
  work -= g->GCmemtrav;  /* restart counting */
  convergeephemerons(g);
  /* at this point, all strongly accessible objects are marked. */
  /* clear values from weak tables, before checking finalizers */
  clearvalues(g, g->weak, NULL);
  clearvalues(g, g->allweak, NULL);
  origweak = g->weak; origall = g->allweak;
  work += g->GCmemtrav;  /* stop counting (objects being finalized) */
  separatetobefnz(L, 0);  /* separate objects to be finalized */
  markbeingfnz(g);  /* mark objects that will be finalized */
  propagateall(g);  /* remark, to propagate `preserveness' */
  work -= g->GCmemtrav;  /* restart counting */
  convergeephemerons(g);
  /* at this point, all resurrected objects are marked. */
  /* remove dead objects from weak tables */
  clearkeys(g, g->ephemeron, NULL);  /* clear keys from all ephemeron tables */
  clearkeys(g, g->allweak, NULL);  /* clear keys from all allweak tables */
  /* clear values from resurrected weak tables */
  clearvalues(g, g->weak, origweak);
  clearvalues(g, g->allweak, origall);
  g->currentwhite = cast_byte(otherwhite(g));  /* flip current white */
  work += g->GCmemtrav;  /* complete counting */
  return work;  /* estimate of memory marked by 'atomic' */
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rcx
xorl %eax, %eax
subq 0x20(%rcx), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x1464f
movq 0x20(%rsp), %rax
movzbl 0x9(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x1464f
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x12b10
movq 0x18(%rsp), %rax
movl 0x48(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x14687
movq 0x18(%rsp), %rax
movq 0x40(%rax), %rax
movzbl 0x9(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x14687
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x40(%rax), %rsi
callq 0x12b10
movq 0x18(%rsp), %rdi
callq 0x148e0
movq 0x18(%rsp), %rdi
callq 0x157a0
movq 0x18(%rsp), %rdi
callq 0x15840
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
addq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x15860
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x10(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x15910
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x90(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x159a0
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0xa0(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x159a0
movq 0x18(%rsp), %rax
movq 0x90(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0xa0(%rax), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
addq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x13490
movq 0x18(%rsp), %rdi
callq 0x14960
movq 0x18(%rsp), %rdi
callq 0x15840
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x10(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x15910
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x98(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x15ae0
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0xa0(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x15ae0
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x90(%rax), %rsi
movq 0x8(%rsp), %rdx
callq 0x159a0
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0xa0(%rax), %rsi
movq (%rsp), %rdx
callq 0x159a0
movq 0x18(%rsp), %rax
movzbl 0x54(%rax), %eax
xorl $0x3, %eax
movb %al, %cl
movq 0x18(%rsp), %rax
movb %cl, 0x54(%rax)
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
addq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)