// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/rbtree.c
// Function: gt_rbtree_recursewithstop
static int gt_rbtree_recursewithstop(const GtRBTreeNode *root,
                                     GtRBTreeAction action,
                                     GtUword level, void *actinfo)
{
  int retcode;

  if (root->link[0] == NULL && root->link[1] == NULL) {
    retcode = action(root->key, GT_RBTREE_LEAF, level, actinfo);
    RBT_CHECK_RETURN_CODE;
  } else {
    retcode = action(root->key, GT_RBTREE_PREORDER, level, actinfo);
    RBT_CHECK_RETURN_CODE;
    if (root->link[0] != NULL) {
      retcode = gt_rbtree_recursewithstop(root->link[0], action,
                                      level + 1, actinfo);
      RBT_CHECK_RETURN_CODE;
    }
    retcode = action(root->key, GT_RBTREE_POSTORDER, level, actinfo);
    RBT_CHECK_RETURN_CODE;
    if (root->link[1] != NULL) {
      retcode = gt_rbtree_recursewithstop(root->link[1], action,
                                      level + 1, actinfo);
      RBT_CHECK_RETURN_CODE;
    }
    retcode = action(root->key, GT_RBTREE_ENDORDER, level, actinfo);
    RBT_CHECK_RETURN_CODE;
  }
  return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1b9503
movq 0x28(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x1b9503
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %rdi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
movl $0x3, %esi
callq *%rax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jl 0x1b94f1
cmpl $0x1, 0xc(%rsp)
jne 0x1b94fe
movl 0xc(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x1b965a
jmp 0x1b9652
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %rdi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
xorl %esi, %esi
callq *%rax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jl 0x1b9531
cmpl $0x1, 0xc(%rsp)
jne 0x1b953e
movl 0xc(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x1b965a
movq 0x28(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1b958c
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq $0x1, %rdx
movq 0x10(%rsp), %rcx
callq 0x1b9490
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jl 0x1b957d
cmpl $0x1, 0xc(%rsp)
jne 0x1b958a
movl 0xc(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x1b965a
jmp 0x1b958c
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %rdi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
movl $0x1, %esi
callq *%rax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jl 0x1b95bd
cmpl $0x1, 0xc(%rsp)
jne 0x1b95ca
movl 0xc(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x1b965a
movq 0x28(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1b9615
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq $0x1, %rdx
movq 0x10(%rsp), %rcx
callq 0x1b9490
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jl 0x1b9609
cmpl $0x1, 0xc(%rsp)
jne 0x1b9613
movl 0xc(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x1b965a
jmp 0x1b9615
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %rdi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
movl $0x2, %esi
callq *%rax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jl 0x1b9646
cmpl $0x1, 0xc(%rsp)
jne 0x1b9650
movl 0xc(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x1b965a
jmp 0x1b9652
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)