// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_malloc_validate
void stb_malloc_validate(void *p, void *parent)
{
   if (p == NULL) return;

   switch(stb__identify(p)) {
      case STB__chunked:
         return;
      case STB__nochildren: {
         stb__nochildren *n = (stb__nochildren *) p - 1;
         if (n->prevn)
            assert(*n->prevn == p);
         if (n->next) {
            assert(*stb__prevn(n->next) == &n->next);
            stb_malloc_validate(n, parent);
         }
         return;
      }
      case STB__alloc: {
         stb__alloc *s = (stb__alloc *) p - 1;

         if (s->prevn)
            assert(*s->prevn == p);

         if (s->child) {
            assert(*stb__prevn(s->child) == &s->child);
            stb_malloc_validate(s->child, p);
         }

         if (s->next) {
            assert(*stb__prevn(s->next) == &s->next);
            stb_malloc_validate(s->next, parent);
         }
         return;
      }
      default:
         assert(0); /* NOTREACHED */
   }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xd24b(%rip), %r14      # 0x12230
testq %rbx, %rbx
je 0x50cf
movq -0x8(%rbx), %rax
movl %eax, %ecx
andl $0x3, %ecx
movslq (%r14,%rcx,4), %rcx
addq %r14, %rcx
jmpq *%rcx
testq %rax, %rax
je 0x500e
cmpq %rbx, (%rax)
jne 0x5153
addq $-0x10, %rbx
movq (%rbx), %rax
testq %rax, %rax
je 0x50cf
leaq -0x8(%rax), %rcx
movl -0x8(%rax), %edx
andl $0x3, %edx
addq $-0x20, %rax
cmpl $0x2, %edx
cmovneq %rcx, %rax
cmpq %rbx, (%rax)
je 0x4fe5
jmp 0x50f6
movq -0x20(%rbx), %rax
testq %rax, %rax
je 0x504f
cmpq %rbx, (%rax)
jne 0x5115
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x5082
leaq -0x18(%rbx), %rax
leaq -0x8(%rdi), %rcx
movl -0x8(%rdi), %edx
andl $0x3, %edx
leaq -0x20(%rdi), %rsi
cmpl $0x2, %edx
cmovneq %rcx, %rsi
cmpq %rax, (%rsi)
jne 0x5134
movq %rbx, %rsi
callq 0x4fd7
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x50cf
addq $-0x10, %rbx
leaq -0x8(%rax), %rcx
movl -0x8(%rax), %edx
andl $0x3, %edx
leaq -0x20(%rax), %rsi
cmpl $0x2, %edx
cmovneq %rcx, %rsi
cmpq %rbx, (%rsi)
movq %rax, %rbx
je 0x4fe5
leaq 0xd650(%rip), %rdi      # 0x12707
leaq 0xd443(%rip), %rsi      # 0x12501
leaq 0xd5c6(%rip), %rcx      # 0x1268b
movl $0xa48, %edx            # imm = 0xA48
callq 0x2140
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xd748(%rip), %rdi      # 0x12826
leaq 0xd41c(%rip), %rsi      # 0x12501
leaq 0xd59f(%rip), %rcx      # 0x1268b
movl $0xa4e, %edx            # imm = 0xA4E
callq 0x2140
leaq 0xd5b7(%rip), %rdi      # 0x126b4
leaq 0xd3fd(%rip), %rsi      # 0x12501
leaq 0xd580(%rip), %rcx      # 0x1268b
movl $0xa37, %edx            # imm = 0xA37
callq 0x2140
leaq 0xd5b9(%rip), %rdi      # 0x126d5
leaq 0xd3de(%rip), %rsi      # 0x12501
leaq 0xd561(%rip), %rcx      # 0x1268b
movl $0xa40, %edx            # imm = 0xA40
callq 0x2140
leaq 0xd5a9(%rip), %rdi      # 0x126e4
leaq 0xd3bf(%rip), %rsi      # 0x12501
leaq 0xd542(%rip), %rcx      # 0x1268b
movl $0xa43, %edx            # imm = 0xA43
callq 0x2140
leaq 0xd522(%rip), %rdi      # 0x1267c
leaq 0xd3a0(%rip), %rsi      # 0x12501
leaq 0xd523(%rip), %rcx      # 0x1268b
movl $0xa35, %edx            # imm = 0xA35
callq 0x2140