(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 left:<Id.Lit_VarLike 'save_tty='> name:save_tty)
              op: assign_op.Equal
              rhs: 
                {
                  (command_sub
                    left_token: <Id.Left_Backtick '`'>
                    child: (C {<stty>} {<-g>})
                    right: <Id.Backtick_Right '`'>
                  )
                }
              spids: [121]
            )
          ]
          redirects: []
        )
        (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
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              words: [{<stty>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
              more_env: []
              do_fork: T
            )
            (command.Simple
              words: [{<date>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
              more_env: []
              do_fork: T
            )
            (command.Simple
              words: [{<grep>} {<.>}]
              redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'/dev/null'>})]
              more_env: []
              do_fork: T
            )
            (command.Subshell
              child: 
                (command.Pipeline
                  children: [(C {<echo>} {(DQ <'import time'>)}) (C {<python>})]
                  negated: F
                  stderr_indices: []
                )
              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'>})]
              more_env: []
              do_fork: T
            )
            (command.Simple
              words: [{<sed>} {(SQ )}]
              redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'/dev/null'>})]
              more_env: []
              do_fork: T
            )
            (command.Simple
              words: [{<printf>} {(SQ <1>)}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
              more_env: []
              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'>})]
              more_env: []
              do_fork: T
            )
            (command.Simple
              words: [{<cat>}]
              redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'/dev/null'>})]
              more_env: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (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
          stderr_indices: []
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'use_python='> name:use_python)
              op: assign_op.Equal
              rhs: {<1>}
              spids: [292]
            )
          ]
          redirects: []
        )
      ]
    )
    (command.ShFunction
      name: now
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          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'>}
                            )
                          ]
                          more_env: []
                          do_fork: T
                        )
                        (C {<python>})
                      ]
                      negated: F
                      stderr_indices: []
                    )
                  ]
                  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>})
                      right: <Id.Backtick_Right '`'>
                    )
                  }
                )
              ]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: fmt_seconds
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'seconds='> name:seconds)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 1)}
                  spids: [367]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'mins='> 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
                            stderr_indices: []
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [371]
                )
              ]
              redirects: []
            )
            (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 left:<Id.Lit_VarLike 'seconds='> 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
                                    stderr_indices: []
                                  )
                                right: <Id.Backtick_Right '`'>
                              )
                            }
                          spids: [407]
                        )
                      ]
                      redirects: []
                    )
                    (C {<echo>} {(DQ ($ Id.VSub_DollarName mins) <':'> ($ Id.VSub_DollarName seconds))})
                  ]
                  spids: [386 404]
                )
              ]
              else_action: [(C {<echo>} {(DQ ($ Id.VSub_DollarName seconds))})]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: total
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'end='> name:end)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<now>})
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [457]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'total='> 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
                            stderr_indices: []
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [465]
                )
              ]
              redirects: []
            )
            (C {<fmt_seconds>} {($ Id.VSub_DollarName total)})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: stop
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          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>)
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: lap
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'laptime='> 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
                            stderr_indices: []
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [533]
                )
              ]
              redirects: []
            )
            (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 left:<Id.Lit_VarLike 'laptotal='> 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
                            stderr_indices: []
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [591]
                )
              ]
              redirects: []
            )
            (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 left:<Id.Lit_VarLike 'lapcount='> 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
                                    stderr_indices: []
                                  )
                                right: <Id.Backtick_Right '`'>
                              )
                            }
                          spids: [628]
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'laptime='> name:laptime)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: (C {<fmt_seconds>} {($ Id.VSub_DollarName laptotal)})
                                right: <Id.Backtick_Right '`'>
                              )
                            }
                          spids: [645]
                        )
                      ]
                      redirects: []
                    )
                    (C {<echo>} {($ Id.VSub_DollarName laptime)} 
                      {(DQ <'('> ($ Id.VSub_DollarName lapcount) <')'>)}
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'lapped='> name:lapped)
                          op: assign_op.Equal
                          rhs: {(DQ <true>)}
                          spids: [666]
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'laptotal='> name:laptotal)
                          op: assign_op.Equal
                          rhs: {(DQ <0>)}
                          spids: [672]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [608 625]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (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>})]
      more_env: []
      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 left:<Id.Lit_VarLike 'laptime='> 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'>}
                              )
                            ]
                            more_env: []
                            do_fork: T
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [712]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ret='> name:ret)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '?')}
                  spids: [730]
                )
              ]
              redirects: []
            )
            (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
                          left: <Id.Lit_LBrace '{'>
                          children: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  words: [{<echo>}]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_GreatAnd '>&'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<2>}
                                    )
                                  ]
                                  more_env: []
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Sentence
                              child: (command.ControlFlow token:<Id.ControlFlow_Exit exit>)
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          redirects: []
                          right: <Id.Lit_RBrace '}'>
                        )
                      ]
                    )
                    (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
                                          left: <Id.Lit_VarLike 'start='>
                                          name: start
                                        )
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (command_sub
                                            left_token: <Id.Left_Backtick '`'>
                                            child: (C {<now>})
                                            right: <Id.Backtick_Right '`'>
                                          )
                                        }
                                      spids: [854]
                                    )
                                  ]
                                  redirects: []
                                )
                                (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>}
                                )
                              ]
                              more_env: []
                              do_fork: T
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Continue continue>
                            )
                          ]
                          spids: [838 851]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (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))})
              ]
              redirects: []
            )
          ]
        )
      redirects: []
    )
  ]
)