(CommandList
  children: [
    (C {(Lit_Other ':')} {(included)} {(from)} {(t2016)} {(and)} {(others)})
    (C {(.)} {(./test-lib.sh)})
    (FuncDef
      name: set_state
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DAmp Op_DAmp]
              children: [
                (SimpleCommand
                  words: [{(echo)} {(DQ ($ VSub_Number '$3'))}]
                  redirects: [
                    (Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_Number '$1'))}
                    )
                  ]
                )
                (C {(git)} {(add)} {(DQ ($ VSub_Number '$1'))})
                (SimpleCommand
                  words: [{(echo)} {(DQ ($ VSub_Number '$2'))}]
                  redirects: [
                    (Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_Number '$1'))}
                    )
                  ]
                )
              ]
            )
          ]
          spids: [23]
        )
      spids: [18 22]
    )
    (FuncDef
      name: save_state
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DAmp Op_DAmp]
              children: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:noslash spids:[75])
                      op: Equal
                      rhs: 
                        {
                          (DQ 
                            (CommandSubPart
                              command_list: 
                                (CommandList
                                  children: [
                                    (Pipeline
                                      children: [
                                        (C {(echo)} {(DQ ($ VSub_Number '$1'))})
                                        (C {(tr)} {(/)} {(_)})
                                      ]
                                      negated: F
                                    )
                                  ]
                                )
                              left_token: <Left_CommandSub '$('>
                              spids: [77 91]
                            )
                          )
                        }
                      spids: [75]
                    )
                  ]
                  spids: [75]
                )
                (SimpleCommand
                  words: [{(cat)} {(DQ ($ VSub_Number '$1'))}]
                  redirects: [
                    (Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(_worktree_) (DQ ($ VSub_Name '$noslash'))}
                    )
                  ]
                )
                (SimpleCommand
                  words: [{(git)} {(show)} {(Lit_Other ':') (DQ ($ VSub_Number '$1'))}]
                  redirects: [
                    (Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(_index_) (DQ ($ VSub_Name '$noslash'))}
                    )
                  ]
                )
              ]
            )
          ]
          spids: [72]
        )
      spids: [67 71]
    )
    (FuncDef
      name: set_and_save_state
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(set_state)} {(DQ ($ VSub_At '$@'))})
                (C {(save_state)} {(DQ ($ VSub_Number '$1'))})
              ]
            )
          ]
          spids: [137]
        )
      spids: [132 136]
    )
    (FuncDef
      name: verify_state
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(cat)} {(DQ ($ VSub_Number '$1'))})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [169 175]
                      )
                    )
                  } {(Lit_Other '=')} {(DQ ($ VSub_Number '$2'))}
                )
                (C {(test)} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(git)} {(show)} {(Lit_Other ':') (DQ ($ VSub_Number '$1'))})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [190 199]
                      )
                    )
                  } {(Lit_Other '=')} {(DQ ($ VSub_Number '$3'))}
                )
              ]
            )
          ]
          spids: [163]
        )
      spids: [158 162]
    )
    (FuncDef
      name: verify_saved_state
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DAmp]
              children: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:noslash spids:[219])
                      op: Equal
                      rhs: 
                        {
                          (DQ 
                            (CommandSubPart
                              command_list: 
                                (CommandList
                                  children: [
                                    (Pipeline
                                      children: [
                                        (C {(echo)} {(DQ ($ VSub_Number '$1'))})
                                        (C {(tr)} {(/)} {(_)})
                                      ]
                                      negated: F
                                    )
                                  ]
                                )
                              left_token: <Left_CommandSub '$('>
                              spids: [221 235]
                            )
                          )
                        }
                      spids: [219]
                    )
                  ]
                  spids: [219]
                )
                (C {(verify_state)} {(DQ ($ VSub_Number '$1'))} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(cat)} {(_worktree_) (DQ ($ VSub_Name '$noslash'))})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [248 255]
                      )
                    )
                  } 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(cat)} {(_index_) (DQ ($ VSub_Name '$noslash'))})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [259 266]
                      )
                    )
                  }
                )
              ]
            )
          ]
          spids: [216]
        )
      spids: [211 215]
    )
    (FuncDef
      name: save_head
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(git)} {(rev-parse)} {(HEAD)}]
              redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(_head)})]
            )
          ]
          spids: [277]
        )
      spids: [272 276]
    )
    (FuncDef
      name: verify_saved_head
      body: 
        (BraceGroup
          children: [
            (C {(test)} 
              {
                (DQ 
                  (CommandSubPart
                    command_list: (CommandList children:[(C {(cat)} {(_head)})])
                    left_token: <Left_CommandSub '$('>
                    spids: [304 308]
                  )
                )
              } {(Lit_Other '=')} 
              {
                (DQ 
                  (CommandSubPart
                    command_list: (CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})])
                    left_token: <Left_CommandSub '$('>
                    spids: [314 320]
                  )
                )
              }
            )
          ]
          spids: [298]
        )
      spids: [293 297]
    )
  ]
)