// File: /workspace/github_c_makefile_star2_O3/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 0xa10b
movq %rdi, %r14
leaq 0x11aee(%rip), %rdx     # 0x1b614
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x30(%rbx), %rax
movq %rax, 0x38(%r14)
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x9fc0
testb $0x3, 0x9(%rsi)
je 0x9b5f
movq %r14, %rdi
callq 0x99ae
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x9fc0
testb $0x8, 0xa(%rsi)
jne 0x9fc0
movq 0x140(%r14), %rdx
movq %rsi, %rdi
movl $0x3, %esi
callq 0xe204
testq %rax, %rax
je 0x9fc0
cmpl $0x4, 0x8(%rax)
jne 0x9fc0
movq (%rax), %r12
addq $0x18, %r12
movq %r12, %rdi
movl $0x6b, %esi
callq 0x4160
movq %rax, %r15
testq %rax, %rax
setne %bpl
movq %r12, %rdi
movl $0x76, %esi
callq 0x4160
movq %r15, %rcx
orq %rax, %rcx
je 0x9fc0
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 0xa08d
movb $0x1, %r15b
testq %rax, %rax
jne 0xa003
jmp 0x9fc2
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 0x9c51
movq 0x78(%rbx), %rsi
testb $0x3, 0x9(%rsi)
je 0x9c51
movq %r14, %rdi
callq 0x99ae
movq 0x10(%rbx), %rax
movq 0x28(%rbx), %rcx
movq 0x50(%rbx), %rdx
movq %rax, %r15
cmpq %rcx, %rdx
ja 0x9c7c
movq %rax, %r15
movq 0x10(%rdx), %rsi
cmpq %rsi, %r15
cmovbq %rsi, %r15
addq $0x28, %rdx
cmpq %rcx, %rdx
jbe 0x9c68
movq 0x40(%rbx), %r12
cmpq %rax, %r12
jae 0x9ca9
cmpl $0x4, 0x8(%r12)
jl 0x9ca3
movq (%r12), %rsi
testb $0x3, 0x9(%rsi)
je 0x9ca3
movq %r14, %rdi
callq 0x99ae
movq 0x10(%rbx), %rax
addq $0x10, %r12
jmp 0x9c80
cmpq %r15, %r12
ja 0x9dce
leaq 0x10(%r12), %rax
leaq 0x1(%r15), %rcx
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq %r12, %rax
notq %rax
addq %rcx, %rax
movq %rax, %xmm0
shrq $0x4, %rax
addq $0x4, %rax
andq $-0x4, %rax
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
psrlq $0x4, %xmm0
addq $0x38, %r12
xorl %ecx, %ecx
movdqa 0x1157c(%rip), %xmm1    # 0x1b270
movdqa 0x11584(%rip), %xmm2    # 0x1b280
movdqa 0x1158c(%rip), %xmm3    # 0x1b290
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rcx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0x9d57
movl $0x0, -0x30(%r12)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x9d6e
movl $0x0, -0x20(%r12)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %edx
testb $0x1, %dl
je 0x9dab
movl $0x0, -0x10(%r12)
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x9dbd
movl $0x0, (%r12)
addq $0x4, %rcx
addq $0x40, %r12
cmpq %rcx, %rax
jne 0x9d0c
movl 0x5c(%rbx), %esi
cmpl $0x4e20, %esi           # imm = 0x4E20
jg 0x9e27
subq 0x40(%rbx), %r15
cmpl $0x11, %esi
jl 0x9e02
movq 0x28(%rbx), %rax
subq 0x50(%rbx), %rax
shrq $0x3, %rax
imull $0x33333334, %eax, %eax # imm = 0x33333334
cmpl %esi, %eax
jge 0x9e02
shrl %esi
movq %rbx, %rdi
callq 0x7b99
shrq $0x2, %r15
andl $-0x4, %r15d
movl 0x58(%rbx), %esi
cmpl %esi, %r15d
setge %al
cmpl $0x5b, %esi
setl %cl
orb %al, %cl
jne 0x9e27
shrl %esi
movq %rbx, %rdi
callq 0x7aba
movslq 0x58(%rbx), %rax
shlq $0x4, %rax
movslq 0x5c(%rbx), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %rax
addq $0xb8, %rax
jmp 0xa10b
movq 0x10(%rbx), %rax
movq %rax, 0x38(%r14)
movq 0x18(%rbx), %rsi
testb $0x3, 0x9(%rsi)
je 0x9e60
movq %r14, %rdi
callq 0x99ae
cmpb $0x0, 0xa(%rbx)
je 0xa0b4
movb 0xb(%rbx), %al
testb %al, %al
je 0xa0f3
leaq 0x30(%rbx), %r15
xorl %r12d, %r12d
cmpl $0x4, (%r15)
jl 0x9e97
movq -0x8(%r15), %rsi
testb $0x3, 0x9(%rsi)
je 0x9e97
movq %r14, %rdi
callq 0x99ae
movb 0xb(%rbx), %al
incq %r12
movzbl %al, %ecx
addq $0x10, %r15
cmpq %rcx, %r12
jb 0x9e7c
jmp 0xa0f5
movq 0x68(%rbx), %rax
movq %rax, 0x38(%r14)
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x9ec0
andb $-0x4, 0x9(%rax)
movl 0x4c(%rbx), %eax
testl %eax, %eax
jle 0x9f00
movl $0x8, %r15d
xorl %r12d, %r12d
movq 0x10(%rbx), %rcx
cmpl $0x4, (%rcx,%r15)
jl 0x9ef1
movq -0x8(%rcx,%r15), %rsi
testb $0x3, 0x9(%rsi)
je 0x9ef1
movq %r14, %rdi
callq 0x99ae
movl 0x4c(%rbx), %eax
incq %r12
movslq %eax, %rcx
addq $0x10, %r15
cmpq %rcx, %r12
jl 0x9ed0
movl 0x48(%rbx), %eax
testl %eax, %eax
jle 0x9f28
xorl %ecx, %ecx
movq 0x38(%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
testq %rdx, %rdx
je 0x9f1d
andb $-0x4, 0x9(%rdx)
movl 0x48(%rbx), %eax
incq %rcx
movslq %eax, %rdx
cmpq %rdx, %rcx
jl 0x9f09
movl 0x58(%rbx), %eax
testl %eax, %eax
jle 0x9f5b
xorl %r15d, %r15d
movq 0x20(%rbx), %rcx
movq (%rcx,%r15,8), %rsi
testq %rsi, %rsi
je 0x9f50
testb $0x3, 0x9(%rsi)
je 0x9f50
movq %r14, %rdi
callq 0x99ae
movl 0x58(%rbx), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x9f32
movslq 0x5c(%rbx), %rcx
testq %rcx, %rcx
jle 0x9f90
xorl %eax, %eax
movl %ecx, %esi
xorl %edx, %edx
movq 0x30(%rbx), %rcx
movq (%rcx,%rax), %rcx
testq %rcx, %rcx
je 0x9f7e
andb $-0x4, 0x9(%rcx)
movl 0x5c(%rbx), %esi
incq %rdx
movslq %esi, %rcx
addq $0x10, %rax
cmpq %rcx, %rdx
jl 0x9f6a
movl 0x58(%rbx), %eax
movslq 0x50(%rbx), %rdx
cltq
movslq 0x4c(%rbx), %rsi
addq %rcx, %rsi
movslq 0x54(%rbx), %rcx
movslq 0x48(%rbx), %rdi
shlq $0x4, %rsi
addq %rax, %rdi
addq %rdx, %rcx
leaq (%rsi,%rcx,4), %rax
leaq (%rax,%rdi,8), %rax
addq $0x78, %rax
jmp 0xa10b
xorl %ebp, %ebp
movslq 0x38(%rbx), %r15
testq %r15, %r15
je 0xa000
movq %r15, %r12
shlq $0x4, %r12
addq $-0x8, %r12
movq 0x18(%rbx), %rax
cmpl $0x4, (%rax,%r12)
jl 0x9ff4
movq -0x8(%rax,%r12), %rsi
testb $0x3, 0x9(%rsi)
je 0x9ff4
movq %r14, %rdi
callq 0x99ae
decq %r15
addq $-0x10, %r12
testq %r15, %r15
jne 0x9fd6
xorl %r15d, %r15d
movb 0xb(%rbx), %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
notl %eax
leaq (%rax,%rax,4), %rax
leaq 0x18(,%rax,8), %r12
movq 0x20(%rbx), %r13
cmpl $0x0, -0x10(%r13,%r12)
je 0xa069
testb %bpl, %bpl
jne 0xa047
cmpl $0x4, (%r13,%r12)
jl 0xa047
movq -0x8(%r13,%r12), %rsi
testb $0x3, 0x9(%rsi)
je 0xa047
movq %r14, %rdi
callq 0x99ae
testb %r15b, %r15b
jne 0xa07a
cmpl $0x4, -0x10(%r13,%r12)
jl 0xa07a
movq -0x18(%r13,%r12), %rsi
testb $0x3, 0x9(%rsi)
je 0xa07a
movq %r14, %rdi
callq 0x99ae
jmp 0xa07a
cmpl $0x4, (%r13,%r12)
jl 0xa07a
movl $0xb, (%r13,%r12)
addq $-0x28, %r12
cmpq $-0x10, %r12
jne 0xa01b
orb %r15b, %bpl
cmpb $0x1, %bpl
jne 0xa091
andb $-0x5, 0x9(%rbx)
movslq 0x38(%rbx), %rax
movb 0xb(%rbx), %cl
movl $0x1, %edx
shll %cl, %edx
shlq $0x4, %rax
movslq %edx, %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %rax
addq $0x40, %rax
jmp 0xa10b
movq 0x20(%rbx), %rsi
testb $0x3, 0x9(%rsi)
je 0xa0c6
movq %r14, %rdi
callq 0x99ae
movb 0xb(%rbx), %al
testb %al, %al
je 0xa0f3
xorl %r15d, %r15d
movq 0x28(%rbx,%r15,8), %rsi
testb $0x3, 0x9(%rsi)
je 0xa0e6
movq %r14, %rdi
callq 0x99ae
movb 0xb(%rbx), %al
incq %r15
movzbl %al, %ecx
cmpq %rcx, %r15
jb 0xa0d0
jmp 0xa0f5
xorl %eax, %eax
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