(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Unary
                      op_id: Id.BoolUnary_z
                      child: {(DQ ($ Id.VSub_DollarName '$EQUIVS'))}
                    )
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:15)
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:EQUIVS)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:21)
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(readlink)} {(-f)} 
                                {
                                  (command_sub
                                    left_token: (Token id:Id.Left_Backtick val:'`' span_id:27)
                                    command_list: 
                                      (command.CommandList
                                        children: [(C {(dirname)} {($ Id.VSub_Number '$0')})]
                                      )
                                  ) (/../frontend/c/base-type-equivs.txt)
                                }
                              )
                            ]
                          )
                      )
                    }
                  spids: [20]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Unary
                              op_id: Id.BoolUnary_z
                              child: {(DQ ($ Id.VSub_DollarName '$EQUIVS'))}
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:50)
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [{(echo)} {(DQ ('Error: no equivs file'))}]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:61)
                          fd: 1
                          arg_word: {(2)}
                        )
                      ]
                    )
                  ]
                  spids: [39 52]
                )
              ]
            )
          ]
          spids: [4 17]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:uniqtypes)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:75)
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.Pipeline
                          children: [
                            (C {(tr)} {(-s)} {(SQ (Token id:Id.Lit_Chars val:'[:blank:]' span_id:82))} 
                              {(SQ (Token id:Id.Lit_Chars val:'\\t' span_id:86))}
                            )
                            (C {(cut)} {(-f1)})
                            (C {(grep)} {(SQ (Token id:Id.Lit_Chars val:'^__uniqtype_' span_id:100))})
                          ]
                          negated: F
                        )
                      ]
                    )
                )
              )
            }
          spids: [73]
        )
      ]
    )
    (command.WhileUntil
      keyword: (Token id:Id.KW_While val:while span_id:113)
      cond: [
        (command.Sentence
          child: (C {(read)} {(equivclass)})
          terminator: (Token id:Id.Op_Semi val:';' span_id:118)
        )
      ]
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:big_regexp)
                  op: assign_op.Equal
                  rhs: 
                    {(SQ (Token id:Id.Lit_Chars val:'^__uniqtype_([0-9a-f]{7,8})?_(' span_id:129)) 
                      (DQ 
                        (command_sub
                          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:132)
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (C {(echo)} {(DQ ($ Id.VSub_DollarName '$equivclass'))})
                                    (C {(sed)} 
                                      {(SQ (Token id:Id.Lit_Chars val:'s/, */|/g' span_id:145))}
                                    )
                                    (C {(tr)} {(SQ (Token id:Id.Lit_Chars val:' ' span_id:153))} 
                                      {(SQ (Token id:Id.Lit_Chars val:_ span_id:157))}
                                    )
                                  ]
                                  negated: F
                                )
                              ]
                            )
                        )
                      ) (SQ (Token id:Id.Lit_Chars val:')$' span_id:163))
                    }
                  spids: [127]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:matches)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:169)
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (C {(echo)} {(DQ ($ Id.VSub_DollarName '$uniqtypes'))})
                                    (C {(egrep)} {(DQ ($ Id.VSub_DollarName '$big_regexp'))})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                        )
                      )
                    }
                  spids: [167]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_gt
                              left: 
                                {
                                  (command_sub
                                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:201)
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (command.Pipeline
                                            children: [
                                              (C {(echo)} {(DQ ($ Id.VSub_DollarName '$matches'))})
                                              (C {(grep)} 
                                                {
                                                  (SQ 
                                                    (Token
                                                      id: Id.Lit_Chars
                                                      val: '^__uniqtype_[0-9a-f]{7,8}_'
                                                      span_id: 214
                                                    )
                                                  )
                                                }
                                              )
                                              (C {(wc)} {(-l)})
                                            ]
                                            negated: F
                                          )
                                        ]
                                      )
                                  )
                                }
                              right: {(1)}
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:230)
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [
                        {(echo)}
                        {
                          (DQ ('Error: expected at most one matching uniqtype for ') 
                            (${ Id.VSub_Name big_regexp) ('; got ')
                          )
                        }
                        {($ Id.VSub_DollarName '$matches')}
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:247)
                          fd: 1
                          arg_word: {(2)}
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:279)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [197 232]
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {(echo)} {(DQ ($ Id.VSub_DollarName '$matches'))})
                (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'/^$/ d' span_id:298))})
                (command.WhileUntil
                  keyword: (Token id:Id.KW_While val:while span_id:303)
                  cond: [
                    (command.Sentence
                      child: (C {(read)} {(matching_typesym)})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:308)
                    )
                  ]
                  body: 
                    (command.DoGroup
                      children: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:matching_type)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:323)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (command.Pipeline
                                              children: [
                                                (C {(echo)} 
                                                  {(DQ ($ Id.VSub_DollarName '$matching_typesym'))}
                                                )
                                                (C {(sed)} {(-r)} 
                                                  {
                                                    (SQ 
                                                      (Token
                                                        id: Id.Lit_Chars
                                                        val: 's/^__uniqtype_([0-9a-f]{7,8})?_//'
                                                        span_id: 338
                                                      )
                                                    )
                                                  }
                                                )
                                              ]
                                              negated: F
                                            )
                                          ]
                                        )
                                    )
                                  )
                                }
                              spids: [321]
                            )
                          ]
                        )
                        (command.Pipeline
                          children: [
                            (C {(echo)} {(DQ ($ Id.VSub_DollarName '$equivclass'))})
                            (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/, */\\n/g' span_id:356))})
                            (C {(tr)} {(SQ (Token id:Id.Lit_Chars val:' ' span_id:364))} 
                              {(SQ (Token id:Id.Lit_Chars val:_ span_id:368))}
                            )
                            (C {(grep)} {(-v)} 
                              {(DQ ('^') (${ Id.VSub_Name matching_type)) 
                                (SQ (Token id:Id.Lit_Chars val:'$' span_id:384))
                              }
                            )
                            (command.WhileUntil
                              keyword: (Token id:Id.KW_While val:while span_id:389)
                              cond: [
                                (command.Sentence
                                  child: (C {(read)} {(equiv)})
                                  terminator: (Token id:Id.Op_Semi val:';' span_id:394)
                                )
                              ]
                              body: 
                                (command.DoGroup
                                  children: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:synonym_typesym)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ 
                                                (command_sub
                                                  left_token: 
                                                    (Token
                                                      id: Id.Left_DollarParen
                                                      val: '$('
                                                      span_id: 401
                                                    )
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (command.Pipeline
                                                          children: [
                                                            (C {(echo)} 
                                                              {
                                                                (DQ 
                                                                  ($ Id.VSub_DollarName 
'$matching_typesym'
                                                                  )
                                                                )
                                                              }
                                                            )
                                                            (C {(sed)} {(-r)} 
                                                              {
                                                                (DQ 
                                                                  (
's/^(__uniqtype_([0-9a-f]{7,8})?_).*/'
                                                                  ) (Id.Lit_Other '\\') (1) (${ Id.VSub_Name equiv) (/)
                                                                )
                                                              }
                                                            )
                                                          ]
                                                          negated: F
                                                        )
                                                      ]
                                                    )
                                                )
                                              )
                                            }
                                          spids: [399]
                                        )
                                      ]
                                    )
                                    (C {(echo)} 
                                      {(-Wl) (Id.Lit_Comma ',') (--defsym) (Id.Lit_Comma ',') 
                                        (${ Id.VSub_Name synonym_typesym) (Id.Lit_Equals '=') (${ Id.VSub_Name matching_typesym)
                                      }
                                    )
                                  ]
                                )
                            )
                          ]
                          negated: F
                        )
                      ]
                    )
                )
              ]
              negated: F
            )
          ]
        )
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Less val:'<' span_id:452)
          fd: -1
          arg_word: {(DQ ($ Id.VSub_DollarName '$EQUIVS'))}
        )
      ]
    )
  ]
)