(command.ShFunction
  name: shlib_relToAbsPath
  body: 
    (BraceGroup
      children: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:shlib_path_)
              op: assign_op.Equal
              rhs: {($ Id.VSub_Number '$1')}
              spids: [47]
            )
          ]
        )
        (command.AndOr
          ops: [Id.Op_DPipe]
          children: [
            (command.Pipeline
              children: [
                (C {<echo>} {(DQ (${ Id.VSub_Name shlib_path_))})
                (command.Simple
                  words: [{<grep>} {(SQ <'^/'>)}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                    (redir
                      op: <Id.Redir_GreatAnd '2>&'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<1>}
                    )
                  ]
                  do_fork: T
                )
              ]
              negated: F
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:shlib_path_)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ (command_sub left_token:<Id.Left_Backtick '`'> child:(C {<pwd>})) <'/'> 
                        (${ Id.VSub_Name shlib_path_)
                      )
                    }
                  spids: [81]
                )
              ]
            )
          ]
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:shlib_old_)
              op: assign_op.Equal
              rhs: {(${ Id.VSub_Name shlib_path_)}
              spids: [104]
            )
          ]
        )
        (command.WhileUntil
          keyword: <Id.KW_While while>
          cond: 
            (condition.Shell
              commands: [(command.Sentence child:(C {<true>}) terminator:<Id.Op_Semi _>)]
            )
          body: 
            (command.DoGroup
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:shlib_new_)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            child: 
                              (command.Pipeline
                                children: [
                                  (C {<echo>} {(DQ (${ Id.VSub_Name shlib_old_))})
                                  (C {<sed>} {(SQ <'s/[^/]*\\/\\.\\.\\/*//g;s/\\/\\.\\//\\//'>)})
                                ]
                                negated: F
                              )
                          )
                        }
                      spids: [118]
                    )
                  ]
                )
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name shlib_old_))} {<Id.Lit_Equals '='>} 
                      {(DQ (${ Id.VSub_Name shlib_new_))} {<Id.Lit_RBracket ']'>}
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Break break>)
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:shlib_old_)
                      op: assign_op.Equal
                      rhs: {(${ Id.VSub_Name shlib_new_)}
                      spids: [178]
                    )
                  ]
                )
              ]
            )
        )
        (C {<echo>} {(DQ (${ Id.VSub_Name shlib_new_))})
        (C {<unset>} {<shlib_path_>} {<shlib_old_>} {<shlib_new_>})
      ]
    )
)