(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:indent_level) op:Equal rhs:{(DQ (-1))} spids:[4])]
      spids: [4]
    )
    (FuncDef
      name: print_indent
      body: 
        (BraceGroup
          children: [
            (ForEach
              iter_name: NUM
              iter_words: [
                {
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [(C {(seq)} {(0)} {($ VSub_Name '$indent_level')})]
                      )
                    left_token: <Left_Backtick '`'>
                    spids: [23 29]
                  )
                }
              ]
              do_arg_iter: F
              body: 
                (DoGroup
                  children: [
                    (Sentence
                      child: (C {(echo)} {(-ne)} {(SQ <'    '>)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [32 43]
                )
              spids: [22 30]
            )
          ]
          spids: [14]
        )
      spids: [9 13]
    )
    (While
      cond: [(Sentence child:(C {(read)} {(line)}) terminator:<Op_Semi ';'>)]
      body: 
        (DoGroup
          children: [
            (Case
              to_match: {(DQ ($ VSub_Name '$line'))}
              arms: [
                (case_arm
                  pat_list: [{(SQ <'('>) (Lit_Other '*') (SQ <')'>)}]
                  action: [(C {(print_indent)}) (C {(echo)} {(DQ ($ VSub_Name '$line'))})]
                  spids: [67 75 89 16777215]
                )
                (case_arm
                  pat_list: [{(SQ <')'>)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:indent_level)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Minus
                                    left: (ArithWord w:{($ VSub_Name '$indent_level')})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [103 112]
                              )
                            }
                          spids: [102]
                        )
                      ]
                      spids: [102]
                    )
                    (C {(print_indent)})
                    (C {(echo)} {(DQ ($ VSub_Name '$line'))})
                  ]
                  spids: [92 96 125 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*') (SQ <')'>)}]
                  action: [
                    (C {(print_indent)})
                    (Pipeline
                      children: [(C {(echo)} {(DQ ($ VSub_Name '$line'))}) (C {(sed)} {(SQ <'s/)$//'>)})]
                      negated: F
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:indent_level)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Minus
                                    left: (ArithWord w:{($ VSub_Name '$indent_level')})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [159 168]
                              )
                            }
                          spids: [158]
                        )
                      ]
                      spids: [158]
                    )
                    (C {(print_indent)})
                    (C {(echo)} {(SQ <')'>)})
                  ]
                  spids: [129 134 181 16777215]
                )
                (case_arm
                  pat_list: [{(SQ <'('>) (Lit_Other '*')}]
                  action: [
                    (C {(print_indent)})
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:indent_level)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Plus
                                    left: (ArithWord w:{($ VSub_Name '$indent_level')})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [196 205]
                              )
                            }
                          spids: [195]
                        )
                      ]
                      spids: [195]
                    )
                    (C {(echo)} {(DQ ($ VSub_Name '$line'))})
                  ]
                  spids: [184 189 215 16777215]
                )
              ]
              spids: [58 64 218]
            )
          ]
          spids: [55 220]
        )
      redirects: [
        (Redir
          op_id: Redir_TLess
          fd: 16777215
          arg_word: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [(C {(sed)} {(SQ <'s/(/\\n(/g'>)}) (C {(sed)} {(SQ <'s/)/)\\n/g'>)})]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [224 240]
                )
              )
            }
          spids: [222]
        )
      ]
    )
  ]
)