// File: /workspace/github_c_makefile_star2_O3/attractivechaos[P]rb-eval/rb.c
// Function: rb_probe
void **
rb_probe (struct rb_table *tree, void *item)
{
  struct rb_node *pa[RB_MAX_HEIGHT]; /* Nodes on stack. */
  unsigned char da[RB_MAX_HEIGHT];   /* Directions moved from stack nodes. */
  int k;                             /* Stack height. */

  struct rb_node *p; /* Traverses tree looking for insertion point. */
  struct rb_node *n; /* Newly inserted node. */

  assert (tree != NULL && item != NULL);

  pa[0] = (struct rb_node *) &tree->rb_root;
  da[0] = 0;
  k = 1;
  for (p = tree->rb_root; p != NULL; p = p->rb_link[da[k - 1]])
    {
      int cmp = tree->rb_compare (item, p->rb_data, tree->rb_param);
      if (cmp == 0)
        return &p->rb_data;

      pa[k] = p;
      da[k++] = cmp > 0;
    }

  n = pa[k - 1]->rb_link[da[k - 1]] =
    tree->rb_alloc->libavl_malloc (tree->rb_alloc, sizeof *n);
  if (n == NULL)
    return NULL;

  n->rb_data = item;
  n->rb_link[0] = n->rb_link[1] = NULL;
  n->rb_color = RB_RED;
  tree->rb_count++;
  tree->rb_generation++;

  while (k >= 3 && pa[k - 1]->rb_color == RB_RED)
    {
      if (da[k - 2] == 0)
        {
          struct rb_node *y = pa[k - 2]->rb_link[1];
          if (y != NULL && y->rb_color == RB_RED)
            {
              pa[k - 1]->rb_color = y->rb_color = RB_BLACK;
              pa[k - 2]->rb_color = RB_RED;
              k -= 2;
            }
          else
            {
              struct rb_node *x;

              if (da[k - 1] == 0)
                y = pa[k - 1];
              else
                {
                  x = pa[k - 1];
                  y = x->rb_link[1];
                  x->rb_link[1] = y->rb_link[0];
                  y->rb_link[0] = x;
                  pa[k - 2]->rb_link[0] = y;
                }

              x = pa[k - 2];
              x->rb_color = RB_RED;
              y->rb_color = RB_BLACK;

              x->rb_link[0] = y->rb_link[1];
              y->rb_link[1] = x;
              pa[k - 3]->rb_link[da[k - 3]] = y;
              break;
            }
        }
      else
        {
          struct rb_node *y = pa[k - 2]->rb_link[0];
          if (y != NULL && y->rb_color == RB_RED)
            {
              pa[k - 1]->rb_color = y->rb_color = RB_BLACK;
              pa[k - 2]->rb_color = RB_RED;
              k -= 2;
            }
          else
            {
              struct rb_node *x;

              if (da[k - 1] == 1)
                y = pa[k - 1];
              else
                {
                  x = pa[k - 1];
                  y = x->rb_link[0];
                  x->rb_link[0] = y->rb_link[1];
                  y->rb_link[1] = x;
                  pa[k - 2]->rb_link[1] = y;
                }

              x = pa[k - 2];
              x->rb_color = RB_RED;
              y->rb_color = RB_BLACK;

              x->rb_link[1] = y->rb_link[0];
              y->rb_link[0] = x;
              pa[k - 3]->rb_link[da[k - 3]] = y;
              break;
            }
        }
    }
  tree->rb_root->rb_color = RB_BLACK;


  return &n->rb_data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
testq %rdi, %rdi
je 0x147d
movq %rsi, %r15
testq %rsi, %rsi
je 0x147d
movq %rdi, %rbx
movq %rdi, 0x30(%rsp)
movb $0x0, (%rsp)
movq (%rdi), %r14
testq %r14, %r14
je 0x1327
movl $0x1, %r13d
movq 0x10(%r14), %rsi
movq 0x10(%rbx), %rdx
movq %r15, %rdi
callq *0x8(%rbx)
testl %eax, %eax
je 0x13df
movq %r14, 0x30(%rsp,%r13,8)
leaq 0x1(%r13), %r12
xorl %ecx, %ecx
testl %eax, %eax
setg (%rsp,%r13)
setg %cl
movq (%r14,%rcx,8), %r14
movq %r12, %r13
testq %r14, %r14
jne 0x12ee
jmp 0x132d
movl $0x1, %r12d
movq 0x18(%rbx), %rdi
movl $0x20, %esi
callq *(%rdi)
movq %rax, %r14
movslq %r12d, %rax
movq 0x28(%rsp,%rax,8), %rcx
movzbl -0x1(%rsp,%rax), %eax
movq %r14, (%rcx,%rax,8)
testq %r14, %r14
je 0x13e8
movq %r15, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movb $0x1, 0x18(%r14)
movdqu 0x20(%rbx), %xmm0
pcmpeqd %xmm1, %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x20(%rbx)
cmpl $0x3, %r12d
jl 0x145e
movl %r12d, %eax
xorl %esi, %esi
movq 0x28(%rsp,%rax,8), %rcx
cmpb $0x1, 0x18(%rcx)
jne 0x145e
cmpb $0x0, -0x2(%rsp,%rax)
movq 0x20(%rsp,%rax,8), %rdx
je 0x13b1
movq (%rdx), %rdi
testq %rdi, %rdi
je 0x13ed
cmpb $0x1, 0x18(%rdi)
je 0x13c0
jmp 0x13ed
movq 0x8(%rdx), %rdi
testq %rdi, %rdi
je 0x141d
cmpb $0x1, 0x18(%rdi)
jne 0x141d
addq $0x18, %rdi
addq $-0x2, %rax
movb %sil, (%rdi)
movb %sil, 0x18(%rcx)
movb $0x1, 0x18(%rdx)
leaq 0x2(%rax), %rcx
cmpq $0x4, %rcx
ja 0x1386
jmp 0x145e
addq $0x10, %r14
jmp 0x1469
xorl %r14d, %r14d
jmp 0x1469
cmpb $0x1, -0x1(%rsp,%rax)
je 0x1409
movq (%rcx), %rsi
movq 0x8(%rsi), %rdi
movq %rdi, (%rcx)
movq %rcx, 0x8(%rsi)
movq %rsi, 0x8(%rdx)
movq %rsi, %rcx
movb $0x1, 0x18(%rdx)
movb $0x0, 0x18(%rcx)
movq (%rcx), %rsi
movq %rsi, 0x8(%rdx)
movq %rcx, %rsi
jmp 0x144b
cmpb $0x0, -0x1(%rsp,%rax)
je 0x1438
movq 0x8(%rcx), %rsi
movq (%rsi), %rdi
movq %rdi, 0x8(%rcx)
movq %rcx, (%rsi)
movq %rsi, (%rdx)
movq %rsi, %rcx
movb $0x1, 0x18(%rdx)
movb $0x0, 0x18(%rcx)
leaq 0x8(%rcx), %rsi
movq 0x8(%rcx), %rdi
movq %rdi, (%rdx)
movq %rdx, (%rsi)
addl $-0x3, %eax
movq 0x30(%rsp,%rax,8), %rdx
movzbl (%rsp,%rax), %eax
movq %rcx, (%rdx,%rax,8)
addq $0x10, %r14
movq (%rbx), %rax
movb $0x0, 0x18(%rax)
movq %r14, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1d58(%rip), %rdi      # 0x31dc
leaq 0x1ba5(%rip), %rsi      # 0x3030
leaq 0x1c2c(%rip), %rcx      # 0x30be
movl $0x62, %edx
callq 0x1040