// File: attractivechaos[P]udb2/stb/./stb.h
// Function: stb_ps_getlist
void ** stb_ps_getlist(stb_ps *ps, int *count)
{
   int i,n=0;
   void **p = NULL;
   switch (3 & (int) ps) {
      case STB_ps_direct:
         if (ps == NULL) { *count = 0; return NULL; }
         p = (void **) malloc(sizeof(*p) * 1);
         p[0] = ps;
         *count = 1;
         return p;
      case STB_ps_bucket: {
         stb_ps_bucket *b = GetBucket(ps);
         p = (void **) malloc(sizeof(*p) * STB_BUCKET_SIZE);
         for (i=0; i < STB_BUCKET_SIZE; ++i)
            if (b->p[i] != NULL)
               p[n++] = b->p[i];
         break;
      }
      case STB_ps_array: {
         stb_ps_array *a = GetArray(ps);
         p = (void **) malloc(sizeof(*p) * a->count);
         memcpy(p, a->p, sizeof(*p) * a->count);
         *count = a->count;
         return p;
      }
      case STB_ps_hash: {
         stb_ps_hash *h = GetHash(ps);
         p = (void **) malloc(sizeof(*p) * h->count);
         for (i=0; i < h->size; ++i)
            if (!stb_ps_empty(h->table[i]))
               p[n++] = h->table[i];
         break;
      }
   }
   *count = n;
   return p;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movl $0x0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movl 0x38(%rsp), %eax
andl $0x3, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x3, %eax
ja 0x1403f
movq (%rsp), %rax
leaq 0xb2a4(%rip), %rcx      # 0x1f124
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpq $0x0, 0x38(%rsp)
jne 0x13eaa
movq 0x30(%rsp), %rax
movl $0x0, (%rax)
movq $0x0, 0x40(%rsp)
jmp 0x14054
movl $0x8, %edi
callq 0x2260
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x30(%rsp), %rax
movl $0x1, (%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x14054
movq 0x38(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x18(%rsp)
movl $0x20, %edi
callq 0x2260
movq %rax, 0x20(%rsp)
movl $0x0, 0x2c(%rsp)
cmpl $0x4, 0x2c(%rsp)
jge 0x13f53
movq 0x18(%rsp), %rax
movslq 0x2c(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x13f44
movq 0x18(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x20(%rsp), %rax
movl 0x28(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x28(%rsp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x13f46
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x13f05
jmp 0x1403f
movq 0x38(%rsp), %rax
addq $-0x2, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movslq (%rax), %rdi
shlq $0x3, %rdi
callq 0x2260
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x8, %rsi
movq 0x10(%rsp), %rax
movslq (%rax), %rdx
shlq $0x3, %rdx
callq 0x2230
movq 0x10(%rsp), %rax
movl (%rax), %ecx
movq 0x30(%rsp), %rax
movl %ecx, (%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x14054
movq 0x38(%rsp), %rax
addq $-0x3, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movslq 0x8(%rax), %rdi
shlq $0x3, %rdi
callq 0x2260
movq %rax, 0x20(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movq 0x8(%rsp), %rcx
cmpl (%rcx), %eax
jge 0x1403d
movq 0x8(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq 0x20(%rax,%rcx,8), %rax
cmpl $0x1, %eax
jbe 0x1402e
movq 0x8(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x20(%rsp), %rax
movl 0x28(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x28(%rsp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x14030
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x13fe5
jmp 0x1403f
movl 0x28(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, (%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nop