(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: (bool_expr.Unary op_id:BoolUnary_z child:{(DQ ($ VSub_DollarName '$EQUIVS'))})
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:EQUIVS)
                  op: Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(readlink)} {(-f)} 
                                {
                                  (command_sub
                                    left_token: <Left_Backtick '`'>
                                    command_list: 
                                      (command.CommandList
                                        children: [(C {(dirname)} {($ VSub_Number '$0')})]
                                      )
                                  ) (/../frontend/c/base-type-equivs.txt)
                                }
                              )
                            ]
                          )
                      )
                    }
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Unary
                              op_id: BoolUnary_z
                              child: {(DQ ($ VSub_DollarName '$EQUIVS'))}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [{(echo)} {(DQ ('Error: no equivs file'))}]
                      redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})]
                    )
                  ]
                )
              ]
            )
          ]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:uniqtypes)
          op: Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.Pipeline
                          children: [
                            (C {(tr)} {(-s)} {(SQ <'[:blank:]'>)} {(SQ <'\\t'>)})
                            (C {(cut)} {(-f1)})
                            (C {(grep)} {(SQ <'^__uniqtype_'>)})
                          ]
                          negated: F
                        )
                      ]
                    )
                )
              )
            }
        )
      ]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(command.Sentence child:(C {(read)} {(equivclass)}) terminator:<Op_Semi ';'>)]
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:big_regexp)
                  op: Equal
                  rhs: 
                    {(SQ <'^__uniqtype_([0-9a-f]{7,8})?_('>) 
                      (DQ 
                        (command_sub
                          left_token: <Left_DollarParen '$('>
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (C {(echo)} {(DQ ($ VSub_DollarName '$equivclass'))})
                                    (C {(sed)} {(SQ <'s/, */|/g'>)})
                                    (C {(tr)} {(SQ <' '>)} {(SQ <_>)})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                        )
                      ) (SQ <')$'>)
                    }
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:matches)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: <Left_DollarParen '$('>
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (C {(echo)} {(DQ ($ VSub_DollarName '$uniqtypes'))})
                                    (C {(egrep)} {(DQ ($ VSub_DollarName '$big_regexp'))})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                        )
                      )
                    }
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: BoolBinary_gt
                              left: 
                                {
                                  (command_sub
                                    left_token: <Left_DollarParen '$('>
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (command.Pipeline
                                            children: [
                                              (C {(echo)} {(DQ ($ VSub_DollarName '$matches'))})
                                              (C {(grep)} {(SQ <'^__uniqtype_[0-9a-f]{7,8}_'>)})
                                              (C {(wc)} {(-l)})
                                            ]
                                            negated: F
                                          )
                                        ]
                                      )
                                  )
                                }
                              right: {(1)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [
                        {(echo)}
                        {
                          (DQ ('Error: expected at most one matching uniqtype for ') 
                            (${ VSub_Name big_regexp) ('; got ')
                          )
                        }
                        {($ VSub_DollarName '$matches')}
                      ]
                      redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {(echo)} {(DQ ($ VSub_DollarName '$matches'))})
                (C {(sed)} {(SQ <'/^$/ d'>)})
                (command.WhileUntil
                  keyword: <KW_While while>
                  cond: [
                    (command.Sentence
                      child: (C {(read)} {(matching_typesym)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  body: 
                    (command.DoGroup
                      children: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:matching_type)
                              op: Equal
                              rhs: 
                                {
                                  (DQ 
                                    (command_sub
                                      left_token: <Left_DollarParen '$('>
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (command.Pipeline
                                              children: [
                                                (C {(echo)} 
                                                  {(DQ ($ VSub_DollarName '$matching_typesym'))}
                                                )
                                                (C {(sed)} {(-r)} 
                                                  {(SQ <'s/^__uniqtype_([0-9a-f]{7,8})?_//'>)}
                                                )
                                              ]
                                              negated: F
                                            )
                                          ]
                                        )
                                    )
                                  )
                                }
                            )
                          ]
                        )
                        (command.Pipeline
                          children: [
                            (C {(echo)} {(DQ ($ VSub_DollarName '$equivclass'))})
                            (C {(sed)} {(SQ <'s/, */\\n/g'>)})
                            (C {(tr)} {(SQ <' '>)} {(SQ <_>)})
                            (C {(grep)} {(-v)} {(DQ ('^') (${ VSub_Name matching_type)) (SQ <'$'>)})
                            (command.WhileUntil
                              keyword: <KW_While while>
                              cond: [
                                (command.Sentence
                                  child: (C {(read)} {(equiv)})
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              body: 
                                (command.DoGroup
                                  children: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:synonym_typesym)
                                          op: Equal
                                          rhs: 
                                            {
                                              (DQ 
                                                (command_sub
                                                  left_token: <Left_DollarParen '$('>
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (command.Pipeline
                                                          children: [
                                                            (C {(echo)} 
                                                              {
                                                                (DQ 
                                                                  ($ VSub_DollarName 
'$matching_typesym'
                                                                  )
                                                                )
                                                              }
                                                            )
                                                            (C {(sed)} {(-r)} 
                                                              {
                                                                (DQ 
                                                                  (
's/^(__uniqtype_([0-9a-f]{7,8})?_).*/'
                                                                  ) (Lit_Other '\\') (1) (${ VSub_Name equiv) (/)
                                                                )
                                                              }
                                                            )
                                                          ]
                                                          negated: F
                                                        )
                                                      ]
                                                    )
                                                )
                                              )
                                            }
                                        )
                                      ]
                                    )
                                    (C {(echo)} 
                                      {(-Wl) (Lit_Comma ',') (--defsym) (Lit_Comma ',') 
                                        (${ VSub_Name synonym_typesym) (Lit_Equals '=') (${ VSub_Name matching_typesym)
                                      }
                                    )
                                  ]
                                )
                            )
                          ]
                          negated: F
                        )
                      ]
                    )
                )
              ]
              negated: F
            )
          ]
        )
      redirects: [
        (redir.Redir
          op: <Redir_Less '<'>
          fd: 16777215
          arg_word: {(DQ ($ VSub_DollarName '$EQUIVS'))}
        )
      ]
    )
  ]
)