(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:file)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_Number '$1'))}
          spids: [75]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:epoch)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_Number '$2'))}
          spids: [80]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.AndOr
                  ops: [Id.Op_DPipe]
                  children: [
                    (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-f)} 
                      {(DQ ($ Id.VSub_DollarName '$file'))} {(Id.Lit_RBracket ']')}
                    )
                    (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-ne)} {(1)} {(-a)} 
                      {($ Id.VSub_Pound '$#')} {(-ne)} {(2)} {(Id.Lit_RBracket ']')}
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:119)
            )
          ]
          action: [
            (command.Simple
              words: [
                {(echo)}
                {
                  (DQ ('Usage: ') 
                    (command_sub
                      left_token: (Token id:Id.Left_Backtick val:'`' span_id:128)
                      command_list: 
                        (command.CommandList
                          children: [(C {(basename)} {($ Id.VSub_Number '$0')})]
                        )
                    ) (' file [epoch]')
                  )
                }
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:138)
                  fd: -1
                  arg_word: {(2)}
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:142)
              arg_word: {(1)}
            )
          ]
          spids: [86 121]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(DQ ($ Id.VSub_DollarName '$epoch'))} 
                  {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:160)
            )
          ]
          action: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:epoch)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_Backtick val:'`' span_id:166)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(date)} 
                                    {(--reference) (Id.Lit_Equals '=') 
                                      (DQ ($ Id.VSub_DollarName '$file'))
                                    } {(Id.Lit_Other '+') (Id.Lit_Other '%') (s.) (Id.Lit_Other '%') (N)}
                                  )
                                ]
                              )
                          )
                        }
                      spids: [165]
                    )
                  ]
                )
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:186)
                  arg_word: {(1)}
                )
              ]
            )
          ]
          spids: [149 162]
        )
      ]
      else_action: [
        (command.If
          arms: [
            (if_arm
              cond: [
                (command.Sentence
                  child: 
                    (command.Pipeline
                      children: [
                        (C {(echo)} {(DQ ($ Id.VSub_DollarName '$epoch'))})
                        (C {(grep)} {(-Eq)} {(DQ ('^[') (Id.Lit_Other '\\') ('+-]'))})
                      ]
                      negated: F
                    )
                  terminator: (Token id:Id.Op_Semi val:';' span_id:212)
                )
              ]
              action: [
                (command.Simple
                  words: [{(echo)} {(DQ ('Epochs with leading +/- are ambiguous with editor options'))}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:223)
                      fd: -1
                      arg_word: {(2)}
                    )
                  ]
                )
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:227)
                  arg_word: {(1)}
                )
              ]
              spids: [193 214]
            )
          ]
        )
        (command.If
          arms: [
            (if_arm
              cond: [
                (command.Sentence
                  child: 
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [
                            {(date)}
                            {(--date) (Id.Lit_Equals '=') 
                              (DQ ('1970-01-01 UTC ') ($ Id.VSub_DollarName '$epoch') (' seconds'))
                            }
                          ]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_Great val:'>' span_id:249)
                              fd: -1
                              arg_word: {(/dev/null)}
                            )
                            (redir.Redir
                              op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:252)
                              fd: 2
                              arg_word: {(1)}
                            )
                          ]
                        )
                      ]
                      negated: T
                    )
                  terminator: (Token id:Id.Op_Semi val:';' span_id:254)
                )
              ]
              action: [
                (command.Simple
                  words: [
                    {(echo)}
                    {(DQ ('Invalid epoch specified [') ($ Id.VSub_DollarName '$epoch') (']'))}
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:267)
                      fd: -1
                      arg_word: {(2)}
                    )
                  ]
                )
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:271)
                  arg_word: {(1)}
                )
              ]
              spids: [235 256]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (C {(echo)} {(DQ ($ Id.VSub_DollarName '$epoch'))})
                    (C {(grep)} {(-Fq)} {(DQ (.))})
                  ]
                  negated: F
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:298)
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:seconds)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_Backtick val:'`' span_id:307)
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(echo)} {($ Id.VSub_DollarName '$epoch')})
                                  (C {(cut)} {(-d.)} {(-f1)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [306]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {(echo)} {($ Id.VSub_DollarName '$epoch')})
                            (C {(grep)} {(-Eq)} {(DQ (Id.Lit_Other '\\') ('.0+') (Id.Lit_Other '$'))})
                          ]
                          negated: F
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:341)
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:epoch)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName '$seconds')}
                          spids: [349]
                        )
                      ]
                    )
                  ]
                  spids: [324 343]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:checkns)
                      op: assign_op.Equal
                      rhs: {(DQ (true))}
                      spids: [359]
                    )
                  ]
                )
              ]
            )
          ]
          spids: [281 300]
        )
      ]
    )
    (C 
      {
        (braced_var_sub
          token: (Token id:Id.VSub_Name val:EDITOR span_id:373)
          suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(vim)})
        )
      } {(DQ ($ Id.VSub_DollarName '$file'))}
    )
    (command.AndOr
      ops: [Id.Op_DAmp Id.Op_DPipe]
      children: [
        (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(DQ ($ Id.VSub_DollarName '$seconds'))} 
          {(Id.Lit_RBracket ']')}
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:err)
              op: assign_op.Equal
              rhs: {(DQ (/dev/tty))}
              spids: [394]
            )
          ]
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:err)
              op: assign_op.Equal
              rhs: {(DQ (/dev/null))}
              spids: [401]
            )
          ]
        )
      ]
    )
    (command.Simple
      words: [
        {(touch)}
        {(DQ ($ Id.VSub_DollarName '$file'))}
        {(--date) (Id.Lit_Equals '=') 
          (DQ ('1970-01-01 UTC ') ($ Id.VSub_DollarName '$epoch') (' seconds'))
        }
      ]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'2>' span_id:420)
          fd: 2
          arg_word: {($ Id.VSub_DollarName '$err')}
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {($ Id.VSub_QMark '$?')} {(-ne)} {(0)} {(-a)} 
                  {(DQ ($ Id.VSub_DollarName '$seconds'))} {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:440)
            )
          ]
          action: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(touch)} {(DQ ($ Id.VSub_DollarName '$file'))} 
                  {(--date) (Id.Lit_Equals '=') 
                    (DQ ('1970-01-01 UTC ') ($ Id.VSub_DollarName '$seconds') (' seconds'))
                  }
                )
                (command.Simple
                  words: [{(echo)} {(DQ ('Warning: sub second portion of timestamp ignored'))}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:471)
                      fd: -1
                      arg_word: {(2)}
                    )
                  ]
                )
              ]
            )
          ]
          spids: [423 442]
        )
      ]
      else_action: [
        (command.If
          arms: [
            (if_arm
              cond: [
                (command.Sentence
                  child: 
                    (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$checkns'))} 
                      {(Id.Lit_RBracket ']')}
                    )
                  terminator: (Token id:Id.Op_Semi val:';' span_id:486)
                )
              ]
              action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:new_ts)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_Backtick val:'`' span_id:492)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(date)} 
                                    {(--reference) (Id.Lit_Equals '=') 
                                      (DQ ($ Id.VSub_DollarName '$file'))
                                    } {(Id.Lit_Other '+') (Id.Lit_Other '%') (s.) (Id.Lit_Other '%') (N)}
                                  )
                                ]
                              )
                          )
                        }
                      spids: [491]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:diff)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_Backtick val:'`' span_id:512)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Pipeline
                                    children: [
                                      (C {(echo)} 
                                        {
                                          (DQ ('((') ($ Id.VSub_DollarName '$epoch') (-) 
                                            ($ Id.VSub_DollarName '$new_ts') (')*10^9)/1')
                                          )
                                        }
                                      )
                                      (C {(bc)})
                                    ]
                                    negated: F
                                  )
                                ]
                              )
                          )
                        }
                      spids: [511]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {(Id.Lit_LBracket '[')} {($ Id.VSub_DollarName '$diff')} {(-ne)} {(0)} 
                              {(Id.Lit_RBracket ']')}
                            )
                          terminator: (Token id:Id.Op_Semi val:';' span_id:542)
                        )
                      ]
                      action: [
                        (command.Simple
                          words: [
                            {(echo)}
                            {(DQ ('Warning: timestamp set ') (${ Id.VSub_Name diff) ('ns backwards'))}
                          ]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:557)
                              fd: -1
                              arg_word: {(2)}
                            )
                          ]
                        )
                      ]
                      spids: [531 544]
                    )
                  ]
                )
              ]
              spids: [477 488]
            )
          ]
        )
      ]
    )
  ]
)