#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *, char *,
                          char *);
void help(char *argv[]) {
  printf(
      "Performs actions on nodes that match some condition\n"
      "\n"
      "Synopsis\n"
      "--------\n"
      "\n"
      "%s [-hnor] <newick trees filename|-> <address> <action>\n"
      "\n"
      "Input\n"
      "-----\n"
      "\n"
      "First argument is the name of a file that contains Newick trees, or '-' "
      "(in\n"
      "which case trees are read from standard input).\n"
      "\n"
      "Second argument is a node address, in the form of a logical expression "
      "(see\n"
      "Addresses below).\n"
      "\n"
      "Third argument is a code that specifies an action to perform on nodes\n"
      "which match the address (see Actions).\n"
      "\n"
      "Output\n"
      "------\n"
      "\n"
      "By default, prints the input tree, which may have been modified. "
      "However,\n"
      "the 's' action (see Actions, below) causes matching subtrees to be\n"
      "printed out.\n"
      "\n"
      "This program is analogous to pattern-oriented, stream processing UNIX\n"
      "utilities like sed(1) and awk(1), but instead of working on lines "
      "(like\n"
      "sed) or records (like awk), %s works on tree nodes.\n"
      "\n"
      "The program traverses the tree in Newick order, evaluating the address\n"
      "expression for each node in turn. If (and only if) the address matches, "
      "the\n"
      "action is performed.\n"
      "\n"
      "Addresses\n"
      "---------\n"
      "\n"
      "The address expression involves node properties such as depth, "
      "bootstrap\n"
      "support, whether or not a node is a leaf, etc. These are represented "
      "by\n"
      "single-letter codes, to make expressions short. For example:\n"
      "\n"
      "				       i\n"
      "\n"
      "matches internal nodes, while\n"
      "\n"
      "				     b > 75\n"
      "\n"
      "matches nodes whose label has a numerical value of 75 or more (if the "
      "label\n"
      "is numeric). The usual logical and relational operators are available, "
      "so\n"
      "\n"
      "				   i & b > 75\n"
      "\n"
      "could be used to match internal nodes with a bootstrap support value\n"
      "greater than 75.\n"
      "\n"
      "The functions are:\n"
      "    a numeric    number of ancestors of node	\n"
      "    b numeric    node's support value (or zero)\n"
      "    d numeric    node's depth (distance to root)\n"
      "    c numeric    node's number of children\n"
      "    D numeric    node's number of descendants\n"
      "    i boolean    true iff node is strictly internal (i.e., not root!)\n"
      "    l boolean    true iff node is a leaf\n"
      "    r boolean    true iff node is the root\n"
      "\n"
      "The operators are:\n"
      "    ==  equality\n"
      "    !=  inequality\n"
      "    <   greater than\n"
      "    >   lesser than\n"
      "    >=  greater than or equal to\n"
      "    <=  lesser than or equal to\n"
      "    !   logical negation\n"
      "    &   logical and\n"
      "    |   logical or\n"
      "\n"
      "The operator precedence is: negation, relationals, and, or; i.e. \n"
      "\n"
      "				 1 == d & !i | l\n"
      "\n"
      "is equivalent to\n"
      "\n"
      "			       ((1 == d) & (!i)) | l\n"
      "\n"
      "Parentheses can be used for overriding precedence, or for clarity.\n"
      "\n"
      "Actions\n"
      "-------\n"
      "\n"
      "Actions are performed on nodes that match the address. They are:\n"
      "    s   (Subtree) print subtree rooted at matching node\n"
      "    o   (splice Out) splice out node, and attach children to parent, \n"
      "	   preserving branch lengths. This is useful for \"opening\" poorly\n"
      "          supported nodes.\n"
      "    d   Delete node\n"
      "    l   Print node's label\n"
      "\n"
      "\n"
      "Options\n"
      "-------\n"
      "\n"
      "    -h: print this help text, and exit\n"
      "    -n: do not print the (possibly modified) tree at the end of the run "
      "\n"
      "        (modeled after sed -n)\n"
      "    -r: visit tree in preorder (starting at root, and visiting a node\n"
      "        before any of its descendants). Default is post-order (ends at "
      "root\n"
      "        and visits a node after all its descendats).\n"
      "    -o: stop processing a clade after the first match - that is, if a "
      "node\n"
      "        matches, its descendants are not processed.\n"
      "        Note: this option will automatically set -r, as it makes no\n"
      "        sense in post-order.\n"
      "\n"
      "Bugs\n"
      "----\n"
      "\n"
      "Although there are no known bugs in this program, it is to be "
      "considered\n"
      "more experimental than the others.\n"
      "\n"
      "Examples\n"
      "--------\n"
      "\n"
      "# \"open\" all nodes with bootstrap support <= 10 (assuming support is "
      "coded\n"
      "# in internal node labels)\n"
      "\n"
      "$ %s data/HRV.bs.nw 'i & b <= 10' o \n"
      "\n"
      "# \"open\" all nodes with bootstrap support < 750, then discard leaves "
      "that\n"
      "# are directly attached to the ingroup's root. This effectively keeps "
      "only\n"
      "# leaves that are part of well-supported clades.\n"
      "\n"
      "$ %s data/big.rn.nw 'i & b < 750' o | %s - 'l & a == 2' d\n"
      "\n"
      "# get all clades with at least one ancestor, 980 or better support. Do "
      "not\n"
      "# print subtrees of matching clades, even if they match (option -o)\n"
      "\n"
      "$ %s data/big.rn.nw -n -o 'a >= 1 & b >= 980' s\n",
      argv[0], argv[0], argv[0], argv[0], argv[0], argv[0]);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    (%rax),%r8
mov    -0x8(%rbp),%rax
mov    (%rax),%r9
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
lea    0xeb3(%rip),%rdi
mov    %rax,(%rsp)
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    (%rdi),%rcx
mov    %rcx,(%rsp)
lea    0xee1(%rip),%rdi
mov    %rcx,%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
mov    %rcx,%r9
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [4059 x i8] c"Performs actions on nodes that match some condition\0A\0ASynopsis\0A--------\0A\0A%s [-hnor] <newick trees filename|-> <address> <action>\0A\0AInput\0A-----\0A\0AFirst argument is the name of a file that contains Newick trees, or '-' (in\0Awhich case trees are read from standard input).\0A\0ASecond argument is a node address, in the form of a logical expression (see\0AAddresses below).\0A\0AThird argument is a code that specifies an action to perform on nodes\0Awhich match the address (see Actions).\0A\0AOutput\0A------\0A\0ABy default, prints the input tree, which may have been modified. However,\0Athe 's' action (see Actions, below) causes matching subtrees to be\0Aprinted out.\0A\0AThis program is analogous to pattern-oriented, stream processing UNIX\0Autilities like sed(1) and awk(1), but instead of working on lines (like\0Ased) or records (like awk), %s works on tree nodes.\0A\0AThe program traverses the tree in Newick order, evaluating the address\0Aexpression for each node in turn. If (and only if) the address matches, the\0Aaction is performed.\0A\0AAddresses\0A---------\0A\0AThe address expression involves node properties such as depth, bootstrap\0Asupport, whether or not a node is a leaf, etc. These are represented by\0Asingle-letter codes, to make expressions short. For example:\0A\0A\09\09\09\09 i\0A\0Amatches internal nodes, while\0A\0A\09\09\09\09 b > 75\0A\0Amatches nodes whose label has a numerical value of 75 or more (if the label\0Ais numeric). The usual logical and relational operators are available, so\0A\0A\09\09\09\09 i & b > 75\0A\0Acould be used to match internal nodes with a bootstrap support value\0Agreater than 75.\0A\0AThe functions are:\0A a numeric number of ancestors of node\09\0A b numeric node's support value (or zero)\0A d numeric node's depth (distance to root)\0A c numeric node's number of children\0A D numeric node's number of descendants\0A i boolean true iff node is strictly internal (i.e., not root!)\0A l boolean true iff node is a leaf\0A r boolean true iff node is the root\0A\0AThe operators are:\0A == equality\0A != inequality\0A < greater than\0A > lesser than\0A >= greater than or equal to\0A <= lesser than or equal to\0A ! logical negation\0A & logical and\0A | logical or\0A\0AThe operator precedence is: negation, relationals, and, or; i.e. \0A\0A\09\09\09\09 1 == d & !i | l\0A\0Ais equivalent to\0A\0A\09\09\09 ((1 == d) & (!i)) | l\0A\0AParentheses can be used for overriding precedence, or for clarity.\0A\0AActions\0A-------\0A\0AActions are performed on nodes that match the address. They are:\0A s (Subtree) print subtree rooted at matching node\0A o (splice Out) splice out node, and attach children to parent, \0A\09 preserving branch lengths. This is useful for \22opening\22 poorly\0A supported nodes.\0A d Delete node\0A l Print node's label\0A\0A\0AOptions\0A-------\0A\0A -h: print this help text, and exit\0A -n: do not print the (possibly modified) tree at the end of the run \0A (modeled after sed -n)\0A -r: visit tree in preorder (starting at root, and visiting a node\0A before any of its descendants). Default is post-order (ends at root\0A and visits a node after all its descendats).\0A -o: stop processing a clade after the first match - that is, if a node\0A matches, its descendants are not processed.\0A Note: this option will automatically set -r, as it makes no\0A sense in post-order.\0A\0ABugs\0A----\0A\0AAlthough there are no known bugs in this program, it is to be considered\0Amore experimental than the others.\0A\0AExamples\0A--------\0A\0A# \22open\22 all nodes with bootstrap support <= 10 (assuming support is coded\0A# in internal node labels)\0A\0A$ %s data/HRV.bs.nw 'i & b <= 10' o \0A\0A# \22open\22 all nodes with bootstrap support < 750, then discard leaves that\0A# are directly attached to the ingroup's root. This effectively keeps only\0A# leaves that are part of well-supported clades.\0A\0A$ %s data/big.rn.nw 'i & b < 750' o | %s - 'l & a == 2' d\0A\0A# get all clades with at least one ancestor, 980 or better support. Do not\0A# print subtrees of matching clades, even if they match (option -o)\0A\0A$ %s data/big.rn.nw -n -o 'a >= 1 & b >= 980' s\0A\00"
define void @help(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = load i8**, i8*** %2
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = load i8**, i8*** %2
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = load i8**, i8*** %2
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = load i8**, i8*** %2
%16 = getelementptr inbounds i8*, i8** %15, i64 0
%17 = load i8*, i8** %16
%18 = load i8**, i8*** %2
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 @printf(i8* getelementptr inbounds ([4059 x i8], [4059 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %8, i8* %11, i8* %14, i8* %17, i8* %20)
ret void
}

LLVM IR (-O2):
@.str = [4059 x i8] c"Performs actions on nodes that match some condition\0A\0ASynopsis\0A--------\0A\0A%s [-hnor] <newick trees filename|-> <address> <action>\0A\0AInput\0A-----\0A\0AFirst argument is the name of a file that contains Newick trees, or '-' (in\0Awhich case trees are read from standard input).\0A\0ASecond argument is a node address, in the form of a logical expression (see\0AAddresses below).\0A\0AThird argument is a code that specifies an action to perform on nodes\0Awhich match the address (see Actions).\0A\0AOutput\0A------\0A\0ABy default, prints the input tree, which may have been modified. However,\0Athe 's' action (see Actions, below) causes matching subtrees to be\0Aprinted out.\0A\0AThis program is analogous to pattern-oriented, stream processing UNIX\0Autilities like sed(1) and awk(1), but instead of working on lines (like\0Ased) or records (like awk), %s works on tree nodes.\0A\0AThe program traverses the tree in Newick order, evaluating the address\0Aexpression for each node in turn. If (and only if) the address matches, the\0Aaction is performed.\0A\0AAddresses\0A---------\0A\0AThe address expression involves node properties such as depth, bootstrap\0Asupport, whether or not a node is a leaf, etc. These are represented by\0Asingle-letter codes, to make expressions short. For example:\0A\0A\09\09\09\09 i\0A\0Amatches internal nodes, while\0A\0A\09\09\09\09 b > 75\0A\0Amatches nodes whose label has a numerical value of 75 or more (if the label\0Ais numeric). The usual logical and relational operators are available, so\0A\0A\09\09\09\09 i & b > 75\0A\0Acould be used to match internal nodes with a bootstrap support value\0Agreater than 75.\0A\0AThe functions are:\0A a numeric number of ancestors of node\09\0A b numeric node's support value (or zero)\0A d numeric node's depth (distance to root)\0A c numeric node's number of children\0A D numeric node's number of descendants\0A i boolean true iff node is strictly internal (i.e., not root!)\0A l boolean true iff node is a leaf\0A r boolean true iff node is the root\0A\0AThe operators are:\0A == equality\0A != inequality\0A < greater than\0A > lesser than\0A >= greater than or equal to\0A <= lesser than or equal to\0A ! logical negation\0A & logical and\0A | logical or\0A\0AThe operator precedence is: negation, relationals, and, or; i.e. \0A\0A\09\09\09\09 1 == d & !i | l\0A\0Ais equivalent to\0A\0A\09\09\09 ((1 == d) & (!i)) | l\0A\0AParentheses can be used for overriding precedence, or for clarity.\0A\0AActions\0A-------\0A\0AActions are performed on nodes that match the address. They are:\0A s (Subtree) print subtree rooted at matching node\0A o (splice Out) splice out node, and attach children to parent, \0A\09 preserving branch lengths. This is useful for \22opening\22 poorly\0A supported nodes.\0A d Delete node\0A l Print node's label\0A\0A\0AOptions\0A-------\0A\0A -h: print this help text, and exit\0A -n: do not print the (possibly modified) tree at the end of the run \0A (modeled after sed -n)\0A -r: visit tree in preorder (starting at root, and visiting a node\0A before any of its descendants). Default is post-order (ends at root\0A and visits a node after all its descendats).\0A -o: stop processing a clade after the first match - that is, if a node\0A matches, its descendants are not processed.\0A Note: this option will automatically set -r, as it makes no\0A sense in post-order.\0A\0ABugs\0A----\0A\0AAlthough there are no known bugs in this program, it is to be considered\0Amore experimental than the others.\0A\0AExamples\0A--------\0A\0A# \22open\22 all nodes with bootstrap support <= 10 (assuming support is coded\0A# in internal node labels)\0A\0A$ %s data/HRV.bs.nw 'i & b <= 10' o \0A\0A# \22open\22 all nodes with bootstrap support < 750, then discard leaves that\0A# are directly attached to the ingroup's root. This effectively keeps only\0A# leaves that are part of well-supported clades.\0A\0A$ %s data/big.rn.nw 'i & b < 750' o | %s - 'l & a == 2' d\0A\0A# get all clades with at least one ancestor, 980 or better support. Do not\0A# print subtrees of matching clades, even if they match (option -o)\0A\0A$ %s data/big.rn.nw -n -o 'a >= 1 & b >= 980' s\0A\00"
define void @help(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4059 x i8], [4059 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %2, i8* %2, i8* %2, i8* %2, i8* %2)
ret void
}