// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x38(%rdi), %rbx
orb $0x4, 0x9(%rbx)
movzbl 0x8(%rbx), %ecx
xorl %eax, %eax
addl $-0x5, %ecx
cmpl $0x4, %ecx
ja 0x9677
movq %rdi, %r14
leaq 0x1040c(%rip), %rdx     # 0x195f4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x30(%rbx), %rax
movq %rax, 0x38(%r14)
movq 0x10(%rbx), %rsi
pushq $0x1
popq %rbp
testq %rsi, %rsi
je 0x9539
testb $0x3, 0x9(%rsi)
je 0x9224
movq %r14, %rdi
callq 0x9086
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x9539
testb $0x8, 0xa(%rsi)
jne 0x9539
movq 0x140(%r14), %rdx
pushq $0x3
popq %rax
movq %rsi, %rdi
movl %eax, %esi
callq 0xd1c6
testq %rax, %rax
je 0x9539
cmpl $0x4, 0x8(%rax)
jne 0x9539
movq (%rax), %r12
addq $0x18, %r12
pushq $0x6b
popq %rsi
movq %r12, %rdi
callq 0x4160
movq %rax, %r15
testq %rax, %rax
setne %al
movl %eax, 0x4(%rsp)
pushq $0x76
popq %rsi
movq %r12, %rdi
callq 0x4160
movq %r15, %rcx
orq %rax, %rcx
je 0x9539
testq %rax, %rax
setne %cl
testq %r15, %r15
setne %dl
movb 0x9(%rbx), %sil
andb $-0x19, %sil
leal (,%rdx,8), %edi
movl %ecx, %r8d
shlb $0x4, %r8b
orb %dil, %r8b
orb %sil, %r8b
movb %r8b, 0x9(%rbx)
movq 0x48(%r14), %rsi
movq %rsi, 0x30(%rbx)
movq %rbx, 0x48(%r14)
testb %cl, %dl
jne 0x960a
movb $0x1, %r15b
testq %rax, %rax
jne 0x957d
jmp 0x9541
movq 0xa0(%rbx), %rax
movq %rax, 0x38(%r14)
movq 0x40(%r14), %rax
movq %rax, 0xa0(%rbx)
movq %rbx, 0x40(%r14)
andb $-0x5, 0x9(%rbx)
cmpl $0x4, 0x80(%rbx)
jl 0x9315
movq 0x78(%rbx), %rsi
testb $0x3, 0x9(%rsi)
je 0x9315
movq %r14, %rdi
callq 0x9086
movq 0x10(%rbx), %rax
movq 0x28(%rbx), %rcx
movq 0x50(%rbx), %rdx
movq %rax, %r15
cmpq %rcx, %rdx
ja 0x933a
movq 0x10(%rdx), %rsi
cmpq %rsi, %r15
cmovbq %rsi, %r15
addq $0x28, %rdx
jmp 0x9324
movq 0x40(%rbx), %r12
cmpq %rax, %r12
jae 0x9371
cmpl $0x4, 0x8(%r12)
jl 0x9361
movq (%r12), %rsi
testb $0x3, 0x9(%rsi)
je 0x9361
movq %r14, %rdi
callq 0x9086
movq 0x10(%rbx), %rax
addq $0x10, %r12
jmp 0x933e
andl $0x0, 0x8(%r12)
addq $0x10, %r12
cmpq %r15, %r12
jbe 0x9367
movl 0x5c(%rbx), %esi
cmpl $0x4e20, %esi           # imm = 0x4E20
jg 0x93d0
subq 0x40(%rbx), %r15
movq 0x28(%rbx), %rax
subq 0x50(%rbx), %rax
pushq $0x28
popq %rcx
cqto
idivq %rcx
cmpl $0x11, %esi
jl 0x93ab
shll $0x2, %eax
cmpl %esi, %eax
jge 0x93ab
shrl %esi
movq %rbx, %rdi
callq 0x76c7
shrq $0x2, %r15
andl $-0x4, %r15d
movl 0x58(%rbx), %esi
cmpl %esi, %r15d
setge %al
cmpl $0x5b, %esi
setl %cl
orb %al, %cl
jne 0x93d0
shrl %esi
movq %rbx, %rdi
callq 0x75ef
movslq 0x58(%rbx), %rax
shlq $0x4, %rax
movslq 0x5c(%rbx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
addq $0xb8, %rax
jmp 0x9677
movq 0x10(%rbx), %rax
movq %rax, 0x38(%r14)
movq 0x18(%rbx), %rsi
testb $0x3, 0x9(%rsi)
je 0x9408
movq %r14, %rdi
callq 0x9086
cmpb $0x0, 0xa(%rbx)
je 0x962b
leaq 0x30(%rbx), %r15
xorl %r12d, %r12d
movzbl 0xb(%rbx), %eax
cmpq %rax, %r12
jae 0x9661
cmpl $0x4, (%r15)
jl 0x943e
movq -0x8(%r15), %rsi
testb $0x3, 0x9(%rsi)
je 0x943e
movq %r14, %rdi
callq 0x9086
incq %r12
addq $0x10, %r15
jmp 0x9419
movq 0x68(%rbx), %rax
movq %rax, 0x38(%r14)
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x945c
andb $-0x4, 0x9(%rax)
pushq $0x8
popq %r15
xorl %r12d, %r12d
movslq 0x4c(%rbx), %rax
cmpq %rax, %r12
jge 0x9493
movq 0x10(%rbx), %rax
cmpl $0x4, (%rax,%r15)
jl 0x948a
movq -0x8(%rax,%r15), %rsi
testb $0x3, 0x9(%rsi)
je 0x948a
movq %r14, %rdi
callq 0x9086
incq %r12
addq $0x10, %r15
jmp 0x9463
xorl %eax, %eax
movslq 0x48(%rbx), %rcx
cmpq %rcx, %rax
jge 0x94b4
movq 0x38(%rbx), %rcx
movq (%rcx,%rax,8), %rcx
testq %rcx, %rcx
je 0x94af
andb $-0x4, 0x9(%rcx)
incq %rax
jmp 0x9495
xorl %r15d, %r15d
movslq 0x58(%rbx), %rax
cmpq %rax, %r15
jge 0x94e0
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rsi
testq %rsi, %rsi
je 0x94db
testb $0x3, 0x9(%rsi)
je 0x94db
movq %r14, %rdi
callq 0x9086
incq %r15
jmp 0x94b7
xorl %eax, %eax
xorl %ecx, %ecx
movslq 0x5c(%rbx), %rdx
cmpq %rdx, %rcx
jge 0x9507
movq 0x30(%rbx), %rdx
movq (%rdx,%rax), %rdx
testq %rdx, %rdx
je 0x94fe
andb $-0x4, 0x9(%rdx)
incq %rcx
addq $0x10, %rax
jmp 0x94e4
movslq 0x50(%rbx), %rax
movslq 0x58(%rbx), %rcx
movslq 0x4c(%rbx), %rsi
movslq 0x54(%rbx), %rdi
movslq 0x48(%rbx), %r8
addq %rcx, %r8
addq %rax, %rdi
addq %rdx, %rsi
shlq $0x4, %rsi
leaq (%rsi,%rdi,4), %rax
leaq (%rax,%r8,8), %rax
addq $0x78, %rax
jmp 0x9677
movl $0x0, 0x4(%rsp)
movslq 0x38(%rbx), %r15
movq %r15, %r12
shlq $0x4, %r12
addq $-0x8, %r12
subq $0x1, %r15
jb 0x957a
movq 0x18(%rbx), %rax
cmpl $0x4, (%rax,%r12)
jl 0x9574
movq -0x8(%rax,%r12), %rsi
testb $0x3, 0x9(%rsi)
je 0x9574
movq %r14, %rdi
callq 0x9086
addq $-0x10, %r12
jmp 0x9550
xorl %r15d, %r15d
movb 0xb(%rbx), %cl
movl %ebp, %eax
shll %cl, %eax
movslq %eax, %r12
imulq $0x28, %r12, %rbp
addq $-0x10, %rbp
subq $0x1, %r12
jb 0x95fc
movq 0x20(%rbx), %r13
cmpl $0x0, -0x10(%r13,%rbp)
je 0x95e5
cmpb $0x0, 0x4(%rsp)
jne 0x95c3
cmpl $0x4, (%r13,%rbp)
jl 0x95c3
movq -0x8(%r13,%rbp), %rsi
testb $0x3, 0x9(%rsi)
je 0x95c3
movq %r14, %rdi
callq 0x9086
testb %r15b, %r15b
jne 0x95f6
cmpl $0x4, -0x10(%r13,%rbp)
jl 0x95f6
movq -0x18(%r13,%rbp), %rsi
testb $0x3, 0x9(%rsi)
je 0x95f6
movq %r14, %rdi
callq 0x9086
jmp 0x95f6
cmpl $0x4, (%r13,%rbp)
jl 0x95f6
movl $0xb, (%r13,%rbp)
addq $-0x28, %rbp
jmp 0x958f
movl 0x4(%rsp), %eax
orb %r15b, %al
cmpb $0x1, %al
pushq $0x1
popq %rbp
jne 0x960e
andb $-0x5, 0x9(%rbx)
movslq 0x38(%rbx), %rax
movb 0xb(%rbx), %cl
shll %cl, %ebp
shlq $0x4, %rax
movslq %ebp, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
addq $0x40, %rax
jmp 0x9677
movq 0x20(%rbx), %rsi
testb $0x3, 0x9(%rsi)
je 0x963d
movq %r14, %rdi
callq 0x9086
xorl %r15d, %r15d
movzbl 0xb(%rbx), %eax
cmpq %rax, %r15
jae 0x9661
movq 0x28(%rbx,%r15,8), %rsi
testb $0x3, 0x9(%rsi)
je 0x965c
movq %r14, %rdi
callq 0x9086
incq %r15
jmp 0x9640
cmpb $0x1, 0xa(%rbx)
movb $0x4, %cl
sbbb $0x0, %cl
movzbl %al, %eax
shll %cl, %eax
addl $0x28, %eax
andl $0xfff8, %eax           # imm = 0xFFF8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq