// File: /workspace/github_c_makefile_star2_O0/attractivechaos[P]rb-eval/rb.c
// Function: rb_t_next
void *
rb_t_next (struct rb_traverser *trav)
{
  struct rb_node *x;

  assert (trav != NULL);

  if (trav->rb_generation != trav->rb_table->rb_generation)
    trav_refresh (trav);

  x = trav->rb_node;
  if (x == NULL)
    {
      return rb_t_first (trav, trav->rb_table);
    }
  else if (x->rb_link[1] != NULL)
    {
      assert (trav->rb_height < RB_MAX_HEIGHT);
      trav->rb_stack[trav->rb_height++] = x;
      x = x->rb_link[1];

      while (x->rb_link[0] != NULL)
        {
          assert (trav->rb_height < RB_MAX_HEIGHT);
          trav->rb_stack[trav->rb_height++] = x;
          x = x->rb_link[0];
        }
    }
  else
    {
      struct rb_node *y;

      do
        {
          if (trav->rb_height == 0)
            {
              trav->rb_node = NULL;
              return NULL;
            }

          y = x;
          x = trav->rb_stack[--trav->rb_height];
        }
      while (y == x->rb_link[1]);
    }
  trav->rb_node = x;

  return x->rb_data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2a45
jmp 0x2a64
leaq 0x16c2(%rip), %rdi      # 0x410e
leaq 0x15c1(%rip), %rsi      # 0x4014
movl $0x26d, %edx            # imm = 0x26D
leaq 0x1864(%rip), %rcx      # 0x42c3
callq 0x1040
movq -0x10(%rbp), %rax
movq 0x198(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x28(%rcx), %rax
je 0x2a85
movq -0x10(%rbp), %rdi
callq 0x2c20
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x2ab1
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x2470
movq %rax, -0x8(%rbp)
jmp 0x2c0d
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2b8f
movq -0x10(%rbp), %rax
cmpq $0x30, 0x190(%rax)
jae 0x2ad0
jmp 0x2aef
leaq 0x167f(%rip), %rdi      # 0x4156
leaq 0x1536(%rip), %rsi      # 0x4014
movl $0x279, %edx            # imm = 0x279
leaq 0x17d9(%rip), %rcx      # 0x42c3
callq 0x1040
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rsi
movq 0x190(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x190(%rsi)
movq %rdx, 0x10(%rax,%rcx,8)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2b8d
movq -0x10(%rbp), %rax
cmpq $0x30, 0x190(%rax)
jae 0x2b3b
jmp 0x2b5a
leaq 0x1614(%rip), %rdi      # 0x4156
leaq 0x14cb(%rip), %rsi      # 0x4014
movl $0x27f, %edx            # imm = 0x27F
leaq 0x176e(%rip), %rcx      # 0x42c3
callq 0x1040
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rsi
movq 0x190(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x190(%rsi)
movq %rdx, 0x10(%rax,%rcx,8)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2b21
jmp 0x2bf3
jmp 0x2b91
movq -0x10(%rbp), %rax
cmpq $0x0, 0x190(%rax)
jne 0x2bb5
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x2c0d
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rdx
movq 0x190(%rdx), %rcx
movq %rcx, %rsi
addq $-0x1, %rsi
movq %rsi, 0x190(%rdx)
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x2b91
jmp 0x2bf3
jmp 0x2bf5
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)