(command.CommandList
  children: [
    (C {<export>} {<Id.Lit_VarLike 'LANG='> <C>})
    (C {<ulimit>} {<-c>} {<0>})
    (C {<trap>} {(SQ )} {<TSTP>})
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:save_tty)
              op: assign_op.Equal
              rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<stty>} {<-g>}))}
              spids: [121]
            )
          ]
        )
        (C {<trap>} {(DQ <'stty '> ($ Id.VSub_DollarName '$save_tty'))} {<EXIT>})
      ]
    )
    (C {<stty>} {<quit>} {(SQ <' '>)})
    (C {<stty>} {<eof>} {(SQ <'?'>)})
    (C {<stty>} {<-echo>})
    (command.ShFunction
      name: cache_progs
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{<stty>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
              do_fork: T
            )
            (command.Simple
              words: [{<date>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
              do_fork: T
            )
            (command.Simple
              words: [{<grep>} {<.>}]
              redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'/dev/null'>})]
              do_fork: T
            )
            (command.Subshell
              child: 
                (command.Pipeline
                  children: [(C {<echo>} {(DQ <'import time'>)}) (C {<python>})]
                  negated: F
                )
              redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})]
            )
            (command.Simple
              words: [{<bc>}]
              redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'/dev/null'>})]
              do_fork: T
            )
            (command.Simple
              words: [{<sed>} {(SQ )}]
              redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'/dev/null'>})]
              do_fork: T
            )
            (command.Simple
              words: [{<printf>} {(SQ <1>)}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
              do_fork: T
            )
            (command.Simple
              words: [{<'/usr/bin/time'>} {<false>}]
              redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})]
              do_fork: T
            )
            (command.Simple
              words: [{<cat>}]
              redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'/dev/null'>})]
              do_fork: T
            )
          ]
        )
    )
    (C {<cache_progs>})
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (command.Pipeline
          children: [
            (C {<date>} {<Id.Lit_Other '+'> <Id.Lit_Other '%'> <s.> <Id.Lit_Other '%'> <N>})
            (C {<grep>} {<-qF>} {(SQ <N>)})
          ]
          negated: F
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:use_python)
              op: assign_op.Equal
              rhs: {<1>}
              spids: [292]
            )
          ]
        )
      ]
    )
    (command.ShFunction
      name: now
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$use_python'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{<echo>} {(DQ <'import time; print time.time()'>)}]
                          redirects: [
                            (redir
                              op: <Id.Redir_Great '2>'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<'/dev/null'>}
                            )
                          ]
                          do_fork: T
                        )
                        (C {<python>})
                      ]
                      negated: F
                    )
                  ]
                  spids: [305 316]
                )
              ]
              else_action: [
                (C {<printf>} {(DQ <'%.2f'>)} 
                  {
                    (command_sub
                      left_token: <Id.Left_Backtick '`'>
                      child: 
                        (C {<date>} {<Id.Lit_Other '+'> <Id.Lit_Other '%'> <s.> <Id.Lit_Other '%'> <N>})
                    )
                  }
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: fmt_seconds
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:seconds)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [367]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:mins)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {($ Id.VSub_DollarName '$seconds') <'/60'>})
                              (C {<bc>})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [371]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$mins'))} 
                              {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <0>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:seconds)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (command.Pipeline
                                    children: [
                                      (C {<echo>} 
                                        {
                                          (DQ ($ Id.VSub_DollarName '$seconds') <' - ('> 
                                            ($ Id.VSub_DollarName '$mins') <'*60)'>
                                          )
                                        }
                                      )
                                      (C {<bc>})
                                    ]
                                    negated: F
                                  )
                              )
                            }
                          spids: [407]
                        )
                      ]
                    )
                    (C {<echo>} 
                      {(DQ ($ Id.VSub_DollarName '$mins') <':'> ($ Id.VSub_DollarName '$seconds'))}
                    )
                  ]
                  spids: [386 404]
                )
              ]
              else_action: [(C {<echo>} {(DQ ($ Id.VSub_DollarName '$seconds'))})]
            )
          ]
        )
    )
    (command.ShFunction
      name: total
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:end)
                  op: assign_op.Equal
                  rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<now>}))}
                  spids: [457]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:total)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} 
                                {
                                  (DQ ($ Id.VSub_DollarName '$end') <' - '> 
                                    ($ Id.VSub_DollarName '$start')
                                  )
                                }
                              )
                              (C {<bc>})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [465]
                )
              ]
            )
            (C {<fmt_seconds>} {($ Id.VSub_DollarName '$total')})
          ]
        )
    )
    (command.ShFunction
      name: stop
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$lapped'))} 
                  {<Id.Lit_RBracket ']'>}
                )
                (C {<lap>} {(DQ ($ Id.VSub_DollarName '$laptime'))} {(DQ <display>)})
              ]
            )
            (C {<total>})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit>)
          ]
        )
    )
    (command.ShFunction
      name: lap
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:laptime)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {(DQ ($ Id.VSub_Number '$1'))})
                              (C {<sed>} {<-n>} {(SQ <'s/.*real[^0-9.]*\\(.*\\)/\\1/p'>)})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [533]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {(DQ ($ Id.VSub_DollarName '$laptime'))} 
                  {<-o>} {(DQ ($ Id.VSub_DollarName '$laptime'))} {<Id.Lit_Equals '='>} {(DQ <0.00>)} {<Id.Lit_RBracket ']'>}
                )
                (command.ControlFlow token:<Id.ControlFlow_Return return>)
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:laptotal)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} 
                                {($ Id.VSub_DollarName '$laptime') <Id.Lit_Other '+'> <0> 
                                  ($ Id.VSub_DollarName '$laptotal')
                                }
                              )
                              (C {<bc>})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [591]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Number '$2'))} 
                              {<Id.Lit_Equals '='>} {(DQ <display>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:lapcount)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (command.Pipeline
                                    children: [
                                      (C {<echo>} 
                                        {<0> ($ Id.VSub_DollarName '$lapcount') <Id.Lit_Other '+'> <1>}
                                      )
                                      (C {<bc>})
                                    ]
                                    negated: F
                                  )
                              )
                            }
                          spids: [628]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:laptime)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: (C {<fmt_seconds>} {($ Id.VSub_DollarName '$laptotal')})
                              )
                            }
                          spids: [645]
                        )
                      ]
                    )
                    (C {<echo>} {($ Id.VSub_DollarName '$laptime')} 
                      {(DQ <'('> ($ Id.VSub_DollarName '$lapcount') <')'>)}
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:lapped)
                          op: assign_op.Equal
                          rhs: {(DQ <true>)}
                          spids: [666]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:laptotal)
                          op: assign_op.Equal
                          rhs: {(DQ <0>)}
                          spids: [672]
                        )
                      ]
                    )
                  ]
                  spids: [608 625]
                )
              ]
            )
          ]
        )
    )
    (command.Simple
      words: [{<printf>} {(DQ <'Space for lap | ? for split | Ctrl-C to stop | Space to start...'>)}]
      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
      do_fork: T
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [(command.Sentence child:(C {<true>}) terminator:<Id.Op_Semi _>)]
        )
      body: 
        (command.DoGroup
          children: [
            (C {<trap>} {<true>} {<INT>} {<QUIT>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:laptime)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Simple
                            words: [{<'/usr/bin/time'>} {<-p>} {<cat>}]
                            redirects: [
                              (redir
                                op: <Id.Redir_GreatAnd '2>&'>
                                loc: (redir_loc.Fd fd:2)
                                arg: {<1>}
                              )
                              (redir
                                op: <Id.Redir_Great '>'>
                                loc: (redir_loc.Fd fd:1)
                                arg: {<'/dev/null'>}
                              )
                            ]
                            do_fork: T
                          )
                      )
                    }
                  spids: [712]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:ret)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [730]
                )
              ]
            )
            (C {<trap>} {(SQ )} {<INT>} {<QUIT>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$ret')} {<-eq>} {<1>} 
                              {<-o>} {($ Id.VSub_DollarName '$ret')} {<-eq>} {<2>} {<-o>} {($ Id.VSub_DollarName '$ret')} {<-eq>} {<130>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} 
                          {(DQ ($ Id.VSub_DollarName '$start'))} {<Id.Lit_RBracket ']'>}
                        )
                        (BraceGroup
                          children: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  words: [{<echo>}]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_GreatAnd '>&'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<2>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Sentence
                              child: (command.ControlFlow token:<Id.ControlFlow_Exit exit>)
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      ]
                    )
                    (C {<stop>})
                  ]
                  spids: [747 776]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$ret')} {<-eq>} {<3>} 
                              {<-o>} {($ Id.VSub_DollarName '$ret')} {<-eq>} {<131>} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} 
                                      {(DQ ($ Id.VSub_DollarName '$start'))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:start)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (command_sub
                                            left_token: <Id.Left_Backtick '`'>
                                            child: (C {<now>})
                                          )
                                        }
                                      spids: [854]
                                    )
                                  ]
                                )
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Exit exit>
                                  arg_word: {<1>}
                                )
                              ]
                            )
                            (command.Simple
                              words: [{<echo>}]
                              redirects: [
                                (redir
                                  op: <Id.Redir_GreatAnd '>&'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<2>}
                                )
                              ]
                              do_fork: T
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Continue continue>
                            )
                          ]
                          spids: [838 851]
                        )
                      ]
                    )
                    (C {<lap>} {(DQ ($ Id.VSub_DollarName '$laptime'))} {(DQ <display>)})
                  ]
                  spids: [811 832]
                )
              ]
              else_action: [
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {(DQ ($ Id.VSub_DollarName '$start'))} 
                      {<Id.Lit_RBracket ']'>}
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Continue continue>)
                  ]
                )
                (C {<total>})
                (C {<lap>} {(DQ ($ Id.VSub_DollarName '$laptime'))})
              ]
            )
          ]
        )
    )
  ]
)