(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:wordlib)
          op: assign_op.Equal
          rhs: {(DQ <'/usr/lib/games/long-words.txt'>)}
          spids: [16]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:empty)
          op: assign_op.Equal
          rhs: {(DQ <Id.Lit_BadBackslash '\\'> <.>)}
          spids: [21]
        )
      ]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:games) op:assign_op.Equal rhs:{<0>} spids:[30])]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-r>} 
                      {(DQ ($ Id.VSub_DollarName '$wordlib'))} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ ($ Id.VSub_Number '$0') <': Missing word library '> 
                    ($ Id.VSub_DollarName '$wordlib')
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.Simple
              words: [
                {<echo>}
                {(DQ <'(online: http://www.intuitive.com/wicked/examples/long-words.txt'>)}
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'save the file as '> ($ Id.VSub_DollarName '$wordlib') 
                    <' and you\'re ready to play!)'>
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [38 54]
        )
      ]
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: 
                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$guess'))} 
                  {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <quit>)} {<Id.Lit_RBracket ']'>}
                )
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:match)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: (C {<randomquote>} {($ Id.VSub_DollarName '$wordlib')})
                        )
                      )
                    }
                  spids: [124]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$games')} {<-gt>} {<0>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<echo>} {(DQ )}) (C {<echo>} {(DQ <'*** New Game! ***'>)})]
                  spids: [138 152]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:games)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (word_part.ArithSub
                          anode: 
                            (arith_expr.Binary
                              op_id: Id.Arith_Plus
                              left: {($ Id.VSub_DollarName '$games')}
                              right: {<Id.Lit_Digits 1>}
                            )
                        )
                      )
                    }
                  spids: [172]
                )
              ]
            )
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:guessed)
                      op: assign_op.Equal
                      rhs: {(DQ )}
                      spids: [187]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:guess)
                      op: assign_op.Equal
                      rhs: {(DQ )}
                      spids: [193]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:bad)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Number 1>
                        suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{<6>})
                      )
                    }
                  spids: [199]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:partial)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.Pipeline
                              children: [
                                (C {<echo>} {($ Id.VSub_DollarName '$match')})
                                (C {<sed>} 
                                  {
                                    (DQ <'s/[^'> ($ Id.VSub_DollarName '$empty') 
                                      (${ Id.VSub_Name guessed) <']/-/g'>
                                    )
                                  }
                                )
                              ]
                              negated: F
                            )
                        )
                      )
                    }
                  spids: [207]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$guess'))} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName '$match'))} {<-a>} {(DQ ($ Id.VSub_DollarName '$guess'))} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <quit>)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (C {<echo>} {(DQ )})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                                      {(DQ ($ Id.VSub_DollarName '$guessed'))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<'/bin/echo'>} {<-n>} 
                              {(DQ <'Guessed: '> ($ Id.VSub_DollarName '$guessed') <', '>)}
                            )
                          ]
                          spids: [278 294]
                        )
                      ]
                    )
                    (C {<echo>} 
                      {
                        (DQ <'Steps from gallows: '> ($ Id.VSub_DollarName '$bad') <', word so far: '> 
                          ($ Id.VSub_DollarName '$partial')
                        )
                      }
                    )
                    (C {<'/bin/echo'>} {<-n>} {(DQ <'Guess a letter: '>)})
                    (C {<read>} {<guess>})
                    (C {<echo>} {(DQ )})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$guess'))} 
                                      {<Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName '$match'))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [(C {<echo>} {(DQ <'You got it!'>)})]
                          spids: [347 365]
                        )
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$guess'))} 
                                      {<Id.Lit_Equals '='>} {(DQ <quit>)} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [(C {<sleep>} {<0>})]
                          spids: [378 396]
                        )
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} 
                                      {
                                        (command_sub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Pipeline
                                              children: [
                                                (C {<echo>} {($ Id.VSub_DollarName '$guess')})
                                                (C {<wc>} {<-c>})
                                                (C {<sed>} {(SQ <'s/[^[:digit:]]//g'>)})
                                              ]
                                              negated: F
                                            )
                                        )
                                      } {<-ne>} {<2>} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<echo>} {(DQ <'Uh oh: You can only guess a single letter at a time'>)})
                          ]
                          spids: [414 446]
                        )
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                                      {
                                        (DQ 
                                          (command_sub
                                            left_token: <Id.Left_DollarParen '$('>
                                            child: 
                                              (command.Pipeline
                                                children: [
                                                  (C {<echo>} {($ Id.VSub_DollarName '$guess')})
                                                  (C {<sed>} {(SQ <'s/[[:lower:]]//g'>)})
                                                ]
                                                negated: F
                                              )
                                          )
                                        )
                                      } {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<echo>} 
                              {(DQ <'Uh oh: Please only use lowercase letters for your guesses'>)}
                            )
                          ]
                          spids: [457 485]
                        )
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-z>} 
                                      {
                                        (DQ 
                                          (command_sub
                                            left_token: <Id.Left_DollarParen '$('>
                                            child: 
                                              (command.Pipeline
                                                children: [
                                                  (C {<echo>} {($ Id.VSub_DollarName '$guess')})
                                                  (C {<sed>} 
                                                    {
                                                      (DQ <'s/['> ($ Id.VSub_DollarName '$empty') 
                                                        ($ Id.VSub_DollarName '$guessed') <']//g'>
                                                      )
                                                    }
                                                  )
                                                ]
                                                negated: F
                                              )
                                          )
                                        )
                                      } {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<echo>} 
                              {
                                (DQ <'Uh oh: You have already tried '> ($ Id.VSub_DollarName '$guess'))
                              }
                            )
                          ]
                          spids: [495 524]
                        )
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} 
                                      {
                                        (DQ 
                                          (command_sub
                                            left_token: <Id.Left_DollarParen '$('>
                                            child: 
                                              (command.Pipeline
                                                children: [
                                                  (C {<echo>} {($ Id.VSub_DollarName '$match')})
                                                  (C {<sed>} 
                                                    {
                                                      (DQ <'s/'> ($ Id.VSub_DollarName '$guess') 
                                                        <'/-/g'>
                                                      )
                                                    }
                                                  )
                                                ]
                                                negated: F
                                              )
                                          )
                                        )
                                      } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName '$match'))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:guessed)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ ($ Id.VSub_DollarName '$guessed') 
                                        ($ Id.VSub_DollarName '$guess')
                                      )
                                    }
                                  spids: [575]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:partial)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (command_sub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Pipeline
                                              children: [
                                                (C {<echo>} {($ Id.VSub_DollarName '$match')})
                                                (C {<sed>} 
                                                  {
                                                    (DQ <'s/[^'> ($ Id.VSub_DollarName '$empty') 
                                                      (${ Id.VSub_Name guessed) <']/-/g'>
                                                    )
                                                  }
                                                )
                                              ]
                                              negated: F
                                            )
                                        )
                                      )
                                    }
                                  spids: [582]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} 
                                              {(DQ ($ Id.VSub_DollarName '$partial'))} {<Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName '$match'))} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<echo>} 
                                      {
                                        (DQ <'** You\'ve been pardoned!! Well done!  The word was '> 
                                          (word_part.EscapedLiteral
                                            token: <Id.Lit_EscapedChar '\\"'>
                                          ) ($ Id.VSub_DollarName '$match') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <.>
                                        )
                                      }
                                    )
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:guess)
                                          op: assign_op.Equal
                                          rhs: {(DQ ($ Id.VSub_DollarName '$match'))}
                                          spids: [637]
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [605 623]
                                )
                              ]
                              else_action: [
                                (C {<echo>} 
                                  {
                                    (DQ <'* Great! The letter '> 
                                      (word_part.EscapedLiteral
                                        token: <Id.Lit_EscapedChar '\\"'>
                                      ) ($ Id.VSub_DollarName '$guess') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                                      <' appears in the word!'>
                                    )
                                  }
                                )
                              ]
                            )
                          ]
                          spids: [539 572]
                        )
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$bad')} {<-eq>} 
                                      {<1>} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<echo>} 
                              {
                                (DQ 
                                  <
'** Uh oh: you\'ve run out of steps. You\'re on the platform... <SNAP!>'
                                  >
                                )
                              }
                            )
                            (C {<echo>} 
                              {
                                (DQ <'** The word you were trying to guess was '> 
                                  (word_part.EscapedLiteral
                                    token: <Id.Lit_EscapedChar '\\"'>
                                  ) ($ Id.VSub_DollarName '$match') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                                )
                              }
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:guess)
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_DollarName '$match'))}
                                  spids: [695]
                                )
                              ]
                            )
                          ]
                          spids: [661 675]
                        )
                      ]
                      else_action: [
                        (C {<echo>} 
                          {
                            (DQ <'* Nope, '> 
                              (word_part.EscapedLiteral
                                token: <Id.Lit_EscapedChar '\\"'>
                              ) ($ Id.VSub_DollarName '$guess') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                              <' does not appear in the word.'>
                            )
                          }
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:guessed)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ ($ Id.VSub_DollarName '$guessed') 
                                    ($ Id.VSub_DollarName '$guess')
                                  )
                                }
                              spids: [715]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:bad)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (word_part.ArithSub
                                    anode: 
                                      (arith_expr.Binary
                                        op_id: Id.Arith_Minus
                                        left: {($ Id.VSub_DollarName '$bad')}
                                        right: {<Id.Lit_Digits 1>}
                                      )
                                  )
                                }
                              spids: [722]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)