// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/lua-5.1.5/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 0x66678
movq %rdi, %r14
leaq 0x874a0(%rip), %rdx     # 0xed570
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 0x660f8
testb $0x3, 0x9(%rsi)
je 0x660f8
movq %r14, %rdi
callq 0x66a62
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x664b1
testb $0x8, 0xa(%rdi)
jne 0x664b1
movq 0x140(%r14), %rdx
movl $0x3, %esi
callq 0x66b52
jmp 0x664b3
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 0x6615e
movq 0x78(%rbx), %rsi
testb $0x3, 0x9(%rsi)
je 0x6615e
movq %r14, %rdi
callq 0x66a62
movq 0x10(%rbx), %r15
movq 0x28(%rbx), %rax
movq 0x50(%rbx), %rcx
cmpq %rax, %rcx
ja 0x66180
movq 0x10(%rcx), %rdx
cmpq %rdx, %r15
cmovbq %rdx, %r15
addq $0x28, %rcx
jmp 0x6616a
movq 0x40(%rbx), %r12
cmpq 0x10(%rbx), %r12
jae 0x661aa
cmpl $0x4, 0x8(%r12)
jl 0x661a4
movq (%r12), %rsi
testb $0x3, 0x9(%rsi)
je 0x661a4
movq %r14, %rdi
callq 0x66a62
addq $0x10, %r12
jmp 0x66184
cmpq %r15, %r12
ja 0x662cf
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 0x8771b(%rip), %xmm1    # 0xed910
movdqa 0x87723(%rip), %xmm2    # 0xed920
movdqa 0x8772b(%rip), %xmm3    # 0xed930
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 0x66258
movl $0x0, -0x30(%r12)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x6626f
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 0x662ac
movl $0x0, -0x10(%r12)
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x662be
movl $0x0, (%r12)
addq $0x4, %rcx
addq $0x40, %r12
cmpq %rcx, %rax
jne 0x6620d
movl 0x5c(%rbx), %esi
cmpl $0x4e20, %esi           # imm = 0x4E20
jg 0x66328
subq 0x40(%rbx), %r15
cmpl $0x11, %esi
jl 0x66303
movq 0x28(%rbx), %rax
subq 0x50(%rbx), %rax
shrq $0x3, %rax
imull $0x33333334, %eax, %eax # imm = 0x33333334
cmpl %esi, %eax
jge 0x66303
shrl %esi
movq %rbx, %rdi
callq 0x5d27c
shrq $0x2, %r15
andl $-0x4, %r15d
movl 0x58(%rbx), %esi
cmpl %esi, %r15d
setge %al
cmpl $0x5b, %esi
setl %cl
orb %al, %cl
jne 0x66328
shrl %esi
movq %rbx, %rdi
callq 0x5d3c0
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 0x66678
movq 0x10(%rbx), %rax
movq %rax, 0x38(%r14)
movq 0x18(%rbx), %rsi
testb $0x3, 0x9(%rsi)
je 0x66361
movq %r14, %rdi
callq 0x66a62
cmpb $0x0, 0xa(%rbx)
je 0x66627
cmpb $0x0, 0xb(%rbx)
je 0x66661
leaq 0x30(%rbx), %r15
xorl %r12d, %r12d
cmpl $0x4, (%r15)
jl 0x66394
movq -0x8(%r15), %rsi
testb $0x3, 0x9(%rsi)
je 0x66394
movq %r14, %rdi
callq 0x66a62
incq %r12
movzbl 0xb(%rbx), %eax
addq $0x10, %r15
cmpq %rax, %r12
jb 0x6637c
jmp 0x66661
movq 0x68(%rbx), %rax
movq %rax, 0x38(%r14)
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x663be
andb $-0x4, 0x9(%rax)
cmpl $0x0, 0x4c(%rbx)
jle 0x663fb
movl $0x8, %r15d
xorl %r12d, %r12d
movq 0x10(%rbx), %rax
cmpl $0x4, (%rax,%r15)
jl 0x663eb
movq -0x8(%rax,%r15), %rsi
testb $0x3, 0x9(%rsi)
je 0x663eb
movq %r14, %rdi
callq 0x66a62
incq %r12
movslq 0x4c(%rbx), %rax
addq $0x10, %r15
cmpq %rax, %r12
jl 0x663cd
cmpl $0x0, 0x48(%rbx)
jle 0x66420
xorl %eax, %eax
movq 0x38(%rbx), %rcx
movq (%rcx,%rax,8), %rcx
testq %rcx, %rcx
je 0x66414
andb $-0x4, 0x9(%rcx)
incq %rax
movslq 0x48(%rbx), %rcx
cmpq %rcx, %rax
jl 0x66403
cmpl $0x0, 0x58(%rbx)
jle 0x66450
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rsi
testq %rsi, %rsi
je 0x66444
testb $0x3, 0x9(%rsi)
je 0x66444
movq %r14, %rdi
callq 0x66a62
incq %r15
movslq 0x58(%rbx), %rax
cmpq %rax, %r15
jl 0x66429
cmpl $0x0, 0x5c(%rbx)
jle 0x6647b
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x30(%rbx), %rdx
movq (%rdx,%rax), %rdx
testq %rdx, %rdx
je 0x6646b
andb $-0x4, 0x9(%rdx)
incq %rcx
movslq 0x5c(%rbx), %rdx
addq $0x10, %rax
cmpq %rdx, %rcx
jl 0x6645a
movslq 0x50(%rbx), %rax
movslq 0x58(%rbx), %rcx
movslq 0x4c(%rbx), %rdx
movslq 0x54(%rbx), %rsi
movslq 0x5c(%rbx), %rdi
addq %rdx, %rdi
movslq 0x48(%rbx), %rdx
shlq $0x4, %rdi
addq %rcx, %rdx
addq %rax, %rsi
leaq (%rdi,%rsi,4), %rax
leaq (%rax,%rdx,8), %rax
addq $0x78, %rax
jmp 0x66678
xorl %eax, %eax
testq %rax, %rax
je 0x66525
cmpl $0x4, 0x8(%rax)
jne 0x66525
movq (%rax), %r12
addq $0x18, %r12
movq %r12, %rdi
movl $0x6b, %esi
callq 0xb210
movq %rax, %r15
testq %rax, %rax
setne %bpl
movq %r12, %rdi
movl $0x76, %esi
callq 0xb210
testq %rax, %rax
setne %r12b
movq %r15, %rcx
orq %rax, %rcx
je 0x6652a
testq %rax, %rax
setne %al
testq %r15, %r15
setne %cl
movb 0x9(%rbx), %dl
andb $-0x19, %dl
shlb $0x3, %cl
shlb $0x4, %al
orb %cl, %al
orb %dl, %al
movb %al, 0x9(%rbx)
movq 0x48(%r14), %rax
movq %rax, 0x30(%rbx)
movq %rbx, 0x48(%r14)
jmp 0x6652a
xorl %ebp, %ebp
xorl %r12d, %r12d
testb %r12b, %bpl
jne 0x66600
testb %r12b, %r12b
jne 0x66576
movslq 0x38(%rbx), %r15
testq %r15, %r15
je 0x66576
movq %r15, %r13
shlq $0x4, %r13
addq $-0x8, %r13
movq 0x18(%rbx), %rax
cmpl $0x4, (%rax,%r13)
jl 0x6656a
movq -0x8(%rax,%r13), %rsi
testb $0x3, 0x9(%rsi)
je 0x6656a
movq %r14, %rdi
callq 0x66a62
decq %r15
addq $-0x10, %r13
testq %r15, %r15
jne 0x6654c
movb 0xb(%rbx), %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
notl %eax
leaq (%rax,%rax,4), %rax
leaq 0x18(,%rax,8), %r15
movq 0x20(%rbx), %r13
cmpl $0x0, -0x10(%r13,%r15)
je 0x665dc
testb %bpl, %bpl
jne 0x665ba
cmpl $0x4, (%r13,%r15)
jl 0x665ba
movq -0x8(%r13,%r15), %rsi
testb $0x3, 0x9(%rsi)
je 0x665ba
movq %r14, %rdi
callq 0x66a62
testb %r12b, %r12b
jne 0x665ed
cmpl $0x4, -0x10(%r13,%r15)
jl 0x665ed
movq -0x18(%r13,%r15), %rsi
testb $0x3, 0x9(%rsi)
je 0x665ed
movq %r14, %rdi
callq 0x66a62
jmp 0x665ed
cmpl $0x4, (%r13,%r15)
jl 0x665ed
movl $0xb, (%r13,%r15)
addq $-0x28, %r15
cmpq $-0x10, %r15
jne 0x6658e
orb %r12b, %bpl
testb $0x1, %bpl
je 0x66604
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 0x66678
movq 0x20(%rbx), %rsi
testb $0x3, 0x9(%rsi)
je 0x66639
movq %r14, %rdi
callq 0x66a62
cmpb $0x0, 0xb(%rbx)
je 0x66661
xorl %r15d, %r15d
movq 0x28(%rbx,%r15,8), %rsi
testb $0x3, 0x9(%rsi)
je 0x66655
movq %r14, %rdi
callq 0x66a62
incq %r15
movzbl 0xb(%rbx), %eax
cmpq %rax, %r15
jb 0x66642
cmpb $0x1, 0xa(%rbx)
movzbl 0xb(%rbx), %eax
movb $0x4, %cl
sbbb $0x0, %cl
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