// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/lua/src/lgc.c
// Function: propagatemark
static l_mem propagatemark (global_State *g) {
  GCObject *o = g->gray;
  lua_assert(isgray(o));
  gray2black(o);
  switch (o->gch.tt) {
    case LUA_TTABLE: {
      Table *h = gco2h(o);
      g->gray = h->gclist;
      if (traversetable(g, h))  /* table is weak? */
        black2gray(o);  /* keep it gray */
      return sizeof(Table) + sizeof(TValue) * h->sizearray +
                             sizeof(Node) * sizenode(h);
    }
    case LUA_TFUNCTION: {
      Closure *cl = gco2cl(o);
      g->gray = cl->c.gclist;
      traverseclosure(g, cl);
      return (cl->c.isC) ? sizeCclosure(cl->c.nupvalues) :
                           sizeLclosure(cl->l.nupvalues);
    }
    case LUA_TTHREAD: {
      lua_State *th = gco2th(o);
      g->gray = th->gclist;
      th->gclist = g->grayagain;
      g->grayagain = o;
      black2gray(o);
      traversestack(g, th);
      return sizeof(lua_State) + sizeof(TValue) * th->stacksize +
                                 sizeof(CallInfo) * th->size_ci;
    }
    case LUA_TPROTO: {
      Proto *p = gco2p(o);
      g->gray = p->gclist;
      traverseproto(g, p);
      return sizeof(Proto) + sizeof(Instruction) * p->sizecode +
                             sizeof(Proto *) * p->sizep +
                             sizeof(TValue) * p->sizek + 
                             sizeof(int) * p->sizelineinfo +
                             sizeof(LocVar) * p->sizelocvars +
                             sizeof(TString *) * p->sizeupvalues;
    }
    default: lua_assert(0); return 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb 0x9(%rax), %cl
orb $0x4, %cl
movb %cl, 0x9(%rax)
movq -0x18(%rbp), %rax
movzbl 0x8(%rax), %eax
addl $-0x5, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x4, %eax
ja 0xe58a
movq -0x40(%rbp), %rax
leaq 0x1d316(%rip), %rcx     # 0x2b6b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xe7b0
cmpl $0x0, %eax
je 0xe3de
movq -0x18(%rbp), %rax
movzbl 0x9(%rax), %ecx
andl $0xfb, %ecx
movb %cl, 0x9(%rax)
movq -0x20(%rbp), %rax
movslq 0x38(%rax), %rax
shlq $0x4, %rax
addq $0x40, %rax
movq -0x20(%rbp), %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(%rbp)
jmp 0xe592
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xeaa0
movq -0x28(%rbp), %rax
movzbl 0xa(%rax), %eax
cmpl $0x0, %eax
je 0xe45d
movq -0x28(%rbp), %rax
movzbl 0xb(%rax), %eax
subl $0x1, %eax
cltq
shlq $0x4, %rax
addl $0x38, %eax
movl %eax, -0x44(%rbp)
jmp 0xe474
movq -0x28(%rbp), %rax
movzbl 0xb(%rax), %eax
subl $0x1, %eax
cltq
shlq $0x3, %rax
addl $0x30, %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0xe592
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0xa0(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movzbl 0x9(%rax), %ecx
andl $0xfb, %ecx
movb %cl, 0x9(%rax)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xebe0
movq -0x30(%rbp), %rax
movslq 0x58(%rax), %rax
shlq $0x4, %rax
addq $0xb8, %rax
movq -0x30(%rbp), %rcx
movslq 0x5c(%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0xe592
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xed10
movq -0x38(%rbp), %rax
movslq 0x50(%rax), %rax
shlq $0x2, %rax
addq $0x78, %rax
movq -0x38(%rbp), %rcx
movslq 0x58(%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
movslq 0x4c(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
movslq 0x54(%rcx), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
movslq 0x5c(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
movslq 0x48(%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0xe592
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)