// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1343
cmpq $0x0, -0x18(%rbp)
je 0x1343
jmp 0x1362
leaq 0x2e76(%rip), %rdi      # 0x41c0
leaq 0x2cc3(%rip), %rsi      # 0x4014
movl $0x62, %edx
leaq 0x2d45(%rip), %rcx      # 0x40a2
callq 0x1040
movq -0x10(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movb $0x0, -0x1d0(%rbp)
movl $0x1, -0x1d4(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1e0(%rbp)
cmpq $0x0, -0x1e0(%rbp)
je 0x144a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x1e0(%rbp), %rcx
movq 0x10(%rcx), %rsi
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdx
callq *%rax
movl %eax, -0x1ec(%rbp)
cmpl $0x0, -0x1ec(%rbp)
jne 0x13de
movq -0x1e0(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
jmp 0x18f2
movq -0x1e0(%rbp), %rcx
movslq -0x1d4(%rbp), %rax
movq %rcx, -0x1a0(%rbp,%rax,8)
cmpl $0x0, -0x1ec(%rbp)
setg %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movl -0x1d4(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x1d4(%rbp)
cltq
movb %cl, -0x1d0(%rbp,%rax)
movq -0x1e0(%rbp), %rax
movl -0x1d4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movzbl -0x1d0(%rbp,%rcx), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1e0(%rbp)
jmp 0x138c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rdi
movl $0x20, %esi
callq *%rax
movl -0x1d4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq -0x1a0(%rbp,%rcx,8), %rcx
movl -0x1d4(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movzbl -0x1d0(%rbp,%rdx), %edx
movq %rax, (%rcx,%rdx,8)
movq %rax, -0x1e8(%rbp)
cmpq $0x0, -0x1e8(%rbp)
jne 0x14ae
movq $0x0, -0x8(%rbp)
jmp 0x18f2
movq -0x18(%rbp), %rcx
movq -0x1e8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x1e8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x1e8(%rbp), %rax
movq $0x0, (%rax)
movq -0x1e8(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
xorl %eax, %eax
cmpl $0x3, -0x1d4(%rbp)
movb %al, -0x211(%rbp)
jl 0x1539
movl -0x1d4(%rbp), %eax
subl $0x1, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movzbl 0x18(%rax), %eax
cmpl $0x1, %eax
sete %al
movb %al, -0x211(%rbp)
movb -0x211(%rbp), %al
testb $0x1, %al
jne 0x1548
jmp 0x18d8
movl -0x1d4(%rbp), %eax
subl $0x2, %eax
cltq
movzbl -0x1d0(%rbp,%rax), %eax
cmpl $0x0, %eax
jne 0x171f
movl -0x1d4(%rbp), %eax
subl $0x2, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1f8(%rbp)
cmpq $0x0, -0x1f8(%rbp)
je 0x15e9
movq -0x1f8(%rbp), %rax
movzbl 0x18(%rax), %eax
cmpl $0x1, %eax
jne 0x15e9
movq -0x1f8(%rbp), %rax
movb $0x0, 0x18(%rax)
movl -0x1d4(%rbp), %eax
subl $0x1, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movb $0x0, 0x18(%rax)
movl -0x1d4(%rbp), %eax
subl $0x2, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movb $0x1, 0x18(%rax)
movl -0x1d4(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x1d4(%rbp)
jmp 0x171a
movl -0x1d4(%rbp), %eax
subl $0x1, %eax
cltq
movzbl -0x1d0(%rbp,%rax), %eax
cmpl $0x0, %eax
jne 0x161d
movl -0x1d4(%rbp), %eax
subl $0x1, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movq %rax, -0x1f8(%rbp)
jmp 0x168c
movl -0x1d4(%rbp), %eax
subl $0x1, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movq %rax, -0x200(%rbp)
movq -0x200(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rax
movq (%rax), %rcx
movq -0x200(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x200(%rbp), %rcx
movq -0x1f8(%rbp), %rax
movq %rcx, (%rax)
movq -0x1f8(%rbp), %rcx
movl -0x1d4(%rbp), %eax
subl $0x2, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movq %rcx, (%rax)
movl -0x1d4(%rbp), %eax
subl $0x2, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movq %rax, -0x200(%rbp)
movq -0x200(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x1f8(%rbp), %rax
movb $0x0, 0x18(%rax)
movq -0x1f8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x200(%rbp), %rax
movq %rcx, (%rax)
movq -0x200(%rbp), %rcx
movq -0x1f8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x1f8(%rbp), %rdx
movl -0x1d4(%rbp), %eax
subl $0x3, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movl -0x1d4(%rbp), %ecx
subl $0x3, %ecx
movslq %ecx, %rcx
movzbl -0x1d0(%rbp,%rcx), %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0x18d8
jmp 0x18d3
movl -0x1d4(%rbp), %eax
subl $0x2, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movq (%rax), %rax
movq %rax, -0x208(%rbp)
cmpq $0x0, -0x208(%rbp)
je 0x17a3
movq -0x208(%rbp), %rax
movzbl 0x18(%rax), %eax
cmpl $0x1, %eax
jne 0x17a3
movq -0x208(%rbp), %rax
movb $0x0, 0x18(%rax)
movl -0x1d4(%rbp), %eax
subl $0x1, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movb $0x0, 0x18(%rax)
movl -0x1d4(%rbp), %eax
subl $0x2, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movb $0x1, 0x18(%rax)
movl -0x1d4(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x1d4(%rbp)
jmp 0x18d1
movl -0x1d4(%rbp), %eax
subl $0x1, %eax
cltq
movzbl -0x1d0(%rbp,%rax), %eax
cmpl $0x1, %eax
jne 0x17d7
movl -0x1d4(%rbp), %eax
subl $0x1, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movq %rax, -0x208(%rbp)
jmp 0x1847
movl -0x1d4(%rbp), %eax
subl $0x1, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x210(%rbp), %rax
movq %rcx, (%rax)
movq -0x210(%rbp), %rcx
movq -0x208(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x208(%rbp), %rcx
movl -0x1d4(%rbp), %eax
subl $0x2, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movq %rcx, 0x8(%rax)
movl -0x1d4(%rbp), %eax
subl $0x2, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x208(%rbp), %rax
movb $0x0, 0x18(%rax)
movq -0x208(%rbp), %rax
movq (%rax), %rcx
movq -0x210(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x210(%rbp), %rcx
movq -0x208(%rbp), %rax
movq %rcx, (%rax)
movq -0x208(%rbp), %rdx
movl -0x1d4(%rbp), %eax
subl $0x3, %eax
cltq
movq -0x1a0(%rbp,%rax,8), %rax
movl -0x1d4(%rbp), %ecx
subl $0x3, %ecx
movslq %ecx, %rcx
movzbl -0x1d0(%rbp,%rcx), %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0x18d8
jmp 0x18d3
jmp 0x1505
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb $0x0, 0x18(%rax)
movq -0x1e8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
nop