(command.CommandList
  children: [
    (command.ShFunction
      name: usage
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir.HereDoc
                  op: <Id.Redir_DLess '<<'>
                  fd: -1
                  here_begin: {<EOF>}
                  here_end_span_id: 148
                  stdin_parts: [
                    <'usage: '>
                    (command_sub
                      left_token: <Id.Left_Backtick '`'>
                      command_list: 
                        (command.CommandList
                          children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                        )
                    )
                    <' [options] command ... [path]\n'>
                    <'\n'>
                    <'Options:\n'>
                    <'  -b basedir   -- Operate on a system mounted at basedir\n'>
                    <'                  (default: /)\n'>
                    <'  -d workdir   -- Store working files in workdir\n'>
                    <'                  (default: /var/db/freebsd-update/)\n'>
                    <'  -f conffile  -- Read configuration options from conffile\n'>
                    <'                  (default: /etc/freebsd-update.conf)\n'>
                    <'  -F           -- Force a fetch operation to proceed\n'>
                    <'  -k KEY       -- Trust an RSA key with SHA256 hash of KEY\n'>
                    <'  -r release   -- Target for upgrade (e.g., 11.1-RELEASE)\n'>
                    <'  -s server    -- Server from which to fetch updates\n'>
                    <'                  (default: update.FreeBSD.org)\n'>
                    <'  -t address   -- Mail output of cron command, if any, to address\n'>
                    <'                  (default: root)\n'>
                    <'  --not-running-from-cron\n'>
                    <'               -- Run without a tty, for use by automated tools\n'>
                    <'  --currently-running release\n'>
                    <'               -- Update as if currently running this release\n'>
                    <'Commands:\n'>
                    <'  fetch        -- Fetch updates from server\n'>
                    <'  cron         -- Sleep rand(3600) seconds, fetch updates, and send an\n'>
                    <'                  email if updates were found\n'>
                    <
'  upgrade      -- Fetch upgrades to FreeBSD version specified via -r option\n'
                    >
                    <'  install      -- Install downloaded updates or upgrades\n'>
                    <'  rollback     -- Uninstall most recently installed updates\n'>
                    <'  IDS          -- Compare the system against an index of '>
                    <Id.Right_DoubleQuote '"'>
                    <'known good'>
                    <Id.Right_DoubleQuote '"'>
                    <' files.\n'>
                  ]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CONFIGOPTIONS)
          op: assign_op.Equal
          rhs: 
            {
              (DQ <'KEYPRINT WORKDIR SERVERNAME MAILTO ALLOWADD ALLOWDELETE\n'> 
                <'    KEEPMODIFIEDMETADATA COMPONENTS IGNOREPATHS UPDATEIFUNMODIFIED\n'> <'    BASEDIR VERBOSELEVEL TARGETRELEASE STRICTCOMPONENTS MERGECHANGES\n'> 
                <'    IDSIGNOREPATHS BACKUPKERNEL BACKUPKERNELDIR BACKUPKERNELSYMBOLFILES'>
              )
            }
          spids: [225]
        )
      ]
    )
    (command.ShFunction
      name: nullconfig
      body: 
        (command.BraceGroup
          children: [
            (command.ForEach
              iter_name: X
              iter_words: [{(${ Id.VSub_Name CONFIGOPTIONS)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [(C {<eval>} {(${ Id.VSub_Name X) <Id.Lit_Equals '='> (DQ )})]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: saveconfig
      body: 
        (command.BraceGroup
          children: [
            (command.ForEach
              iter_name: X
              iter_words: [{(${ Id.VSub_Name CONFIGOPTIONS)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<eval>} 
                      {(${ Id.VSub_Name X) <Id.Lit_VarLike '_saved='> 
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                        ) (${ Id.VSub_Name X)
                      }
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: mergeconfig
      body: 
        (command.BraceGroup
          children: [
            (command.ForEach
              iter_name: X
              iter_words: [{(${ Id.VSub_Name CONFIGOPTIONS)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<eval>} 
                      {<Id.Lit_VarLike '_='> 
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                        ) (${ Id.VSub_Name X) <_saved>
                      }
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name _))} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                  negated: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<eval>} 
                              {(${ Id.VSub_Name X) <Id.Lit_Equals '='> 
                                (word_part.EscapedLiteral
                                  token: <Id.Lit_EscapedChar '\\$'>
                                ) (${ Id.VSub_Name X) <_saved>
                              }
                            )
                          ]
                          spids: [351 368]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: config_KeyPrint
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name KEYPRINT)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:KEYPRINT)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number '$1')}
                          spids: [419]
                        )
                      ]
                    )
                  ]
                  spids: [403 416]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: config_WorkDir
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name WORKDIR)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:WORKDIR)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number '$1')}
                          spids: [463]
                        )
                      ]
                    )
                  ]
                  spids: [447 460]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: config_ServerName
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name SERVERNAME)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SERVERNAME)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number '$1')}
                          spids: [507]
                        )
                      ]
                    )
                  ]
                  spids: [491 504]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: config_MailTo
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name MAILTO)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:MAILTO)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number '$1')}
                          spids: [551]
                        )
                      ]
                    )
                  ]
                  spids: [535 548]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: config_AllowAdd
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name ALLOWADD)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Case
                      to_match: {($ Id.VSub_Number '$1')}
                      arms: [
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Yy> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ee> 
                              <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ss> <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:ALLOWADD)
                                  op: assign_op.Equal
                                  rhs: {<yes>}
                                  spids: [617]
                                )
                              ]
                            )
                          ]
                          spids: [605 614 621 -1]
                        )
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Nn> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Oo> 
                              <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:ALLOWADD)
                                  op: assign_op.Equal
                                  rhs: {<no>}
                                  spids: [633]
                                )
                              ]
                            )
                          ]
                          spids: [624 630 637 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [640 641 649 -1]
                        )
                      ]
                    )
                  ]
                  spids: [582 595]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: config_AllowDelete
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name ALLOWDELETE)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Case
                      to_match: {($ Id.VSub_Number '$1')}
                      arms: [
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Yy> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ee> 
                              <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ss> <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:ALLOWDELETE)
                                  op: assign_op.Equal
                                  rhs: {<yes>}
                                  spids: [714]
                                )
                              ]
                            )
                          ]
                          spids: [702 711 718 -1]
                        )
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Nn> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Oo> 
                              <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:ALLOWDELETE)
                                  op: assign_op.Equal
                                  rhs: {<no>}
                                  spids: [730]
                                )
                              ]
                            )
                          ]
                          spids: [721 727 734 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [737 738 746 -1]
                        )
                      ]
                    )
                  ]
                  spids: [679 692]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: config_KeepModifiedMetadata
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name KEEPMODIFIEDMETADATA)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Case
                      to_match: {($ Id.VSub_Number '$1')}
                      arms: [
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Yy> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ee> 
                              <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ss> <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:KEEPMODIFIEDMETADATA)
                                  op: assign_op.Equal
                                  rhs: {<yes>}
                                  spids: [817]
                                )
                              ]
                            )
                          ]
                          spids: [805 814 821 -1]
                        )
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Nn> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Oo> 
                              <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:KEEPMODIFIEDMETADATA)
                                  op: assign_op.Equal
                                  rhs: {<no>}
                                  spids: [833]
                                )
                              ]
                            )
                          ]
                          spids: [824 830 837 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [840 841 849 -1]
                        )
                      ]
                    )
                  ]
                  spids: [782 795]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: config_Components
      body: 
        (command.BraceGroup
          children: [
            (command.ForEach
              iter_name: C
              iter_words: [{($ Id.VSub_At '$@')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$C'))} 
                                  {<Id.Lit_Equals '='>} {(DQ <src>)} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {<-e>} {</usr/src/COPYRIGHT>} 
                                          {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:COMPONENTS)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ (${ Id.VSub_Name COMPONENTS) <' '> 
                                                (${ Id.VSub_Name C)
                                              )
                                            }
                                          spids: [925]
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [911 922]
                                )
                              ]
                              else_action: [(C {<echo>} {(DQ <'src component not installed, skipped'>)})]
                            )
                          ]
                          spids: [891 908]
                        )
                      ]
                      else_action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:COMPONENTS)
                              op: assign_op.Equal
                              rhs: {(DQ (${ Id.VSub_Name COMPONENTS) <' '> (${ Id.VSub_Name C))}
                              spids: [953]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: config_IgnorePaths
      body: 
        (command.BraceGroup
          children: [
            (command.ForEach
              iter_name: C
              iter_words: [{($ Id.VSub_At '$@')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:IGNOREPATHS)
                          op: assign_op.Equal
                          rhs: {(DQ (${ Id.VSub_Name IGNOREPATHS) <' '> (${ Id.VSub_Name C))}
                          spids: [996]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: config_IDSIgnorePaths
      body: 
        (command.BraceGroup
          children: [
            (command.ForEach
              iter_name: C
              iter_words: [{($ Id.VSub_At '$@')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:IDSIGNOREPATHS)
                          op: assign_op.Equal
                          rhs: {(DQ (${ Id.VSub_Name IDSIGNOREPATHS) <' '> (${ Id.VSub_Name C))}
                          spids: [1036]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: config_UpdateIfUnmodified
      body: 
        (command.BraceGroup
          children: [
            (command.ForEach
              iter_name: C
              iter_words: [{($ Id.VSub_At '$@')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:UPDATEIFUNMODIFIED)
                          op: assign_op.Equal
                          rhs: {(DQ (${ Id.VSub_Name UPDATEIFUNMODIFIED) <' '> (${ Id.VSub_Name C))}
                          spids: [1079]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: config_MergeChanges
      body: 
        (command.BraceGroup
          children: [
            (command.ForEach
              iter_name: C
              iter_words: [{($ Id.VSub_At '$@')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:MERGECHANGES)
                          op: assign_op.Equal
                          rhs: {(DQ (${ Id.VSub_Name MERGECHANGES) <' '> (${ Id.VSub_Name C))}
                          spids: [1122]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: config_BaseDir
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name BASEDIR)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:BASEDIR)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number '$1')}
                          spids: [1166]
                        )
                      ]
                    )
                  ]
                  spids: [1150 1163]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: config_StrictComponents
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name STRICTCOMPONENTS)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Case
                      to_match: {($ Id.VSub_Number '$1')}
                      arms: [
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Yy> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ee> 
                              <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ss> <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:STRICTCOMPONENTS)
                                  op: assign_op.Equal
                                  rhs: {<yes>}
                                  spids: [1235]
                                )
                              ]
                            )
                          ]
                          spids: [1223 1232 1239 -1]
                        )
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Nn> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Oo> 
                              <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:STRICTCOMPONENTS)
                                  op: assign_op.Equal
                                  rhs: {<no>}
                                  spids: [1251]
                                )
                              ]
                            )
                          ]
                          spids: [1242 1248 1255 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [1258 1259 1267 -1]
                        )
                      ]
                    )
                  ]
                  spids: [1200 1213]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: config_TargetRelease
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name TARGETRELEASE)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:TARGETRELEASE)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number '$1')}
                          spids: [1313]
                        )
                      ]
                    )
                  ]
                  spids: [1297 1310]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<echo>} {(${ Id.VSub_Name TARGETRELEASE)})
                            (C {<grep>} {<-qE>} {(SQ <'^[0-9.]+$'>)})
                          ]
                          negated: F
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:TARGETRELEASE)
                          op: assign_op.Equal
                          rhs: {(DQ (${ Id.VSub_Name TARGETRELEASE) <-RELEASE>)}
                          spids: [1350]
                        )
                      ]
                    )
                  ]
                  spids: [1328 1347]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: config_VerboseLevel
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name VERBOSELEVEL)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Case
                      to_match: {($ Id.VSub_Number '$1')}
                      arms: [
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Dd> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ee> 
                              <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Bb> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Uu> <Id.Lit_RBracket ']'> 
                              <Id.Lit_LBracket '['> <Gg> <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:VERBOSELEVEL)
                                  op: assign_op.Equal
                                  rhs: {<debug>}
                                  spids: [1416]
                                )
                              ]
                            )
                          ]
                          spids: [1398 1413 1420 -1]
                        )
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Nn> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Oo> 
                              <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ss> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Tt> <Id.Lit_RBracket ']'> 
                              <Id.Lit_LBracket '['> <Aa> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Tt> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ss> 
                              <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:VERBOSELEVEL)
                                  op: assign_op.Equal
                                  rhs: {<nostats>}
                                  spids: [1447]
                                )
                              ]
                            )
                          ]
                          spids: [1423 1444 1451 -1]
                        )
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Ss> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Tt> 
                              <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Aa> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Tt> <Id.Lit_RBracket ']'> 
                              <Id.Lit_LBracket '['> <Ss> <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:VERBOSELEVEL)
                                  op: assign_op.Equal
                                  rhs: {<stats>}
                                  spids: [1472]
                                )
                              ]
                            )
                          ]
                          spids: [1454 1469 1476 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [1479 1480 1488 -1]
                        )
                      ]
                    )
                  ]
                  spids: [1375 1388]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: config_BackupKernel
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name BACKUPKERNEL)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Case
                      to_match: {($ Id.VSub_Number '$1')}
                      arms: [
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Yy> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ee> 
                              <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ss> <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:BACKUPKERNEL)
                                  op: assign_op.Equal
                                  rhs: {<yes>}
                                  spids: [1550]
                                )
                              ]
                            )
                          ]
                          spids: [1538 1547 1554 -1]
                        )
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Nn> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Oo> 
                              <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:BACKUPKERNEL)
                                  op: assign_op.Equal
                                  rhs: {<no>}
                                  spids: [1566]
                                )
                              ]
                            )
                          ]
                          spids: [1557 1563 1570 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [1573 1574 1582 -1]
                        )
                      ]
                    )
                  ]
                  spids: [1515 1528]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: config_BackupKernelDir
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name BACKUPKERNELDIR)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_Number '$1'))} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<echo>} {(DQ <'BackupKernelDir set to empty dir'>)})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [1625 1638]
                        )
                      ]
                    )
                    (command.Case
                      to_match: {($ Id.VSub_Number '$1')}
                      arms: [
                        (case_arm
                          pat_list: [
                            {</>}
                            {</bin>}
                            {</boot>}
                            {</etc>}
                            {</lib>}
                            {</libexec>}
                            {</sbin>}
                            {</usr>}
                            {</var>}
                          ]
                          action: [
                            (C {<echo>} 
                              {(DQ <'BackupKernelDir set to invalid path '> ($ Id.VSub_Number '$1'))}
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [1676 1693 1709 -1]
                        )
                        (case_arm
                          pat_list: [{</> <Id.Lit_Star '*'>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:BACKUPKERNELDIR)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_Number '$1')}
                                  spids: [1717]
                                )
                              ]
                            )
                          ]
                          spids: [1712 1714 1721 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (C {<echo>} 
                              {
                                (DQ <'BackupKernelDir ('> ($ Id.VSub_Number '$1') 
                                  <') is not an absolute path'>
                                )
                              }
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [1724 1725 1742 -1]
                        )
                      ]
                    )
                  ]
                  spids: [1609 1622]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: config_BackupKernelSymbolFiles
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(${ Id.VSub_Name BACKUPKERNELSYMBOLFILES)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Case
                      to_match: {($ Id.VSub_Number '$1')}
                      arms: [
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Yy> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ee> 
                              <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ss> <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:BACKUPKERNELSYMBOLFILES)
                                  op: assign_op.Equal
                                  rhs: {<yes>}
                                  spids: [1804]
                                )
                              ]
                            )
                          ]
                          spids: [1792 1801 1808 -1]
                        )
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> <Nn> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Oo> 
                              <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:BACKUPKERNELSYMBOLFILES)
                                  op: assign_op.Equal
                                  rhs: {<no>}
                                  spids: [1820]
                                )
                              ]
                            )
                          ]
                          spids: [1811 1817 1824 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [1827 1828 1836 -1]
                        )
                      ]
                    )
                  ]
                  spids: [1769 1782]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: configline
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} {<0>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)]
                  spids: [1866 1879]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:OPT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [1889]
                )
              ]
            )
            (C {<shift>})
            (C {<config_> (${ Id.VSub_Name OPT)} {($ Id.VSub_At '$@')})
          ]
        )
    )
    (command.ShFunction
      name: init_params
      body: 
        (command.BraceGroup
          children: [
            (C {<nullconfig>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:CONFFILE)
                  op: assign_op.Equal
                  rhs: {(DQ )}
                  spids: [1936]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:COMMANDS)
                  op: assign_op.Equal
                  rhs: {(DQ )}
                  spids: [1946]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FORCEFETCH)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [1956]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:NOTTYOK)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [1965]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: parse_cmdline
      body: 
        (command.BraceGroup
          children: [
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<0>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_Number '$1'))}
                      arms: [
                        (case_arm
                          pat_list: [{<-f>}]
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} {<1>} 
                                          {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.Sentence
                                      child: (C {<usage>})
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  spids: [2015 2028]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                                          {(DQ (${ Id.VSub_Name CONFFILE))} {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.Sentence
                                      child: (C {<usage>})
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  spids: [2036 2053]
                                )
                              ]
                            )
                            (command.Sentence
                              child: (C {<shift>})
                              terminator: <Id.Op_Semi _>
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:CONFFILE)
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                                  spids: [2064]
                                )
                              ]
                            )
                          ]
                          spids: [2011 2012 2070 -1]
                        )
                        (case_arm
                          pat_list: [{<-F>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:FORCEFETCH)
                                  op: assign_op.Equal
                                  rhs: {<1>}
                                  spids: [2077]
                                )
                              ]
                            )
                          ]
                          spids: [2073 2074 2081 -1]
                        )
                        (case_arm
                          pat_list: [{<--not-running-from-cron>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:NOTTYOK)
                                  op: assign_op.Equal
                                  rhs: {<1>}
                                  spids: [2088]
                                )
                              ]
                            )
                          ]
                          spids: [2084 2085 2092 -1]
                        )
                        (case_arm
                          pat_list: [{<--currently-running>}]
                          action: [
                            (command.Sentence
                              child: (C {<shift>})
                              terminator: <Id.Op_Semi _>
                            )
                            (C {<export>} {<Id.Lit_VarLike 'UNAME_r='> (DQ ($ Id.VSub_Number '$1'))})
                          ]
                          spids: [2095 2096 2110 -1]
                        )
                        (case_arm
                          pat_list: [{<-b>}]
                          action: [
                            (command.Sentence
                              child: 
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} 
                                              {<1>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (command.Sentence
                                          child: (C {<usage>})
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      spids: [2122 2135]
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (C {<shift>})
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [(C {<config_BaseDir>} {($ Id.VSub_Number '$1')}) (C {<usage>})]
                            )
                          ]
                          spids: [2118 2119 2155 -1]
                        )
                        (case_arm
                          pat_list: [{<-d>}]
                          action: [
                            (command.Sentence
                              child: 
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} 
                                              {<1>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (command.Sentence
                                          child: (C {<usage>})
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      spids: [2162 2175]
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (C {<shift>})
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [(C {<config_WorkDir>} {($ Id.VSub_Number '$1')}) (C {<usage>})]
                            )
                          ]
                          spids: [2158 2159 2195 -1]
                        )
                        (case_arm
                          pat_list: [{<-k>}]
                          action: [
                            (command.Sentence
                              child: 
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} 
                                              {<1>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (command.Sentence
                                          child: (C {<usage>})
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      spids: [2202 2215]
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (C {<shift>})
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [(C {<config_KeyPrint>} {($ Id.VSub_Number '$1')}) (C {<usage>})]
                            )
                          ]
                          spids: [2198 2199 2235 -1]
                        )
                        (case_arm
                          pat_list: [{<-s>}]
                          action: [
                            (command.Sentence
                              child: 
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} 
                                              {<1>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (command.Sentence
                                          child: (C {<usage>})
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      spids: [2242 2255]
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (C {<shift>})
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (C {<config_ServerName>} {($ Id.VSub_Number '$1')})
                                (C {<usage>})
                              ]
                            )
                          ]
                          spids: [2238 2239 2275 -1]
                        )
                        (case_arm
                          pat_list: [{<-r>}]
                          action: [
                            (command.Sentence
                              child: 
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} 
                                              {<1>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (command.Sentence
                                          child: (C {<usage>})
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      spids: [2282 2295]
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (C {<shift>})
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (C {<config_TargetRelease>} {($ Id.VSub_Number '$1')})
                                (C {<usage>})
                              ]
                            )
                          ]
                          spids: [2278 2279 2315 -1]
                        )
                        (case_arm
                          pat_list: [{<-t>}]
                          action: [
                            (command.Sentence
                              child: 
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} 
                                              {<1>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (command.Sentence
                                          child: (C {<usage>})
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      spids: [2322 2335]
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (C {<shift>})
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [(C {<config_MailTo>} {($ Id.VSub_Number '$1')}) (C {<usage>})]
                            )
                          ]
                          spids: [2318 2319 2355 -1]
                        )
                        (case_arm
                          pat_list: [{<-v>}]
                          action: [
                            (command.Sentence
                              child: 
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} 
                                              {<1>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (command.Sentence
                                          child: (C {<usage>})
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      spids: [2362 2375]
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (C {<shift>})
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (C {<config_VerboseLevel>} {($ Id.VSub_Number '$1')})
                                (C {<usage>})
                              ]
                            )
                          ]
                          spids: [2358 2359 2395 -1]
                        )
                        (case_arm
                          pat_list: [{<--debug>}]
                          action: [
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [(C {<config_VerboseLevel>} {<debug>}) (C {<usage>})]
                            )
                          ]
                          spids: [2403 2404 2416 -1]
                        )
                        (case_arm
                          pat_list: [{<--no-stats>}]
                          action: [
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [(C {<config_VerboseLevel>} {<nostats>}) (C {<usage>})]
                            )
                          ]
                          spids: [2419 2420 2432 -1]
                        )
                        (case_arm
                          pat_list: [{<cron>} {<fetch>} {<upgrade>} {<install>} {<rollback>} {<IDS>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:COMMANDS)
                                  op: assign_op.Equal
                                  rhs: {(DQ (${ Id.VSub_Name COMMANDS) <' '> ($ Id.VSub_Number '$1'))}
                                  spids: [2464]
                                )
                              ]
                            )
                          ]
                          spids: [2440 2461 2474 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [(C {<usage>})]
                          spids: [2482 2483 2489 -1]
                        )
                      ]
                    )
                    (C {<shift>})
                  ]
                )
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name COMMANDS))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(C {<usage>})]
                  spids: [2506 2521]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: parse_conffile
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                              {(DQ (${ Id.VSub_Name CONFFILE))} {<Id.Lit_RBracket ']'>}
                            )
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-r>} 
                              {(DQ (${ Id.VSub_Name CONFFILE))} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} {(DQ <'File does not exist '>)})
                    (C {<echo>} {<-n>} {(DQ <'or is not readable: '>)})
                    (C {<echo>} {(${ Id.VSub_Name CONFFILE)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [2551 2584]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name CONFFILE))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:CONFFILE)
                          op: assign_op.Equal
                          rhs: {(DQ </etc/freebsd-update.conf>)}
                          spids: [2651]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-r>} 
                                  {(DQ (${ Id.VSub_Name CONFFILE))} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)]
                          spids: [2657 2674]
                        )
                      ]
                    )
                  ]
                  spids: [2633 2648]
                )
              ]
            )
            (C {<saveconfig>})
            (C {<nullconfig>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:L)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [2710]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(command.Sentence child:(C {<read>} {<LINE>}) terminator:<Id.Op_Semi _>)]
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:L)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Plus
                                    left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$L')})
                                    right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>})
                                  )
                              )
                            }
                          spids: [2724]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:LINEX)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {<echo>} {(DQ (${ Id.VSub_Name LINE))})
                                          (C {<cut>} {<-f>} {<1>} {<-d>} {(SQ <'#'>)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [2735]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [(C {<configline>} {(${ Id.VSub_Name LINEX)})]
                                  negated: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<echo>} 
                              {
                                (DQ <'Error processing configuration file, line '> 
                                  ($ Id.VSub_DollarName '$L') <':'>
                                )
                              }
                            )
                            (C {<echo>} {(DQ <'==> '> (${ Id.VSub_Name LINE))})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [2763 2774]
                        )
                      ]
                    )
                  ]
                )
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Less '<'>
                  fd: -1
                  arg_word: {(${ Id.VSub_Name CONFFILE)}
                )
              ]
            )
            (C {<mergeconfig>})
          ]
        )
    )
    (command.ShFunction
      name: default_params
      body: 
        (command.BraceGroup
          children: [
            (C {<saveconfig>})
            (C {<nullconfig>})
            (C {<config_WorkDir>} {</var/db/freebsd-update>})
            (C {<config_MailTo>} {<root>})
            (C {<config_AllowAdd>} {<yes>})
            (C {<config_AllowDelete>} {<yes>})
            (C {<config_KeepModifiedMetadata>} {<yes>})
            (C {<config_BaseDir>} {</>})
            (C {<config_VerboseLevel>} {<stats>})
            (C {<config_StrictComponents>} {<no>})
            (C {<config_BackupKernel>} {<yes>})
            (C {<config_BackupKernelDir>} {</boot/kernel.old>})
            (C {<config_BackupKernelSymbolFiles>} {<no>})
            (C {<mergeconfig>})
          ]
        )
    )
    (command.ShFunction
      name: fetch_setup_verboselevel
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {(${ Id.VSub_Name VERBOSELEVEL)}
              arms: [
                (case_arm
                  pat_list: [{<debug>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:QUIETREDIR)
                          op: assign_op.Equal
                          rhs: {(DQ </dev/stderr>)}
                          spids: [2942]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:QUIETFLAG)
                          op: assign_op.Equal
                          rhs: {(DQ <' '>)}
                          spids: [2948]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:STATSREDIR)
                          op: assign_op.Equal
                          rhs: {(DQ </dev/stderr>)}
                          spids: [2954]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DDSTATS)
                          op: assign_op.Equal
                          rhs: {(DQ <..>)}
                          spids: [2960]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:XARGST)
                          op: assign_op.Equal
                          rhs: {(DQ <-t>)}
                          spids: [2966]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NDEBUG)
                          op: assign_op.Equal
                          rhs: {(DQ <' '>)}
                          spids: [2972]
                        )
                      ]
                    )
                  ]
                  spids: [2938 2939 2978 -1]
                )
                (case_arm
                  pat_list: [{<nostats>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:QUIETREDIR)
                          op: assign_op.Equal
                          rhs: {(DQ )}
                          spids: [2985]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:QUIETFLAG)
                          op: assign_op.Equal
                          rhs: {(DQ )}
                          spids: [2990]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:STATSREDIR)
                          op: assign_op.Equal
                          rhs: {(DQ </dev/null>)}
                          spids: [2995]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DDSTATS)
                          op: assign_op.Equal
                          rhs: {(DQ <..>)}
                          spids: [3001]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:XARGST)
                          op: assign_op.Equal
                          rhs: {(DQ )}
                          spids: [3007]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NDEBUG)
                          op: assign_op.Equal
                          rhs: {(DQ )}
                          spids: [3012]
                        )
                      ]
                    )
                  ]
                  spids: [2981 2982 3017 -1]
                )
                (case_arm
                  pat_list: [{<stats>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:QUIETREDIR)
                          op: assign_op.Equal
                          rhs: {(DQ </dev/null>)}
                          spids: [3024]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:QUIETFLAG)
                          op: assign_op.Equal
                          rhs: {(DQ <-q>)}
                          spids: [3030]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:STATSREDIR)
                          op: assign_op.Equal
                          rhs: {(DQ </dev/stdout>)}
                          spids: [3036]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DDSTATS)
                          op: assign_op.Equal
                          rhs: {(DQ )}
                          spids: [3042]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:XARGST)
                          op: assign_op.Equal
                          rhs: {(DQ )}
                          spids: [3047]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NDEBUG)
                          op: assign_op.Equal
                          rhs: {(DQ <-n>)}
                          spids: [3052]
                        )
                      ]
                    )
                  ]
                  spids: [3020 3021 3058 -1]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: fetchupgrade_check_params
      body: 
        (command.BraceGroup
          children: [
            (C {<export>} 
              {<Id.Lit_VarLike 'HTTP_USER_AGENT='> 
                (DQ <'freebsd-update ('> (${ Id.VSub_Name COMMAND) <', '> 
                  (command_sub
                    left_token: <Id.Left_Backtick '`'>
                    command_list: (command.CommandList children:[(C {<uname>} {<-r>})])
                  ) <')'>
                )
              }
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_SERVERNAME_z)
                  op: assign_op.Equal
                  rhs: {(DQ <'SERVERNAME must be given via command line or configuration file.'>)}
                  spids: [3113]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_KEYPRINT_z)
                  op: assign_op.Equal
                  rhs: {(DQ <'Key must be given via -k option or configuration file.'>)}
                  spids: [3120]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_KEYPRINT_bad)
                  op: assign_op.Equal
                  rhs: {(DQ <'Invalid key fingerprint: '>)}
                  spids: [3126]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_WORKDIR_bad)
                  op: assign_op.Equal
                  rhs: {(DQ <'Directory does not exist or is not writable: '>)}
                  spids: [3132]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_WORKDIR_bad2)
                  op: assign_op.Equal
                  rhs: {(DQ <'Directory is not on a persistent filesystem: '>)}
                  spids: [3138]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name SERVERNAME))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {(DQ (${ Id.VSub_Name _SERVERNAME_z))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3145 3160]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name KEYPRINT))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {(DQ (${ Id.VSub_Name _KEYPRINT_z))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3196 3211]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<echo>} {(DQ (${ Id.VSub_Name KEYPRINT))})
                            (C {<grep>} {<-qE>} {(DQ <'^[0-9a-f]{64}'> <Id.Lit_Other '$'>)})
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {<-n>} {(DQ (${ Id.VSub_Name _KEYPRINT_bad))})
                    (C {<echo>} {(${ Id.VSub_Name KEYPRINT)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3247 3271]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-d>} {(DQ (${ Id.VSub_Name WORKDIR))} {<-a>} 
                              {<-w>} {(DQ (${ Id.VSub_Name WORKDIR))} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {<-n>} {(DQ (${ Id.VSub_Name _WORKDIR_bad))})
                    (C {<echo>} {(${ Id.VSub_Name WORKDIR)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3316 3343]
                )
              ]
            )
            (command.Case
              to_match: 
                {
                  (command_sub
                    left_token: <Id.Left_Backtick '`'>
                    command_list: 
                      (command.CommandList
                        children: [(C {<df>} {<-T>} {(${ Id.VSub_Name WORKDIR)})]
                      )
                  )
                }
              arms: [
                (case_arm
                  pat_list: [
                    {<Id.Lit_Star '*'> </dev/md> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> 
                      <Id.Lit_Star '*'>
                    }
                    {<Id.Lit_Star '*'> <tmpfs> <Id.Lit_Star '*'>}
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {<-n>} {(DQ (${ Id.VSub_Name _WORKDIR_bad2))})
                    (C {<echo>} {(${ Id.VSub_Name WORKDIR)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3404 3416 3458 -1]
                )
              ]
            )
            (C {<chmod>} {<700>} {(${ Id.VSub_Name WORKDIR)})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<cd>} {(${ Id.VSub_Name WORKDIR)})
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RELNUM)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {<uname>} {<-r>})
                                  (C {<sed>} {<-E>} {(SQ <'s,-p[0-9]+,,'>)})
                                  (C {<sed>} {<-E>} {(SQ <'s,-SECURITY,-RELEASE,'>)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [3503]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:ARCH)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: (command.CommandList children:[(C {<uname>} {<-m>})])
                      )
                    }
                  spids: [3537]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FETCHDIR)
                  op: assign_op.Equal
                  rhs: {(${ Id.VSub_Name RELNUM) </> (${ Id.VSub_Name ARCH)}
                  spids: [3547]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:PATCHDIR)
                  op: assign_op.Equal
                  rhs: {(${ Id.VSub_Name RELNUM) </> (${ Id.VSub_Name ARCH) </bp>}
                  spids: [3557]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:BOOTFILE)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [(C {<sysctl>} {<-n>} {<kern.bootfile>})]
                          )
                      )
                    }
                  spids: [3573]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:KERNELDIR)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Name BOOTFILE>
                        suffix_op: 
                          (suffix_op.Unary
                            op_id: Id.VOp1_Percent
                            arg_word: {<Id.Lit_Slash /> <kernel>}
                          )
                      )
                    }
                  spids: [3585]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-d>} {(${ Id.VSub_Name KERNELDIR)} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'Cannot identify running kernel'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3594 3609]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:KERNCONF)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: (command.CommandList children:[(C {<uname>} {<-i>})])
                      )
                    }
                  spids: [3660]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name KERNCONF)} {<Id.Lit_Equals '='>} 
                          {(DQ <SMP-GENERIC>)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:KERNCONF)
                          op: assign_op.Equal
                          rhs: {<SMP>}
                          spids: [3690]
                        )
                      ]
                    )
                  ]
                  spids: [3670 3687]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name KERNCONF)} 
                              {<Id.Lit_Equals '='>} {(DQ <GENERIC>)} {<Id.Lit_RBracket ']'>}
                            )
                            (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name ARCH)} {<Id.Lit_Equals '='>} 
                              {(DQ <amd64>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (C {<sysctl>} {<kern.version>})
                                    (C {<grep>} {<-qE>} {(SQ <'/SMP$'>)})
                                  ]
                                  negated: F
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:KERNCONF)
                                  op: assign_op.Equal
                                  rhs: {<SMP>}
                                  spids: [3753]
                                )
                              ]
                            )
                          ]
                          spids: [3733 3750]
                        )
                      ]
                    )
                  ]
                  spids: [3697 3730]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:BSPATCH)
                  op: assign_op.Equal
                  rhs: {</usr/bin/bspatch>}
                  spids: [3768]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SHA256)
                  op: assign_op.Equal
                  rhs: {</sbin/sha256>}
                  spids: [3772]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:PHTTPGET)
                  op: assign_op.Equal
                  rhs: {</usr/libexec/phttpget>}
                  spids: [3776]
                )
              ]
            )
            (C {<fetch_setup_verboselevel>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:BDHASH)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {<echo>} {(${ Id.VSub_Name BASEDIR)})
                                  (C {<sha256>} {<-q>})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [3793]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_check_params
      body: 
        (command.BraceGroup
          children: [
            (C {<fetchupgrade_check_params>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name TARGETRELEASE))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {<-n>} {(DQ <"-r option is meaningless with 'fetch' command.  ">)})
                    (C {<echo>} {(DQ <"(Did you mean 'upgrade' instead?)">)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3828 3845]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-f>} 
                          {(${ Id.VSub_Name BDHASH) <-install/kerneldone>} {<-a>} {($ Id.VSub_DollarName '$FORCEFETCH')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'You have a partially completed upgrade pending'>)})
                    (C {<echo>} {(DQ <"Run '"> ($ Id.VSub_Number '$0') <" install' first.">)})
                    (C {<echo>} 
                      {(DQ <"Run '"> ($ Id.VSub_Number '$0') <" fetch -F' to proceed anyway.">)}
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3893 3915]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: upgrade_check_params
      body: 
        (command.BraceGroup
          children: [
            (C {<fetchupgrade_check_params>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:NKERNCONF)
                  op: assign_op.Equal
                  rhs: {(${ Id.VSub_Name KERNCONF)}
                  spids: [3972]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_TARGETRELEASE_z)
                  op: assign_op.Equal
                  rhs: {(DQ <'Release target must be specified via -r option.'>)}
                  spids: [3983]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name TARGETRELEASE))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {(DQ (${ Id.VSub_Name _TARGETRELEASE_z))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3989 4004]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name TARGETRELEASE))} 
                          {<Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name RELNUM))} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {(DQ <'Cannot upgrade from '> (${ Id.VSub_Name RELNUM) <' to itself'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [4045 4066]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name ALLOWADD))} 
                          {<Id.Lit_Equals '='>} {(DQ <no>)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {<-n>} 
                      {
                        (DQ <'WARNING: '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                          <'AllowAdd no'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' is a bad idea '>
                        )
                      }
                    )
                    (C {<echo>} {(DQ <'when upgrading between releases.'>)})
                    (C {<echo>})
                  ]
                  spids: [4109 4128]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name ALLOWDELETE))} 
                          {<Id.Lit_Equals '='>} {(DQ <no>)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {<-n>} 
                      {
                        (DQ <'WARNING: '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                          <'AllowDelete no'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' is a bad idea '>
                        )
                      }
                    )
                    (C {<echo>} {(DQ <'when upgrading between releases.'>)})
                    (C {<echo>})
                  ]
                  spids: [4173 4192]
                )
              ]
            )
            (C {<Id.Lit_Other ':'>} 
              {
                (braced_var_sub
                  token: <Id.VSub_Name EDITOR>
                  suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonEquals arg_word:{(SQ </usr/bin/vi>)})
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: install_check_params
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} 
                          {
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              command_list: (command.CommandList children:[(C {<id>} {<-u>})])
                            )
                          } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'You must be root to run this.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [4273 4293]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} 
                          {
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              command_list: 
                                (command.CommandList
                                  children: [(C {<sysctl>} {<-n>} {<kern.securelevel>})]
                                )
                            )
                          } {<-gt>} {<0>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'Updates cannot be installed when the system securelevel'>)})
                    (C {<echo>} {(DQ <'is greater than zero.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [4316 4337]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_WORKDIR_bad)
                  op: assign_op.Equal
                  rhs: {(DQ <'Directory does not exist or is not writable: '>)}
                  spids: [4367]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-d>} {(DQ (${ Id.VSub_Name WORKDIR))} {<-a>} 
                              {<-w>} {(DQ (${ Id.VSub_Name WORKDIR))} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {<-n>} {(DQ (${ Id.VSub_Name _WORKDIR_bad))})
                    (C {<echo>} {(${ Id.VSub_Name WORKDIR)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [4373 4400]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<cd>} {(${ Id.VSub_Name WORKDIR)})
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:BDHASH)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {<echo>} {(${ Id.VSub_Name BASEDIR)})
                                  (C {<sha256>} {<-q>})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [4463]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-L>} {(${ Id.VSub_Name BDHASH) <-install>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'No updates are available to install.'>)})
                    (C {<echo>} {(DQ <"Run '"> ($ Id.VSub_Number '$0') <" fetch' first.">)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [4486 4502]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (command.Pipeline
                              children: [
                                (C {<Id.Lit_LBracket '['>} {<-f>} 
                                  {(${ Id.VSub_Name BDHASH) <-install/INDEX-OLD>} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                              negated: T
                            )
                            (command.Pipeline
                              children: [
                                (C {<Id.Lit_LBracket '['>} {<-f>} 
                                  {(${ Id.VSub_Name BDHASH) <-install/INDEX-NEW>} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                              negated: T
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'Update manifest is corrupt -- this should never happen.'>)})
                    (C {<echo>} {(DQ <"Re-run '"> ($ Id.VSub_Number '$0') <" fetch'.">)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [4529 4561]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:BOOTFILE)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [(C {<sysctl>} {<-n>} {<kern.bootfile>})]
                          )
                      )
                    }
                  spids: [4593]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:KERNELDIR)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Name BOOTFILE>
                        suffix_op: 
                          (suffix_op.Unary
                            op_id: Id.VOp1_Percent
                            arg_word: {<Id.Lit_Slash /> <kernel>}
                          )
                      )
                    }
                  spids: [4605]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-d>} {(${ Id.VSub_Name KERNELDIR)} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'Cannot identify running kernel'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [4614 4629]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: rollback_check_params
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} 
                          {
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              command_list: (command.CommandList children:[(C {<id>} {<-u>})])
                            )
                          } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'You must be root to run this.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [4667 4687]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_WORKDIR_bad)
                  op: assign_op.Equal
                  rhs: {(DQ <'Directory does not exist or is not writable: '>)}
                  spids: [4710]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-d>} {(DQ (${ Id.VSub_Name WORKDIR))} {<-a>} 
                              {<-w>} {(DQ (${ Id.VSub_Name WORKDIR))} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {<-n>} {(DQ (${ Id.VSub_Name _WORKDIR_bad))})
                    (C {<echo>} {(${ Id.VSub_Name WORKDIR)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [4716 4743]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<cd>} {(${ Id.VSub_Name WORKDIR)})
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:BDHASH)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {<echo>} {(${ Id.VSub_Name BASEDIR)})
                                  (C {<sha256>} {<-q>})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [4806]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-L>} {(${ Id.VSub_Name BDHASH) <-rollback>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'No rollback directory found.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [4829 4845]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (command.Pipeline
                              children: [
                                (C {<Id.Lit_LBracket '['>} {<-f>} 
                                  {(${ Id.VSub_Name BDHASH) <-rollback/INDEX-OLD>} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                              negated: T
                            )
                            (command.Pipeline
                              children: [
                                (C {<Id.Lit_LBracket '['>} {<-f>} 
                                  {(${ Id.VSub_Name BDHASH) <-rollback/INDEX-NEW>} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                              negated: T
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'Update manifest is corrupt -- this should never happen.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [4863 4895]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: IDS_check_params
      body: 
        (command.BraceGroup
          children: [
            (C {<export>} 
              {<Id.Lit_VarLike 'HTTP_USER_AGENT='> 
                (DQ <'freebsd-update ('> (${ Id.VSub_Name COMMAND) <', '> 
                  (command_sub
                    left_token: <Id.Left_Backtick '`'>
                    command_list: (command.CommandList children:[(C {<uname>} {<-r>})])
                  ) <')'>
                )
              }
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_SERVERNAME_z)
                  op: assign_op.Equal
                  rhs: {(DQ <'SERVERNAME must be given via command line or configuration file.'>)}
                  spids: [4965]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_KEYPRINT_z)
                  op: assign_op.Equal
                  rhs: {(DQ <'Key must be given via -k option or configuration file.'>)}
                  spids: [4972]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_KEYPRINT_bad)
                  op: assign_op.Equal
                  rhs: {(DQ <'Invalid key fingerprint: '>)}
                  spids: [4978]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_WORKDIR_bad)
                  op: assign_op.Equal
                  rhs: {(DQ <'Directory does not exist or is not writable: '>)}
                  spids: [4984]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name SERVERNAME))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {(DQ (${ Id.VSub_Name _SERVERNAME_z))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [4991 5006]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name KEYPRINT))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {(DQ (${ Id.VSub_Name _KEYPRINT_z))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [5042 5057]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<echo>} {(DQ (${ Id.VSub_Name KEYPRINT))})
                            (C {<grep>} {<-qE>} {(DQ <'^[0-9a-f]{64}'> <Id.Lit_Other '$'>)})
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {<-n>} {(DQ (${ Id.VSub_Name _KEYPRINT_bad))})
                    (C {<echo>} {(${ Id.VSub_Name KEYPRINT)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [5093 5117]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-d>} {(DQ (${ Id.VSub_Name WORKDIR))} {<-a>} 
                              {<-w>} {(DQ (${ Id.VSub_Name WORKDIR))} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <': '>
                        )
                      }
                    )
                    (C {<echo>} {<-n>} {(DQ (${ Id.VSub_Name _WORKDIR_bad))})
                    (C {<echo>} {(${ Id.VSub_Name WORKDIR)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [5162 5189]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<cd>} {(${ Id.VSub_Name WORKDIR)})
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RELNUM)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {<uname>} {<-r>})
                                  (C {<sed>} {<-E>} {(SQ <'s,-p[0-9]+,,'>)})
                                  (C {<sed>} {<-E>} {(SQ <'s,-SECURITY,-RELEASE,'>)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [5264]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:ARCH)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: (command.CommandList children:[(C {<uname>} {<-m>})])
                      )
                    }
                  spids: [5298]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FETCHDIR)
                  op: assign_op.Equal
                  rhs: {(${ Id.VSub_Name RELNUM) </> (${ Id.VSub_Name ARCH)}
                  spids: [5308]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:PATCHDIR)
                  op: assign_op.Equal
                  rhs: {(${ Id.VSub_Name RELNUM) </> (${ Id.VSub_Name ARCH) </bp>}
                  spids: [5318]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:BOOTFILE)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [(C {<sysctl>} {<-n>} {<kern.bootfile>})]
                          )
                      )
                    }
                  spids: [5334]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:KERNELDIR)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Name BOOTFILE>
                        suffix_op: 
                          (suffix_op.Unary
                            op_id: Id.VOp1_Percent
                            arg_word: {<Id.Lit_Slash /> <kernel>}
                          )
                      )
                    }
                  spids: [5346]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-d>} {(${ Id.VSub_Name KERNELDIR)} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'Cannot identify running kernel'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [5355 5370]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:KERNCONF)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: (command.CommandList children:[(C {<uname>} {<-i>})])
                      )
                    }
                  spids: [5421]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name KERNCONF)} {<Id.Lit_Equals '='>} 
                          {(DQ <SMP-GENERIC>)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:KERNCONF)
                          op: assign_op.Equal
                          rhs: {<SMP>}
                          spids: [5451]
                        )
                      ]
                    )
                  ]
                  spids: [5431 5448]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name KERNCONF)} 
                              {<Id.Lit_Equals '='>} {(DQ <GENERIC>)} {<Id.Lit_RBracket ']'>}
                            )
                            (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name ARCH)} {<Id.Lit_Equals '='>} 
                              {(DQ <amd64>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (C {<sysctl>} {<kern.version>})
                                    (C {<grep>} {<-qE>} {(SQ <'/SMP$'>)})
                                  ]
                                  negated: F
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:KERNCONF)
                                  op: assign_op.Equal
                                  rhs: {<SMP>}
                                  spids: [5514]
                                )
                              ]
                            )
                          ]
                          spids: [5494 5511]
                        )
                      ]
                    )
                  ]
                  spids: [5458 5491]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SHA256)
                  op: assign_op.Equal
                  rhs: {</sbin/sha256>}
                  spids: [5529]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:PHTTPGET)
                  op: assign_op.Equal
                  rhs: {</usr/libexec/phttpget>}
                  spids: [5533]
                )
              ]
            )
            (C {<fetch_setup_verboselevel>})
          ]
        )
    )
    (command.ShFunction
      name: fetch_pick_server_init
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{<Id.Lit_Other ':'>}]
              redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<serverlist_tried>})]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (command.Pipeline children:[(C {<which>} {<-s>} {<host>})] negated:T)
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [{<Id.Lit_Other ':'>}]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {<serverlist_full>}
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [5610 5621]
                )
              ]
            )
            (C {<echo>} {<-n>} {(DQ <'Looking up '> (${ Id.VSub_Name SERVERNAME) <' mirrors... '>)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:MLIST)
                  op: assign_op.Equal
                  rhs: {(DQ <_http._tcp.> (${ Id.VSub_Name SERVERNAME))}
                  spids: [5663]
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {<host>} {<-t>} {<srv>} {(DQ (${ Id.VSub_Name MLIST))})
                (C {<sed>} {<-nE>} 
                  {(DQ <s/> (${ Id.VSub_Name MLIST) <' (has SRV record|server selection) //p'>)}
                )
                (C {<cut>} {<-f>} {<1> <Id.Lit_Comma ','> <2> <Id.Lit_Comma ','> <4>} {<-d>} {(SQ <' '>)})
                (C {<sed>} {<-e>} {(SQ <'s/\\.$//'>)})
                (command.Simple
                  words: [{<sort>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<serverlist_full>})]
                )
              ]
              negated: F
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} 
                          {
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (command.Simple
                                      words: [{<wc>} {<-l>}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Id.Redir_Less '<'>
                                          fd: -1
                                          arg_word: {<serverlist_full>}
                                        )
                                      ]
                                    )
                                  ]
                                )
                            )
                          } {<-eq>} {<0>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'none found.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [5743 5766]
                )
              ]
            )
            (C {<echo>} 
              {
                (command_sub
                  left_token: <Id.Left_Backtick '`'>
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.Simple
                          words: [{<wc>} {<-l>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Less '<'>
                              fd: -1
                              arg_word: {<serverlist_full>}
                            )
                          ]
                        )
                      ]
                    )
                )
              } {(DQ <'mirrors found.'>)}
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} 
                          {(DQ (${ Id.VSub_Name HTTP_PROXY) (${ Id.VSub_Name http_proxy))} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:RANDVALUE)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {<sha256>} {<-qs>} 
                                            {
                                              (DQ (${ Id.VSub_Name HTTP_PROXY) 
                                                (${ Id.VSub_Name http_proxy)
                                              )
                                            }
                                          )
                                          (C {<tr>} {<-d>} {(SQ <a-f>)})
                                          (C {<cut>} {<-c>} {<1-9>})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [5838]
                        )
                      ]
                    )
                  ]
                  spids: [5817 5835]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:RANDVALUE)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<jot>} {<-r>} {<1>} {<0>} {<999999999>})]
                              )
                          )
                        }
                      spids: [5882]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_pick_server
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<sort>} {<serverlist_tried>})
                (command.Simple
                  words: [{<comm>} {<-23>} {<serverlist_full>} {<->}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<serverlist>})]
                )
              ]
              negated: F
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} 
                          {
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (command.Simple
                                      words: [{<wc>} {<-l>}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Id.Redir_Less '<'>
                                          fd: -1
                                          arg_word: {<serverlist>}
                                        )
                                      ]
                                    )
                                  ]
                                )
                            )
                          } {<-eq>} {<0>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'No mirrors remaining, giving up.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [5941 5964]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SRV_PRIORITY)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {<cut>} {<-f>} {<1>} {<-d>} {(SQ <' '>)} {<serverlist>})
                                  (C {<sort>} {<-n>})
                                  (C {<head>} {<-1>})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [5986]
                )
              ]
            )
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:SRV_WSUM)
                      op: assign_op.Equal
                      rhs: {<0>}
                      spids: [6022]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(command.Sentence child:(C {<read>} {<X>}) terminator:<Id.Op_Semi _>)]
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$X'))}
                      arms: [
                        (case_arm
                          pat_list: [
                            {(${ Id.VSub_Name SRV_PRIORITY) 
                              (word_part.EscapedLiteral
                                token: <Id.Lit_EscapedChar '\\ '>
                              ) <Id.Lit_Star '*'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:SRV_W)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_Backtick '`'>
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (command.Pipeline
                                                children: [
                                                  (C {<echo>} {($ Id.VSub_DollarName '$X')})
                                                  (C {<cut>} {<-f>} {<2>} {<-d>} {(SQ <' '>)})
                                                ]
                                                negated: F
                                              )
                                            ]
                                          )
                                      )
                                    }
                                  spids: [6054]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:SRV_WSUM)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSub
                                        anode: 
                                          (arith_expr.Binary
                                            op_id: Id.Arith_Plus
                                            left: 
                                              (arith_expr.ArithWord
                                                w: {($ Id.VSub_DollarName '$SRV_WSUM')}
                                              )
                                            right: 
                                              (arith_expr.ArithWord
                                                w: {($ Id.VSub_DollarName '$SRV_W')}
                                              )
                                          )
                                      )
                                    }
                                  spids: [6078]
                                )
                              ]
                            )
                          ]
                          spids: [6046 6051 6089 -1]
                        )
                      ]
                    )
                  ]
                )
              redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<serverlist>})]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name SRV_WSUM)} {<-eq>} {<0>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SRV_WSUM)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {<grep>} {<-E>} 
                                            {(DQ <'^'> (${ Id.VSub_Name SRV_PRIORITY) <' '>)} {<serverlist>}
                                          )
                                          (C {<wc>} {<-l>})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [6124]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SRV_W_ADD)
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [6150]
                        )
                      ]
                    )
                  ]
                  spids: [6106 6121]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:SRV_W_ADD)
                      op: assign_op.Equal
                      rhs: {<0>}
                      spids: [6157]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SRV_RND)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {<expr>} {(${ Id.VSub_Name RANDVALUE)} {<Id.Lit_Other '%'>} 
                                {(${ Id.VSub_Name SRV_WSUM)}
                              )
                            ]
                          )
                      )
                    }
                  spids: [6168]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(command.Sentence child:(C {<read>} {<X>}) terminator:<Id.Op_Semi _>)]
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$X'))}
                      arms: [
                        (case_arm
                          pat_list: [
                            {(${ Id.VSub_Name SRV_PRIORITY) 
                              (word_part.EscapedLiteral
                                token: <Id.Lit_EscapedChar '\\ '>
                              ) <Id.Lit_Star '*'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:SRV_W)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_Backtick '`'>
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (command.Pipeline
                                                children: [
                                                  (C {<echo>} {($ Id.VSub_DollarName '$X')})
                                                  (C {<cut>} {<-f>} {<2>} {<-d>} {(SQ <' '>)})
                                                ]
                                                negated: F
                                              )
                                            ]
                                          )
                                      )
                                    }
                                  spids: [6223]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:SRV_W)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSub
                                        anode: 
                                          (arith_expr.Binary
                                            op_id: Id.Arith_Plus
                                            left: 
                                              (arith_expr.ArithWord
                                                w: {($ Id.VSub_DollarName '$SRV_W')}
                                              )
                                            right: 
                                              (arith_expr.ArithWord
                                                w: {($ Id.VSub_DollarName '$SRV_W_ADD')}
                                              )
                                          )
                                      )
                                    }
                                  spids: [6247]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$SRV_RND')} 
                                          {<-lt>} {($ Id.VSub_DollarName '$SRV_W')} {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:SERVERNAME)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (command_sub
                                                left_token: <Id.Left_Backtick '`'>
                                                command_list: 
                                                  (command.CommandList
                                                    children: [
                                                      (command.Pipeline
                                                        children: [
                                                          (C {<echo>} {($ Id.VSub_DollarName '$X')})
                                                          (C {<cut>} {<-f>} {<3>} {<-d>} {(SQ <' '>)})
                                                        ]
                                                        negated: F
                                                      )
                                                    ]
                                                  )
                                              )
                                            }
                                          spids: [6274]
                                        )
                                      ]
                                    )
                                    (command.Simple
                                      words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$X'))}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Id.Redir_DGreat '>>'>
                                          fd: -1
                                          arg_word: {<serverlist_tried>}
                                        )
                                      ]
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Break break>
                                    )
                                  ]
                                  spids: [6258 6271]
                                )
                              ]
                              else_action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:SRV_RND)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (word_part.ArithSub
                                            anode: 
                                              (arith_expr.Binary
                                                op_id: Id.Arith_Minus
                                                left: 
                                                  (arith_expr.ArithWord
                                                    w: {($ Id.VSub_DollarName '$SRV_RND')}
                                                  )
                                                right: 
                                                  (arith_expr.ArithWord
                                                    w: {($ Id.VSub_DollarName '$SRV_W')}
                                                  )
                                              )
                                          )
                                        }
                                      spids: [6315]
                                    )
                                  ]
                                )
                              ]
                            )
                          ]
                          spids: [6215 6220 6329 -1]
                        )
                      ]
                    )
                  ]
                )
              redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<serverlist>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_make_patchlist
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<grep>} {<-vE>} 
                  {
                    (DQ <'^([0-9a-f]{64})'> <Id.Lit_Other '\\'> <'|'> <Id.Lit_Other '\\'> <1> 
                      <Id.Lit_Other '$'>
                    )
                  }
                )
                (C {<tr>} {(SQ <'|'>)} {(SQ <' '>)})
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: [(command.Sentence child:(C {<read>} {<X>} {<Y>}) terminator:<Id.Op_Semi _>)]
                  body: 
                    (command.DoGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.AndOr
                                      ops: [Id.Op_DPipe]
                                      children: [
                                        (C {<Id.Lit_LBracket '['>} {<-f>} 
                                          {(DQ <files/> (${ Id.VSub_Name Y) <.gz>)} {<Id.Lit_RBracket ']'>}
                                        )
                                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                                          {(DQ <files/> (${ Id.VSub_Name X) <.gz>)} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [(command.ControlFlow token:<Id.ControlFlow_Continue continue>)]
                              spids: [6399 6435]
                            )
                          ]
                        )
                        (C {<echo>} {(DQ (${ Id.VSub_Name X) <'|'> (${ Id.VSub_Name Y))})
                      ]
                    )
                )
                (C {<uniq>})
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_progress
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:LNC)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [6477]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(command.Sentence child:(C {<read>} {<x>}) terminator:<Id.Op_Semi _>)]
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:LNC)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Plus
                                    left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$LNC')})
                                    right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>})
                                  )
                              )
                            }
                          spids: [6491]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} 
                                  {
                                    (word_part.ArithSub
                                      anode: 
                                        (arith_expr.Binary
                                          op_id: Id.Arith_Percent
                                          left: 
                                            (arith_expr.ArithWord
                                              w: {($ Id.VSub_DollarName '$LNC')}
                                            )
                                          right: (arith_expr.ArithWord w:{<Id.Lit_Digits 10>})
                                        )
                                    )
                                  } {<Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [(C {<echo>} {<-n>} {($ Id.VSub_DollarName '$LNC')})]
                          spids: [6502 6522]
                        )
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} 
                                  {
                                    (word_part.ArithSub
                                      anode: 
                                        (arith_expr.Binary
                                          op_id: Id.Arith_Percent
                                          left: 
                                            (arith_expr.ArithWord
                                              w: {($ Id.VSub_DollarName '$LNC')}
                                            )
                                          right: (arith_expr.ArithWord w:{<Id.Lit_Digits 2>})
                                        )
                                    )
                                  } {<Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [(C {<echo>} {<-n>} {<.>})]
                          spids: [6532 6552]
                        )
                      ]
                    )
                  ]
                )
            )
            (C {<echo>} {<-n>} {(DQ <' '>)})
          ]
        )
    )
    (command.ShFunction
      name: continuep
      body: 
        (command.BraceGroup
          children: [
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: (C {<read>} {<-p>} {(DQ <'Does this look reasonable (y/n)? '>)} {<CONTINUE>})
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(DQ (${ Id.VSub_Name CONTINUE))}
                      arms: [
                        (case_arm
                          pat_list: [{<y> <Id.Lit_Star '*'>}]
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<0>}
                            )
                          ]
                          spids: [6617 6619 6627 -1]
                        )
                        (case_arm
                          pat_list: [{<n> <Id.Lit_Star '*'>}]
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [6630 6632 6640 -1]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: workdir_init
      body: 
        (command.BraceGroup
          children: [(C {<mkdir>} {<-p>} {<files>}) (C {<touch>} {<tINDEX.present>})]
        )
    )
    (command.ShFunction
      name: fetch_key
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-r>} {<pub.ssl>} {<Id.Lit_RBracket ']'>})
                            (C {<Id.Lit_LBracket '['>} 
                              {
                                (command_sub
                                  left_token: <Id.Left_Backtick '`'>
                                  command_list: 
                                    (command.CommandList
                                      children: [(C {(${ Id.VSub_Name SHA256)} {<-q>} {<pub.ssl>})]
                                    )
                                )
                              } {<Id.Lit_Equals '='>} {(${ Id.VSub_Name KEYPRINT)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [6693 6728]
                )
              ]
            )
            (C {<echo>} {<-n>} {(DQ <'Fetching public key from '> (${ Id.VSub_Name SERVERNAME) <'... '>)})
            (C {<rm>} {<-f>} {<pub.ssl>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [
                    {<fetch>}
                    {(${ Id.VSub_Name QUIETFLAG)}
                    {<http> <Id.Lit_Other ':'> <//> (${ Id.VSub_Name SERVERNAME) </> 
                      (${ Id.VSub_Name FETCHDIR) </pub.ssl>
                    }
                  ]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '2>'>
                      fd: 2
                      arg_word: {(${ Id.VSub_Name QUIETREDIR)}
                    )
                  ]
                )
                (C {<true>})
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-r>} {<pub.ssl>} {<Id.Lit_RBracket ']'>})
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <failed.>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [6790 6803]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} 
                              {
                                (command_sub
                                  left_token: <Id.Left_Backtick '`'>
                                  command_list: 
                                    (command.CommandList
                                      children: [(C {(${ Id.VSub_Name SHA256)} {<-q>} {<pub.ssl>})]
                                    )
                                )
                              } {<Id.Lit_Equals '='>} {(${ Id.VSub_Name KEYPRINT)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'key has incorrect hash.'>)})
                    (C {<rm>} {<-f>} {<pub.ssl>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [6821 6848]
                )
              ]
            )
            (C {<echo>} {(DQ <done.>)})
          ]
        )
    )
    (command.ShFunction
      name: fetch_tag
      body: 
        (command.BraceGroup
          children: [
            (C {<echo>} {<-n>} {(DQ <'Fetching metadata signature '>)})
            (C {<echo>} {(${ Id.VSub_Name NDEBUG)} 
              {
                (DQ <'for '> (${ Id.VSub_Name RELNUM) <' from '> (${ Id.VSub_Name SERVERNAME) <'... '>)
              }
            )
            (C {<rm>} {<-f>} {<latest.ssl>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [
                    {<fetch>}
                    {(${ Id.VSub_Name QUIETFLAG)}
                    {<http> <Id.Lit_Other ':'> <//> (${ Id.VSub_Name SERVERNAME) </> 
                      (${ Id.VSub_Name FETCHDIR) </latest.ssl>
                    }
                  ]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '2>'>
                      fd: 2
                      arg_word: {(${ Id.VSub_Name QUIETREDIR)}
                    )
                  ]
                )
                (C {<true>})
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-r>} {<latest.ssl>} {<Id.Lit_RBracket ']'>})
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <failed.>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [6958 6971]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [{<openssl>} {<rsautl>} {<-pubin>} {<-inkey>} {<pub.ssl>} {<-verify>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Less '<'>
                      fd: -1
                      arg_word: {<latest.ssl>}
                    )
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {<tag.new>}
                    )
                    (redir.Redir
                      op: <Id.Redir_Great '2>'>
                      fd: 2
                      arg_word: {(${ Id.VSub_Name QUIETREDIR)}
                    )
                  ]
                )
                (C {<true>})
              ]
            )
            (C {<rm>} {<latest.ssl>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (command.Pipeline
                              children: [
                                (C {<Id.Lit_LBracket '['>} 
                                  {
                                    (command_sub
                                      left_token: <Id.Left_Backtick '`'>
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (command.Simple
                                              words: [{<wc>} {<-l>}]
                                              redirects: [
                                                (redir.Redir
                                                  op: <Id.Redir_Less '<'>
                                                  fd: -1
                                                  arg_word: {<tag.new>}
                                                )
                                              ]
                                            )
                                          ]
                                        )
                                    )
                                  } {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                              negated: T
                            )
                            (command.Pipeline
                              children: [
                                (C {<grep>} {<-qE>} 
                                  {
                                    (DQ <'^freebsd-update'> <Id.Lit_Other '\\'> <'|'> 
                                      (${ Id.VSub_Name ARCH) <Id.Lit_Other '\\'> <'|'> (${ Id.VSub_Name RELNUM) <Id.Lit_Other '\\'> <'|[0-9]+'> <Id.Lit_Other '\\'> 
                                      <'|[0-9a-f]{64}'> <Id.Lit_Other '\\'> <'|[0-9]{10}'>
                                    )
                                  } {<tag.new>}
                                )
                              ]
                              negated: T
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'invalid signature.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [7028 7088]
                )
              ]
            )
            (C {<echo>} {(DQ <done.>)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RELPATCHNUM)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Simple
                                words: [{<cut>} {<-f>} {<4>} {<-d>} {(SQ <'|'>)}]
                                redirects: [
                                  (redir.Redir
                                    op: <Id.Redir_Less '<'>
                                    fd: -1
                                    arg_word: {<tag.new>}
                                  )
                                ]
                              )
                            ]
                          )
                      )
                    }
                  spids: [7115]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:TINDEXHASH)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Simple
                                words: [{<cut>} {<-f>} {<5>} {<-d>} {(SQ <'|'>)}]
                                redirects: [
                                  (redir.Redir
                                    op: <Id.Redir_Less '<'>
                                    fd: -1
                                    arg_word: {<tag.new>}
                                  )
                                ]
                              )
                            ]
                          )
                      )
                    }
                  spids: [7137]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:EOLTIME)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Simple
                                words: [{<cut>} {<-f>} {<6>} {<-d>} {(SQ <'|'>)}]
                                redirects: [
                                  (redir.Redir
                                    op: <Id.Redir_Less '<'>
                                    fd: -1
                                    arg_word: {<tag.new>}
                                  )
                                ]
                              )
                            ]
                          )
                      )
                    }
                  spids: [7159]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_tagsanity
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RELPX)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [(C {<uname>} {<-r>}) (C {<sed>} {<-E>} {(SQ <'s,.*-,,'>)})]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [7201]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<echo>} {(${ Id.VSub_Name RELPX)})
                            (C {<grep>} {<-qE>} {(SQ <'^p[0-9]+$'>)})
                          ]
                          negated: F
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:RELPX)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {<echo>} {(${ Id.VSub_Name RELPX)})
                                          (C {<cut>} {<-c>} {<2->})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [7243]
                        )
                      ]
                    )
                  ]
                  spids: [7221 7240]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:RELPX)
                      op: assign_op.Equal
                      rhs: {<0>}
                      spids: [7266]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name RELPATCHNUM))} {<-lt>} 
                          {(DQ (${ Id.VSub_Name RELPX))} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>})
                    (C {<echo>} {<-n>} 
                      {
                        (DQ <'Files on mirror ('> (${ Id.VSub_Name RELNUM) <-p> 
                          (${ Id.VSub_Name RELPATCHNUM) <')'>
                        )
                      }
                    )
                    (C {<echo>} {(DQ <' appear older than what'>)})
                    (C {<echo>} 
                      {
                        (DQ <'we are currently running ('> 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: (command.CommandList children:[(C {<uname>} {<-r>})])
                          ) <')!'>
                        )
                      }
                    )
                    (C {<echo>} {(DQ <'Cowardly refusing to proceed any further.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [7273 7294]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-f>} {<tag>} {<Id.Lit_RBracket ']'>})
                            (C {<grep>} {<-qE>} 
                              {
                                (DQ <'^freebsd-update'> <Id.Lit_Other '\\'> <'|'> (${ Id.VSub_Name ARCH) 
                                  <Id.Lit_Other '\\'> <'|'> (${ Id.VSub_Name RELNUM) <Id.Lit_Other '\\'> <'|[0-9]+'> <Id.Lit_Other '\\'> <'|[0-9a-f]{64}'> 
                                  <Id.Lit_Other '\\'> <'|[0-9]{10}'>
                                )
                              } {<tag>}
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:LASTRELPATCHNUM)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Simple
                                        words: [{<cut>} {<-f>} {<4>} {<-d>} {(SQ <'|'>)}]
                                        redirects: [
                                          (redir.Redir
                                            op: <Id.Redir_Less '<'>
                                            fd: -1
                                            arg_word: {<tag>}
                                          )
                                        ]
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [7414]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name RELPATCHNUM))} {<-lt>} 
                                  {(DQ (${ Id.VSub_Name LASTRELPATCHNUM))} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<echo>})
                            (C {<echo>} {<-n>} 
                              {
                                (DQ <'Files on mirror ('> (${ Id.VSub_Name RELNUM) <-p> 
                                  (${ Id.VSub_Name RELPATCHNUM) <')'>
                                )
                              }
                            )
                            (C {<echo>} {(DQ <' are older than the'>)})
                            (C {<echo>} {<-n>} {(DQ <'most recently seen updates'>)})
                            (C {<echo>} 
                              {
                                (DQ <' ('> (${ Id.VSub_Name RELNUM) <-p> 
                                  (${ Id.VSub_Name LASTRELPATCHNUM) <').'>
                                )
                              }
                            )
                            (C {<echo>} {(DQ <'Cowardly refusing to proceed any further.'>)})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [7437 7458]
                        )
                      ]
                    )
                  ]
                  spids: [7367 7411]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_metadata_index
      body: 
        (command.BraceGroup
          children: [
            (C {<echo>} {(${ Id.VSub_Name NDEBUG)} {(DQ <'Fetching metadata index... '>)})
            (C {<rm>} {<-f>} {(${ Id.VSub_Name TINDEXHASH)})
            (C {<fetch>} {(${ Id.VSub_Name QUIETFLAG)} 
              {<http> <Id.Lit_Other ':'> <//> (${ Id.VSub_Name SERVERNAME) </> (${ Id.VSub_Name FETCHDIR) 
                </t/> (${ Id.VSub_Name TINDEXHASH)
              }
            )
            (command.Simple
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '2>'>
                  fd: 2
                  arg_word: {(${ Id.VSub_Name QUIETREDIR)}
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-f>} {(${ Id.VSub_Name TINDEXHASH)} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <failed.>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [7591 7606]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} 
                          {
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(${ Id.VSub_Name SHA256)} {<-q>} {(${ Id.VSub_Name TINDEXHASH)})
                                  ]
                                )
                            )
                          } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(${ Id.VSub_Name TINDEXHASH)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'update metadata index corrupt.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [7624 7652]
                )
              ]
            )
            (C {<echo>} {(DQ <done.>)})
          ]
        )
    )
    (command.ShFunction
      name: fetch_metadata_bogus
      body: 
        (command.BraceGroup
          children: [
            (C {<echo>})
            (C {<echo>} 
              {(DQ <'The update metadata'> ($ Id.VSub_Number '$1') <' is correctly signed, but'>)}
            )
            (C {<echo>} {(DQ <'failed an integrity check.'>)})
            (C {<echo>} {(DQ <'Cowardly refusing to proceed any further.'>)})
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: fetch_metadata_index_merge
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (command.ForEach
                  iter_name: METAFILE
                  iter_words: [{($ Id.VSub_At '$@')}]
                  do_arg_iter: F
                  body: 
                    (command.DoGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} 
                                      {
                                        (command_sub
                                          left_token: <Id.Left_Backtick '`'>
                                          command_list: 
                                            (command.CommandList
                                              children: [
                                                (command.Pipeline
                                                  children: [
                                                    (C {<grep>} {<-E>} 
                                                      {
                                                        (DQ <'^'> (${ Id.VSub_Name METAFILE) 
                                                          <Id.Lit_Other '\\'> <'|'>
                                                        )
                                                      } {(${ Id.VSub_Name TINDEXHASH)}
                                                    )
                                                    (C {<wc>} {<-l>})
                                                  ]
                                                  negated: F
                                                )
                                              ]
                                            )
                                        )
                                      } {<-ne>} {<1>} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [
                                (C {<fetch_metadata_bogus>} {(DQ <' index'>)})
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                              spids: [7749 7791]
                            )
                          ]
                        )
                        (C {<grep>} {<-E>} {(DQ (${ Id.VSub_Name METAFILE) <Id.Lit_Other '\\'> <'|'>)} 
                          {(${ Id.VSub_Name TINDEXHASH)}
                        )
                      ]
                    )
                )
                (command.Simple
                  words: [{<sort>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<tINDEX.wanted>})]
                )
              ]
              negated: F
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-f>} {<tINDEX.present>} {<Id.Lit_RBracket ']'>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Pipeline
                      children: [
                        (C {<join>} {<-t>} {(SQ <'|'>)} {<-v>} {<2>} {<tINDEX.wanted>} {<tINDEX.present>})
                        (command.Simple
                          words: [{<sort>} {<-m>} {<->} {<tINDEX.wanted>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {<tINDEX.new>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (C {<rm>} {<tINDEX.wanted>})
                  ]
                  spids: [7840 7851]
                )
              ]
              else_action: [(C {<mv>} {<tINDEX.wanted>} {<tINDEX.new>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_metadata_index_sanity
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<grep>} {<-qvE>} {(SQ <'^[0-9A-Z.-]+\\|[0-9a-f]{64}$'>)} {<tINDEX.new>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<fetch_metadata_bogus>} {(DQ <' index'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [7926 7939]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_metadata_sanity
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:P)
                  op: assign_op.Equal
                  rhs: {(DQ <'[-+./:=,%@_[~[:alnum:]]'>)}
                  spids: [7982]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:M)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ <'[0-9]+'> <Id.Lit_Other '\\'> <'|[0-9]+'> <Id.Lit_Other '\\'> <'|[0-9]+'> 
                        <Id.Lit_Other '\\'> <'|[0-9]+'>
                      )
                    }
                  spids: [7988]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:H)
                  op: assign_op.Equal
                  rhs: {(DQ <'[0-9a-f]{64}'>)}
                  spids: [8000]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (command.Simple
                              words: [{<gunzip>} {<-c>}]
                              redirects: [
                                (redir.Redir
                                  op: <Id.Redir_Less '<'>
                                  fd: -1
                                  arg_word: {<files/> ($ Id.VSub_Number '$1') <.gz>}
                                )
                              ]
                            )
                            (C {<grep>} {<-qvE>} 
                              {
                                (DQ <'^[a-z]+'> <Id.Lit_Other '\\'> <'|[0-9a-z-]+'> <Id.Lit_Other '\\'> 
                                  <'|'> (${ Id.VSub_Name P) <'+'> <Id.Lit_Other '\\'> <'|[fdL-]'> <Id.Lit_Other '\\'> <'|'>
                                )
                              }
                            )
                          ]
                          negated: F
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<fetch_metadata_bogus>} {(DQ )})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [8011 8047]
                )
              ]
            )
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<gunzip>} {<-c>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Less '<'>
                      fd: -1
                      arg_word: {<files/> ($ Id.VSub_Number '$1') <.gz>}
                    )
                  ]
                )
                (command.Simple
                  words: [{<cut>} {<-f>} {<4->} {<-d>} {(SQ <'|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<sanitycheck.tmp>})]
                )
              ]
              negated: F
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<grep>} {<-E>} {(SQ <'^f'>)} {<sanitycheck.tmp>})
                            (C {<grep>} {<-qvE>} 
                              {
                                (DQ <'^f'> <Id.Lit_Other '\\'> <'|'> (${ Id.VSub_Name M) 
                                  <Id.Lit_Other '\\'> <'|'> (${ Id.VSub_Name H) <Id.Lit_Other '\\'> <'|'> (${ Id.VSub_Name P) <'*'> 
                                  (word_part.EscapedLiteral
                                    token: <Id.Lit_EscapedChar '\\$'>
                                  )
                                )
                              }
                            )
                          ]
                          negated: F
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<fetch_metadata_bogus>} {(DQ )})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [8104 8145]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<grep>} {<-E>} {(SQ <'^d'>)} {<sanitycheck.tmp>})
                            (C {<grep>} {<-qvE>} 
                              {
                                (DQ <'^d'> <Id.Lit_Other '\\'> <'|'> (${ Id.VSub_Name M) 
                                  <Id.Lit_Other '\\'> <'|'> <Id.Lit_Other '\\'> <'|'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>)
                                )
                              }
                            )
                          ]
                          negated: F
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<fetch_metadata_bogus>} {(DQ )})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [8167 8201]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<grep>} {<-E>} {(SQ <'^L'>)} {<sanitycheck.tmp>})
                            (C {<grep>} {<-qvE>} 
                              {
                                (DQ <'^L'> <Id.Lit_Other '\\'> <'|'> (${ Id.VSub_Name M) 
                                  <Id.Lit_Other '\\'> <'|'> (${ Id.VSub_Name P) <'*'> <Id.Lit_Other '\\'> <'|'> 
                                  (word_part.EscapedLiteral
                                    token: <Id.Lit_EscapedChar '\\$'>
                                  )
                                )
                              }
                            )
                          ]
                          negated: F
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<fetch_metadata_bogus>} {(DQ )})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [8223 8261]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<grep>} {<-E>} {(SQ <'^-'>)} {<sanitycheck.tmp>})
                            (C {<grep>} {<-qvE>} 
                              {
                                (DQ <'^-'> <Id.Lit_Other '\\'> <'|'> <Id.Lit_Other '\\'> <'|'> 
                                  <Id.Lit_Other '\\'> <'|'> <Id.Lit_Other '\\'> <'|'> <Id.Lit_Other '\\'> <'|'> <Id.Lit_Other '\\'> <'|'>
                                )
                              }
                            )
                          ]
                          negated: F
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<fetch_metadata_bogus>} {(DQ )})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [8283 8319]
                )
              ]
            )
            (C {<rm>} {<sanitycheck.tmp>})
          ]
        )
    )
    (command.ShFunction
      name: fetch_metadata
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_metadata_index>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_metadata_index_merge>} {($ Id.VSub_At '$@')})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_metadata_index_sanity>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {<join>} {<-t>} {(SQ <'|'>)} {<-o>} {<1.2> <Id.Lit_Comma ','> <2.2>} {<tINDEX.present>} 
                  {<tINDEX.new>}
                )
                (command.Simple
                  words: [{<fetch_make_patchlist>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<patchlist>})]
                )
              ]
              negated: F
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {<Id.Lit_LBracket '['>} {<-s>} {<patchlist>} {<Id.Lit_RBracket ']'>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ <'Fetching '> 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Pipeline
                                    children: [
                                      (command.Simple
                                        words: [{<wc>} {<-l>}]
                                        redirects: [
                                          (redir.Redir
                                            op: <Id.Redir_Less '<'>
                                            fd: -1
                                            arg_word: {<patchlist>}
                                          )
                                        ]
                                      )
                                      (C {<tr>} {<-d>} {(SQ <' '>)})
                                    ]
                                    negated: F
                                  )
                                ]
                              )
                          ) <' '>
                        )
                      }
                    )
                    (C {<echo>} {(${ Id.VSub_Name NDEBUG)} 
                      {(DQ <'metadata patches.'> (${ Id.VSub_Name DDSTATS))}
                    )
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{<tr>} {(SQ <'|'>)} {(SQ <->)}]
                          redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<patchlist>})]
                        )
                        (C {<lam>} {<-s>} {(DQ (${ Id.VSub_Name FETCHDIR) </tp/>)} {<->} {<-s>} {(DQ <.gz>)})
                        (command.Simple
                          words: [
                            {<xargs>}
                            {(${ Id.VSub_Name XARGST)}
                            {(${ Id.VSub_Name PHTTPGET)}
                            {(${ Id.VSub_Name SERVERNAME)}
                          ]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '2>'>
                              fd: 2
                              arg_word: {(${ Id.VSub_Name STATSREDIR)}
                            )
                          ]
                        )
                        (C {<fetch_progress>})
                      ]
                      negated: F
                    )
                    (C {<echo>} {(DQ <done.>)})
                    (C {<echo>} {<-n>} {(DQ <'Applying metadata patches... '>)})
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{<tr>} {(SQ <'|'>)} {(SQ <' '>)}]
                          redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<patchlist>})]
                        )
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: [
                            (command.Sentence
                              child: (C {<read>} {<X>} {<Y>})
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          body: 
                            (command.DoGroup
                              children: [
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                                              {(DQ (${ Id.VSub_Name X) <-> (${ Id.VSub_Name Y) <.gz>)} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (command.Sentence
                                          child: 
                                            (command.ControlFlow
                                              token: <Id.ControlFlow_Continue continue>
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      spids: [8603 8625]
                                    )
                                  ]
                                )
                                (command.Simple
                                  words: [{<gunzip>} {<-c>}]
                                  redirects: [
                                    (redir.Redir
                                      op: <Id.Redir_Less '<'>
                                      fd: -1
                                      arg_word: {(${ Id.VSub_Name X) <-> (${ Id.VSub_Name Y) <.gz>}
                                    )
                                    (redir.Redir
                                      op: <Id.Redir_Great '>'>
                                      fd: -1
                                      arg_word: {<diff>}
                                    )
                                  ]
                                )
                                (command.Simple
                                  words: [{<gunzip>} {<-c>}]
                                  redirects: [
                                    (redir.Redir
                                      op: <Id.Redir_Less '<'>
                                      fd: -1
                                      arg_word: {<files/> (${ Id.VSub_Name X) <.gz>}
                                    )
                                    (redir.Redir
                                      op: <Id.Redir_Great '>'>
                                      fd: -1
                                      arg_word: {<diff-OLD>}
                                    )
                                  ]
                                )
                                (command.Pipeline
                                  children: [
                                    (C {<grep>} {<-E>} {(SQ <'^-'>)} {<diff>})
                                    (C {<cut>} {<-c>} {<2->})
                                    (command.WhileUntil
                                      keyword: <Id.KW_While while>
                                      cond: [
                                        (command.Sentence
                                          child: (C {<read>} {<PREFIX>})
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      body: 
                                        (command.DoGroup
                                          children: [
                                            (C {<look>} {(DQ (${ Id.VSub_Name PREFIX))} {<diff-OLD>})
                                          ]
                                        )
                                    )
                                    (command.Simple
                                      words: [{<sort>}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Id.Redir_Great '>'>
                                          fd: -1
                                          arg_word: {<diff-rm>}
                                        )
                                      ]
                                    )
                                  ]
                                  negated: F
                                )
                                (command.Pipeline
                                  children: [
                                    (C {<grep>} {<-E>} {(SQ <'^\\+'>)} {<diff>})
                                    (command.Simple
                                      words: [{<cut>} {<-c>} {<2->}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Id.Redir_Great '>'>
                                          fd: -1
                                          arg_word: {<diff-add>}
                                        )
                                      ]
                                    )
                                  ]
                                  negated: F
                                )
                                (command.Pipeline
                                  children: [
                                    (C {<comm>} {<-23>} {<diff-OLD>} {<diff-rm>})
                                    (command.Simple
                                      words: [{<sort>} {<->} {<diff-add>}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Id.Redir_Great '>'>
                                          fd: -1
                                          arg_word: {<diff-NEW>}
                                        )
                                      ]
                                    )
                                  ]
                                  negated: F
                                )
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} 
                                              {
                                                (command_sub
                                                  left_token: <Id.Left_Backtick '`'>
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(${ Id.VSub_Name SHA256)} {<-q>} 
                                                          {<diff-NEW>}
                                                        )
                                                      ]
                                                    )
                                                )
                                              } {<Id.Lit_Equals '='>} {(${ Id.VSub_Name Y)} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (C {<mv>} {<diff-NEW>} {<files/> (${ Id.VSub_Name Y)})
                                        (C {<gzip>} {<-n>} {<files/> (${ Id.VSub_Name Y)})
                                      ]
                                      spids: [8782 8807]
                                    )
                                  ]
                                  else_action: [(C {<mv>} {<diff-NEW>} {(${ Id.VSub_Name Y) <.bad>})]
                                )
                                (C {<rm>} {<-f>} {(${ Id.VSub_Name X) <-> (${ Id.VSub_Name Y) <.gz>} 
                                  {<diff>}
                                )
                                (C {<rm>} {<-f>} {<diff-OLD>} {<diff-NEW>} {<diff-add>} {<diff-rm>})
                              ]
                            )
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '2>'>
                              fd: 2
                              arg_word: {(${ Id.VSub_Name QUIETREDIR)}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (C {<echo>} {(DQ <done.>)})
                  ]
                  spids: [8425 8436]
                )
              ]
            )
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<cut>} {<-f>} {<2>} {<-d>} {(SQ <'|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<tINDEX.new>})]
                )
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: [(command.Sentence child:(C {<read>} {<Y>}) terminator:<Id.Op_Semi _>)]
                  body: 
                    (command.DoGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                                      {(DQ <files/> (${ Id.VSub_Name Y) <.gz>)} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [
                                (command.Sentence
                                  child: (C {<echo>} {(${ Id.VSub_Name Y)})
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              spids: [8927 8946]
                            )
                          ]
                        )
                      ]
                    )
                )
                (command.Simple
                  words: [{<sort>} {<-u>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<filelist>})]
                )
              ]
              negated: F
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {<Id.Lit_LBracket '['>} {<-s>} {<filelist>} {<Id.Lit_RBracket ']'>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ <'Fetching '> 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Pipeline
                                    children: [
                                      (command.Simple
                                        words: [{<wc>} {<-l>}]
                                        redirects: [
                                          (redir.Redir
                                            op: <Id.Redir_Less '<'>
                                            fd: -1
                                            arg_word: {<filelist>}
                                          )
                                        ]
                                      )
                                      (C {<tr>} {<-d>} {(SQ <' '>)})
                                    ]
                                    negated: F
                                  )
                                ]
                              )
                          ) <' '>
                        )
                      }
                    )
                    (C {<echo>} {(${ Id.VSub_Name NDEBUG)} {(DQ <'metadata files... '>)})
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [
                            {<lam>}
                            {<-s>}
                            {(DQ (${ Id.VSub_Name FETCHDIR) </m/>)}
                            {<->}
                            {<-s>}
                            {(DQ <.gz>)}
                          ]
                          redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<filelist>})]
                        )
                        (command.Simple
                          words: [
                            {<xargs>}
                            {(${ Id.VSub_Name XARGST)}
                            {(${ Id.VSub_Name PHTTPGET)}
                            {(${ Id.VSub_Name SERVERNAME)}
                          ]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '2>'>
                              fd: 2
                              arg_word: {(${ Id.VSub_Name QUIETREDIR)}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [(command.Sentence child:(C {<read>} {<Y>}) terminator:<Id.Op_Semi _>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {<Id.Lit_LBracket '['>} {<-f>} 
                                              {(${ Id.VSub_Name Y) <.gz>} {<Id.Lit_RBracket ']'>}
                                            )
                                          ]
                                          negated: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (C {<echo>} {(DQ <failed.>)})
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<1>}
                                    )
                                  ]
                                  spids: [9090 9106]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} 
                                          {
                                            (command_sub
                                              left_token: <Id.Left_Backtick '`'>
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (command.Pipeline
                                                      children: [
                                                        (command.Simple
                                                          words: [{<gunzip>} {<-c>}]
                                                          redirects: [
                                                            (redir.Redir
                                                              op: <Id.Redir_Less '<'>
                                                              fd: -1
                                                              arg_word: {(${ Id.VSub_Name Y) <.gz>}
                                                            )
                                                          ]
                                                        )
                                                        (C {(${ Id.VSub_Name SHA256)} {<-q>})
                                                      ]
                                                      negated: F
                                                    )
                                                  ]
                                                )
                                            )
                                          } {<Id.Lit_Equals '='>} {(${ Id.VSub_Name Y)} {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (C {<mv>} {(${ Id.VSub_Name Y) <.gz>} 
                                      {<files/> (${ Id.VSub_Name Y) <.gz>}
                                    )
                                  ]
                                  spids: [9124 9162]
                                )
                              ]
                              else_action: [
                                (C {<echo>} {(DQ <'metadata is corrupt.'>)})
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                            )
                          ]
                        )
                      redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<filelist>})]
                    )
                    (C {<echo>} {(DQ <done.>)})
                  ]
                  spids: [8975 8986]
                )
              ]
            )
            (command.Simple
              words: [{<cut>} {<-f>} {<2>} {<-d>} {(SQ <'|'>)} {<tINDEX.new>}]
              redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<filelist>})]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(command.Sentence child:(C {<read>} {<X>}) terminator:<Id.Op_Semi _>)]
              body: 
                (command.DoGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<fetch_metadata_sanity>} {(${ Id.VSub_Name X)})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                  ]
                )
              redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<filelist>})]
            )
            (command.Pipeline
              children: [
                (C {<cut>} {<-f>} {<2>} {<-d>} {(SQ <'|'>)} {<tINDEX.present>})
                (command.Simple
                  words: [{<sort>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<oldfiles>})]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (C {<cut>} {<-f>} {<2>} {<-d>} {(SQ <'|'>)} {<tINDEX.new>})
                (C {<sort>})
                (C {<comm>} {<-13>} {<->} {<oldfiles>})
                (C {<lam>} {<-s>} {(DQ <files/>)} {<->} {<-s>} {(DQ <.gz>)})
                (C {<xargs>} {<rm>} {<-f>})
              ]
              negated: F
            )
            (C {<rm>} {<patchlist>} {<filelist>} {<oldfiles>})
            (C {<rm>} {(${ Id.VSub_Name TINDEXHASH)})
            (C {<mv>} {<tINDEX.new>} {<tINDEX.present>})
            (C {<mv>} {<tag.new>} {<tag>})
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
        )
    )
    (command.ShFunction
      name: fetch_filter_metadata_components
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:METAHASH)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {<look>} {(DQ ($ Id.VSub_Number '$1') <'|'>)} {<tINDEX.present>})
                                  (C {<cut>} {<-f>} {<2>} {<-d>} {(SQ <'|'>)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [9410]
                )
              ]
            )
            (command.Simple
              words: [{<gunzip>} {<-c>}]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Less '<'>
                  fd: -1
                  arg_word: {<files/> (${ Id.VSub_Name METAHASH) <.gz>}
                )
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {($ Id.VSub_Number '$1') <.all>}
                )
              ]
            )
            (command.ForEach
              iter_name: C
              iter_words: [{(${ Id.VSub_Name COMPONENTS)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<look>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Pipeline
                                    children: [
                                      (C {<echo>} {(${ Id.VSub_Name C)})
                                      (C {<tr>} {(SQ </>)} {(SQ <'|'>)})
                                    ]
                                    negated: F
                                  )
                                ]
                              )
                          ) <'|'>
                        )
                      } {($ Id.VSub_Number '$1') <.all>}
                    )
                  ]
                )
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {($ Id.VSub_Number '$1')}
                )
              ]
            )
            (C {<rm>} {($ Id.VSub_Number '$1') <.all>})
          ]
        )
    )
    (command.ShFunction
      name: fetch_filter_metadata
      body: 
        (command.BraceGroup
          children: [
            (C {<fetch_filter_metadata_components>} {($ Id.VSub_Number '$1')})
            (command.Pipeline
              children: [
                (C {<cut>} {<-f>} {<3->} {<-d>} {(SQ <'|'>)} {($ Id.VSub_Number '$1')})
                (C {<sed>} {<-e>} {(SQ <'s,/|d|,|d|,'>)})
                (C {<sed>} {<-e>} {(SQ <'s,/|-|,|-|,'>)})
                (command.Simple
                  words: [{<sort>} {<-u>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1') <.tmp>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (command.ForEach
                  iter_name: X
                  iter_words: [{(${ Id.VSub_Name IGNOREPATHS)}]
                  do_arg_iter: F
                  body: 
                    (command.DoGroup
                      children: [
                        (C {<grep>} {<-E>} {(DQ <'^'> (${ Id.VSub_Name X))} 
                          {($ Id.VSub_Number '$1') <.tmp>}
                        )
                      ]
                    )
                )
                (C {<sort>} {<-u>})
                (command.Simple
                  words: [{<comm>} {<-13>} {<->} {($ Id.VSub_Number '$1') <.tmp>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1')}
                    )
                  ]
                )
              ]
              negated: F
            )
            (C {<rm>} {($ Id.VSub_Number '$1') <.tmp>})
          ]
        )
    )
    (command.ShFunction
      name: fetch_filter_kernel_names
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<grep>} {<Id.Lit_Other '^'> </boot/> ($ Id.VSub_Number '$2')} 
                  {($ Id.VSub_Number '$1')}
                )
                (C {<sed>} {<-e>} 
                  {(DQ <'s,/boot/'> ($ Id.VSub_Number '$2') <','> (${ Id.VSub_Name KERNELDIR) <',g'>)}
                )
                (command.Simple
                  words: [{<sort>} {<->} {($ Id.VSub_Number '$1')}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1') <.tmp>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (C {<mv>} {($ Id.VSub_Number '$1') <.tmp>} {($ Id.VSub_Number '$1')})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-d>} {</boot/> ($ Id.VSub_Number '$2')} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [
                        {<grep>}
                        {<-v>}
                        {<Id.Lit_Other '^'> </boot/> ($ Id.VSub_Number '$2')}
                        {($ Id.VSub_Number '$1')}
                      ]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {($ Id.VSub_Number '$1') <.tmp>}
                        )
                      ]
                    )
                    (C {<mv>} {($ Id.VSub_Number '$1') <.tmp>} {($ Id.VSub_Number '$1')})
                  ]
                  spids: [9770 9784]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_inspect_system
      body: 
        (command.BraceGroup
          children: [
            (C {<rm>} {<-f>} {<.err>})
            (C {<echo>} {<-n>} {(DQ <'Inspecting system... '>)})
            (command.Pipeline
              children: [
                (C {<cat>} {($ Id.VSub_Number '$1')} {($ Id.VSub_Number '$3')})
                (C {<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)})
                (command.Simple
                  words: [{<sort>} {<-u>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<filelist>})]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: [(command.Sentence child:(C {<read>} {<F>}) terminator:<Id.Op_Semi _>)]
                  body: 
                    (command.DoGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (C {<Id.Lit_LBracket '['>} {<-e>} 
                                          {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F)} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                      negated: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [
                                (C {<echo>} {(DQ (${ Id.VSub_Name F) <'|-||||||'>)})
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Continue continue>
                                )
                              ]
                              spids: [9920 9939]
                            )
                          ]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (C {<Id.Lit_LBracket '['>} {<-r>} 
                                          {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F)} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                      negated: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [
                                (command.Simple
                                  words: [
                                    {<echo>}
                                    {
                                      (DQ <'Cannot read file: '> (${ Id.VSub_Name BASEDIR) </> 
                                        (${ Id.VSub_Name F)
                                      )
                                    }
                                  ]
                                  redirects: [
                                    (redir.Redir
                                      op: <Id.Redir_Great '>'>
                                      fd: -1
                                      arg_word: {</dev/stderr>}
                                    )
                                  ]
                                )
                                (C {<touch>} {<.err>})
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                              spids: [9958 9977]
                            )
                          ]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-L>} 
                                      {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F)} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [
                                (C {<echo>} {<-n>} {(DQ (${ Id.VSub_Name F) <'|L|'>)})
                                (command.Sentence
                                  child: 
                                    (C {<stat>} {<-n>} {<-f>} {(SQ <'%d-%i|%u|%g|%Mp%Lp|%Of|'>)} 
                                      {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F)}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                                (command.Sentence
                                  child: 
                                    (C {<readlink>} {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F)})
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              spids: [10017 10034]
                            )
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-f>} 
                                      {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F)} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [
                                (C {<echo>} {<-n>} {(DQ (${ Id.VSub_Name F) <'|f|'>)})
                                (command.Sentence
                                  child: 
                                    (C {<stat>} {<-n>} {<-f>} {(SQ <'%d-%i|%u|%g|%Mp%Lp|%Of|'>)} 
                                      {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F)}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                                (command.Sentence
                                  child: 
                                    (C {<sha256>} {<-q>} 
                                      {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F)}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              spids: [10081 10098]
                            )
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-d>} 
                                      {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F)} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [
                                (C {<echo>} {<-n>} {(DQ (${ Id.VSub_Name F) <'|d|'>)})
                                (command.Sentence
                                  child: 
                                    (C {<stat>} {<-f>} {(SQ <'%d-%i|%u|%g|%Mp%Lp|%Of|'>)} 
                                      {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F)}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              spids: [10147 10164]
                            )
                          ]
                          else_action: [
                            (command.Simple
                              words: [
                                {<echo>}
                                {
                                  (DQ <'Unknown file type: '> (${ Id.VSub_Name BASEDIR) </> 
                                    (${ Id.VSub_Name F)
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: <Id.Redir_Great '>'>
                                  fd: -1
                                  arg_word: {</dev/stderr>}
                                )
                              ]
                            )
                            (C {<touch>} {<.err>})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                        )
                      ]
                    )
                  redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<filelist>})]
                )
                (command.Simple
                  words: [{<sort>} {<-k>} {<3> <Id.Lit_Comma ','> <3>} {<-t>} {(SQ <'|'>)}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$2') <.tmp>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (C {<rm>} {<filelist>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {<Id.Lit_LBracket '['>} {<-f>} {<.err>} {<Id.Lit_RBracket ']'>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [10271 10282]
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {<cut>} {<-f>} {<1> <Id.Lit_Comma ','> <3>} {<-d>} {(SQ <'|'>)} 
                  {($ Id.VSub_Number '$2') <.tmp>}
                )
                (C {<sort>} {<-k>} {<1> <Id.Lit_Comma ','> <1>} {<-t>} {(SQ <'|'>)})
                (C {<sort>} {<-s>} {<-u>} {<-k>} {<2> <Id.Lit_Comma ','> <2>} {<-t>} {(SQ <'|'>)})
                (C {<join>} {<-1>} {<2>} {<-2>} {<3>} {<-t>} {(SQ <'|'>)} {<->} 
                  {($ Id.VSub_Number '$2') <.tmp>}
                )
                (C {<awk>} {<-F>} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\|'>)} {<-v>} 
                  {<Id.Lit_VarLike 'OFS='> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\|'>)} 
                  {
                    (SQ <'{\n'> <'\t\t    if (($2 == $3) || ($4 == "-"))\n'> 
                      <'\t\t\tprint $3,$4,$5,$6,$7,$8,$9,""\n'> <'\t\t    else\n'> <'\t\t\tprint $3,$4,$5,$6,$7,$8,$9,$2\n'> <'\t\t}'>
                    )
                  }
                )
                (command.Simple
                  words: [{<sort>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$2')}
                    )
                  ]
                )
              ]
              negated: F
            )
            (C {<rm>} {($ Id.VSub_Number '$2') <.tmp>})
            (C {<echo>} {(DQ <done.>)})
          ]
        )
    )
    (command.ShFunction
      name: fetch_filter_mergechanges
      body: 
        (command.BraceGroup
          children: [
            (command.ForEach
              iter_name: F
              iter_words: [{($ Id.VSub_Number '$1')} {($ Id.VSub_Number '$2')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.Pipeline
                      children: [
                        (command.ForEach
                          iter_name: X
                          iter_words: [{(${ Id.VSub_Name MERGECHANGES)}]
                          do_arg_iter: F
                          body: 
                            (command.DoGroup
                              children: [
                                (C {<grep>} {<-E>} {(DQ <'^'> (${ Id.VSub_Name X))} {(${ Id.VSub_Name F)})
                              ]
                            )
                        )
                        (C {<cut>} {<-f>} {<1> <Id.Lit_Comma ','> <2> <Id.Lit_Comma ','> <7>} {<-d>} 
                          {(SQ <'|'>)}
                        )
                        (command.Simple
                          words: [{<sort>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {(${ Id.VSub_Name F) <-values>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                  ]
                )
            )
            (command.Pipeline
              children: [
                (C {<comm>} {<-13>} {($ Id.VSub_Number '$1') <-values>} 
                  {($ Id.VSub_Number '$2') <-values>}
                )
                (C {<fgrep>} {(SQ <'|f|'>)})
                (command.Simple
                  words: [{<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$2') <-paths>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(command.Sentence child:(C {<read>} {<X>}) terminator:<Id.Op_Semi _>)]
              body: 
                (command.DoGroup
                  children: [
                    (command.Pipeline
                      children: [
                        (C {<look>} {(DQ (${ Id.VSub_Name X) <'|'>)} {($ Id.VSub_Number '$1') <-values>})
                        (C {<head>} {<-1>})
                      ]
                      negated: F
                    )
                  ]
                )
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Less '<'>
                  fd: -1
                  arg_word: {($ Id.VSub_Number '$2') <-paths>}
                )
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {($ Id.VSub_Number '$3')}
                )
              ]
            )
            (C {<rm>} {($ Id.VSub_Number '$1') <-values>} {($ Id.VSub_Number '$2') <-values>} 
              {($ Id.VSub_Number '$2') <-paths>}
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_filter_unmodified_notpresent
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (command.ForEach
                  iter_name: X
                  iter_words: [{(${ Id.VSub_Name UPDATEIFUNMODIFIED)}]
                  do_arg_iter: F
                  body: 
                    (command.DoGroup
                      children: [
                        (C {<grep>} {<-E>} {(DQ <'^'> (${ Id.VSub_Name X))} {($ Id.VSub_Number '$1')})
                        (C {<grep>} {<-E>} {(DQ <'^'> (${ Id.VSub_Name X))} {($ Id.VSub_Number '$3')})
                      ]
                    )
                )
                (C {<cut>} {<-f>} {<1> <Id.Lit_Comma ','> <2> <Id.Lit_Comma ','> <7>} {<-d>} {(SQ <'|'>)})
                (command.Simple
                  words: [{<sort>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1') <-values>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (command.ForEach
                  iter_name: X
                  iter_words: [{(${ Id.VSub_Name UPDATEIFUNMODIFIED)}]
                  do_arg_iter: F
                  body: 
                    (command.DoGroup
                      children: [
                        (C {<grep>} {<-E>} {(DQ <'^'> (${ Id.VSub_Name X))} {($ Id.VSub_Number '$2')})
                      ]
                    )
                )
                (C {<cut>} {<-f>} {<1> <Id.Lit_Comma ','> <2> <Id.Lit_Comma ','> <7>} {<-d>} {(SQ <'|'>)})
                (command.Simple
                  words: [{<sort>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$2') <-values>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (C {<comm>} {<-13>} {($ Id.VSub_Number '$1') <-values>} 
                  {($ Id.VSub_Number '$2') <-values>}
                )
                (command.Simple
                  words: [{<sort>} {<-t>} {(SQ <'|'>)} {<-k>} {<1> <Id.Lit_Comma ','> <1>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<mlines.tmp>})]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (C {<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)} {($ Id.VSub_Number '$4')})
                (C {<sort>})
                (C {<join>} {<-v>} {<2>} {<-t>} {(SQ <'|'>)} {<->} {<mlines.tmp>})
                (command.Simple
                  words: [{<sort>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<mlines>})]
                )
              ]
              negated: F
            )
            (C {<rm>} {($ Id.VSub_Number '$1') <-values>} {($ Id.VSub_Number '$2') <-values>} 
              {<mlines.tmp>}
            )
            (command.Pipeline
              children: [
                (C {<comm>} {<-13>} {($ Id.VSub_Number '$1')} {($ Id.VSub_Number '$2')})
                (C {<cut>} {<-f>} {<1> <Id.Lit_Comma ','> <2> <Id.Lit_Comma ','> <7>} {<-d>} {(SQ <'|'>)})
                (command.Simple
                  words: [{<fgrep>} {(SQ <'|-|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_DGreat '>>'> fd:-1 arg_word:{<mlines>})]
                )
              ]
              negated: F
            )
            (command.ForEach
              iter_name: X
              iter_words: [{($ Id.VSub_Number '$1')} {($ Id.VSub_Number '$2')} {($ Id.VSub_Number '$3')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.Simple
                      words: [
                        {<sort>}
                        {<-t>}
                        {(SQ <'|'>)}
                        {<-k>}
                        {<1> <Id.Lit_Comma ','> <1>}
                        {(${ Id.VSub_Name X)}
                      ]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {(${ Id.VSub_Name X) <.tmp>}
                        )
                      ]
                    )
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)}]
                          redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<mlines>})]
                        )
                        (C {<sort>})
                        (C {<join>} {<-v>} {<2>} {<-t>} {(SQ <'|'>)} {<->} {(${ Id.VSub_Name X) <.tmp>})
                        (command.Simple
                          words: [{<sort>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {(${ Id.VSub_Name X)}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (C {<rm>} {(${ Id.VSub_Name X) <.tmp>})
                  ]
                )
            )
            (command.Pipeline
              children: [
                (C {<fgrep>} {<-v>} {(SQ <'|-|'>)} {<mlines>})
                (command.Simple
                  words: [{<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<modifiedfiles>})]
                )
              ]
              negated: F
            )
            (C {<rm>} {<mlines>})
          ]
        )
    )
    (command.ShFunction
      name: fetch_filter_allowadd
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<cut>} {<-f>} {<1> <Id.Lit_Comma ','> <2>} {<-d>} {(SQ <'|'>)}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Less '<'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1')}
                    )
                  ]
                )
                (C {<fgrep>} {(SQ <'|-'>)})
                (command.Simple
                  words: [{<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<filesnotpresent>})]
                )
              ]
              negated: F
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name ALLOWADD)} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <yes>)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{<sort>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Less '<'>
                              fd: -1
                              arg_word: {($ Id.VSub_Number '$2')}
                            )
                          ]
                        )
                        (C {<join>} {<-v>} {<1>} {<-t>} {(SQ <'|'>)} {<->} {<filesnotpresent>})
                        (command.Simple
                          words: [{<sort>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {($ Id.VSub_Number '$2') <.tmp>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (C {<mv>} {($ Id.VSub_Number '$2') <.tmp>} {($ Id.VSub_Number '$2')})
                  ]
                  spids: [11226 11244]
                )
              ]
            )
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<sort>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Less '<'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1')}
                    )
                  ]
                )
                (C {<join>} {<-v>} {<1>} {<-t>} {(SQ <'|'>)} {<->} {<filesnotpresent>})
                (command.Simple
                  words: [{<sort>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1') <.tmp>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (C {<mv>} {($ Id.VSub_Number '$1') <.tmp>} {($ Id.VSub_Number '$1')})
            (C {<rm>} {<filesnotpresent>})
          ]
        )
    )
    (command.ShFunction
      name: fetch_filter_allowdelete
      body: 
        (command.BraceGroup
          children: [
            (command.ForEach
              iter_name: X
              iter_words: [{($ Id.VSub_Number '$1')} {($ Id.VSub_Number '$2')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{<cut>} {<-f>} {<1-2>} {<-d>} {(SQ <'|'>)}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Less '<'>
                              fd: -1
                              arg_word: {(${ Id.VSub_Name X)}
                            )
                          ]
                        )
                        (command.Simple
                          words: [{<sort>} {<-u>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {(${ Id.VSub_Name X) <.nodes>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                  ]
                )
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name ALLOWDELETE)} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <yes>)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [
                        {<comm>}
                        {<-23>}
                        {($ Id.VSub_Number '$1') <.nodes>}
                        {($ Id.VSub_Number '$2') <.nodes>}
                      ]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {($ Id.VSub_Number '$1') <.badnodes>}
                        )
                      ]
                    )
                  ]
                  spids: [11419 11437]
                )
              ]
              else_action: [
                (command.Simple
                  words: [{<Id.Lit_Other ':'>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1') <.badnodes>}
                    )
                  ]
                )
              ]
            )
            (command.Pipeline
              children: [
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: [(command.Sentence child:(C {<read>} {<X>}) terminator:<Id.Op_Semi _>)]
                  body: 
                    (command.DoGroup
                      children: [
                        (C {<look>} {(DQ (${ Id.VSub_Name X) <'|'>)} {($ Id.VSub_Number '$1')})
                      ]
                    )
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Less '<'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1') <.badnodes>}
                    )
                  ]
                )
                (command.Simple
                  words: [{<comm>} {<-13>} {<->} {($ Id.VSub_Number '$1')}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1') <.tmp>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (C {<mv>} {($ Id.VSub_Number '$1') <.tmp>} {($ Id.VSub_Number '$1')})
            (C {<rm>} {($ Id.VSub_Number '$1') <.badnodes>} {($ Id.VSub_Number '$1') <.nodes>} 
              {($ Id.VSub_Number '$2') <.nodes>}
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_filter_modified_metadata
      body: 
        (command.BraceGroup
          children: [
            (command.ForEach
              iter_name: X
              iter_words: [{($ Id.VSub_Number '$1')} {($ Id.VSub_Number '$2')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.Simple
                      words: [{<cut>} {<-f>} {<1-6>} {<-d>} {(SQ <'|'>)}]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {(${ Id.VSub_Name X)}
                        )
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {(${ Id.VSub_Name X) <.metadata>}
                        )
                      ]
                    )
                  ]
                )
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name KEEPMODIFIEDMETADATA)} 
                          {<Id.Lit_Equals '='>} {(DQ <yes>)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [
                        {<comm>}
                        {<-13>}
                        {($ Id.VSub_Number '$1') <.metadata>}
                        {($ Id.VSub_Number '$2') <.metadata>}
                      ]
                      redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<keepmeta>})]
                    )
                  ]
                  spids: [11613 11630]
                )
              ]
              else_action: [
                (command.Simple
                  words: [{<Id.Lit_Other ':'>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<keepmeta>})]
                )
              ]
            )
            (command.Simple
              words: [{<Id.Lit_Other ':'>}]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {($ Id.VSub_Number '$3') <.remove>}
                )
              ]
            )
            (command.Simple
              words: [{<Id.Lit_Other ':'>}]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {($ Id.VSub_Number '$3') <.add>}
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(command.Sentence child:(C {<read>} {<LINE>}) terminator:<Id.Op_Semi _>)]
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NODE)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {<echo>} {(DQ (${ Id.VSub_Name LINE))})
                                          (C {<cut>} {<-f>} {<1-2>} {<-d>} {(SQ <'|'>)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [11696]
                        )
                      ]
                    )
                    (command.Simple
                      words: [{<look>} {(DQ (${ Id.VSub_Name NODE) <'|'>)} {($ Id.VSub_Number '$3')}]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_DGreat '>>'>
                          fd: -1
                          arg_word: {($ Id.VSub_Number '$3') <.remove>}
                        )
                      ]
                    )
                    (command.Pipeline
                      children: [
                        (C {<look>} {(DQ (${ Id.VSub_Name NODE) <'|'>)} {($ Id.VSub_Number '$3')})
                        (C {<cut>} {<-f>} {<7->} {<-d>} {(SQ <'|'>)})
                        (command.Simple
                          words: [{<lam>} {<-s>} {(DQ (${ Id.VSub_Name LINE) <'|'>)} {<->}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_DGreat '>>'>
                              fd: -1
                              arg_word: {($ Id.VSub_Number '$3') <.add>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                  ]
                )
              redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<keepmeta>})]
            )
            (command.Pipeline
              children: [
                (C {<sort>} {($ Id.VSub_Number '$3') <.remove>})
                (C {<comm>} {<-13>} {<->} {($ Id.VSub_Number '$3')})
                (command.Simple
                  words: [{<sort>} {<-u>} {<->} {($ Id.VSub_Number '$3') <.add>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$3') <.tmp>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (C {<mv>} {($ Id.VSub_Number '$3') <.tmp>} {($ Id.VSub_Number '$3')})
            (C {<rm>} {<keepmeta>} {($ Id.VSub_Number '$1') <.metadata>} 
              {($ Id.VSub_Number '$2') <.metadata>} {($ Id.VSub_Number '$3') <.add>} {($ Id.VSub_Number '$3') <.remove>}
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_filter_uptodate
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{<comm>} {<-23>} {($ Id.VSub_Number '$1')} {($ Id.VSub_Number '$2')}]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {($ Id.VSub_Number '$1') <.tmp>}
                )
              ]
            )
            (command.Simple
              words: [{<comm>} {<-13>} {($ Id.VSub_Number '$1')} {($ Id.VSub_Number '$2')}]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {($ Id.VSub_Number '$2') <.tmp>}
                )
              ]
            )
            (C {<mv>} {($ Id.VSub_Number '$1') <.tmp>} {($ Id.VSub_Number '$1')})
            (C {<mv>} {($ Id.VSub_Number '$2') <.tmp>} {($ Id.VSub_Number '$2')})
          ]
        )
    )
    (command.ShFunction
      name: fetch_files_premerge
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-s>} {($ Id.VSub_Number '$1')} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {(DQ <'Fetching files from '> (${ Id.VSub_Name OLDRELNUM) <' for merging... '>)}
                    )
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{<fgrep>} {(SQ <'|f|'>)}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Less '<'>
                              fd: -1
                              arg_word: {($ Id.VSub_Number '$1')}
                            )
                          ]
                        )
                        (C {<cut>} {<-f>} {<3>} {<-d>} {(SQ <'|'>)})
                        (command.Simple
                          words: [{<sort>} {<-u>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {<files.wanted>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [(command.Sentence child:(C {<read>} {<Y>}) terminator:<Id.Op_Semi _>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                                          {(DQ <files/> (${ Id.VSub_Name Y) <.gz>)} {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.Sentence
                                      child: (C {<echo>} {(${ Id.VSub_Name Y)})
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  spids: [12027 12046]
                                )
                              ]
                            )
                          ]
                        )
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {<files.wanted>}
                        )
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {<filelist>}
                        )
                      ]
                    )
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [
                            {<lam>}
                            {<-s>}
                            {(DQ (${ Id.VSub_Name OLDFETCHDIR) </f/>)}
                            {<->}
                            {<-s>}
                            {(DQ <.gz>)}
                          ]
                          redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<filelist>})]
                        )
                        (command.Simple
                          words: [
                            {<xargs>}
                            {(${ Id.VSub_Name XARGST)}
                            {(${ Id.VSub_Name PHTTPGET)}
                            {(${ Id.VSub_Name SERVERNAME)}
                          ]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '2>'>
                              fd: 2
                              arg_word: {(${ Id.VSub_Name QUIETREDIR)}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [(command.Sentence child:(C {<read>} {<Y>}) terminator:<Id.Op_Semi _>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {<Id.Lit_LBracket '['>} {<-f>} 
                                              {(${ Id.VSub_Name Y) <.gz>} {<Id.Lit_RBracket ']'>}
                                            )
                                          ]
                                          negated: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (C {<echo>} {(DQ <failed.>)})
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<1>}
                                    )
                                  ]
                                  spids: [12139 12155]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} 
                                          {
                                            (command_sub
                                              left_token: <Id.Left_Backtick '`'>
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (command.Pipeline
                                                      children: [
                                                        (command.Simple
                                                          words: [{<gunzip>} {<-c>}]
                                                          redirects: [
                                                            (redir.Redir
                                                              op: <Id.Redir_Less '<'>
                                                              fd: -1
                                                              arg_word: {(${ Id.VSub_Name Y) <.gz>}
                                                            )
                                                          ]
                                                        )
                                                        (C {(${ Id.VSub_Name SHA256)} {<-q>})
                                                      ]
                                                      negated: F
                                                    )
                                                  ]
                                                )
                                            )
                                          } {<Id.Lit_Equals '='>} {(${ Id.VSub_Name Y)} {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (C {<mv>} {(${ Id.VSub_Name Y) <.gz>} 
                                      {<files/> (${ Id.VSub_Name Y) <.gz>}
                                    )
                                  ]
                                  spids: [12173 12211]
                                )
                              ]
                              else_action: [
                                (C {<echo>} {(DQ (${ Id.VSub_Name Y) <' has incorrect hash.'>)})
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                            )
                          ]
                        )
                      redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<filelist>})]
                    )
                    (C {<echo>} {(DQ <done.>)})
                    (C {<rm>} {<filelist>} {<files.wanted>})
                  ]
                  spids: [11939 11950]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_files_prepare
      body: 
        (command.BraceGroup
          children: [
            (C {<echo>} {<-n>} {(DQ <'Preparing to download files... '>)})
            (command.ForEach
              iter_name: X
              iter_words: [{($ Id.VSub_Number '$1')} {($ Id.VSub_Number '$2')} {($ Id.VSub_Number '$3')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [
                            {<cut>}
                            {<-f>}
                            {<1> <Id.Lit_Comma ','> <2> <Id.Lit_Comma ','> <7>}
                            {<-d>}
                            {(SQ <'|'>)}
                          ]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Less '<'>
                              fd: -1
                              arg_word: {(${ Id.VSub_Name X)}
                            )
                          ]
                        )
                        (C {<fgrep>} {(SQ <'|f|'>)})
                        (C {<cut>} {<-f>} {<1> <Id.Lit_Comma ','> <3>} {<-d>} {(SQ <'|'>)})
                        (command.Simple
                          words: [{<sort>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {(${ Id.VSub_Name X) <.hashes>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                  ]
                )
            )
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<cut>} {<-f>} {<2>} {<-d>} {(SQ <'|'>)}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Less '<'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$3') <.hashes>}
                    )
                  ]
                )
                (C {<sort>} {<-u>})
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: [(command.Sentence child:(C {<read>} {<HASH>}) terminator:<Id.Op_Semi _>)]
                  body: 
                    (command.DoGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (C {<Id.Lit_LBracket '['>} {<-f>} 
                                          {<files/> (${ Id.VSub_Name HASH) <.gz>} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                      negated: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [(C {<echo>} {(${ Id.VSub_Name HASH)})]
                              spids: [12437 12454]
                            )
                          ]
                        )
                      ]
                    )
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<files.wanted>})]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (C {<comm>} {<-12>} {($ Id.VSub_Number '$1') <.hashes>} 
                  {($ Id.VSub_Number '$2') <.hashes>}
                )
                (command.Simple
                  words: [{<sort>} {<-k>} {<1> <Id.Lit_Comma ','> <1>} {<-t>} {(SQ <'|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<unmodified.files>})]
                )
              ]
              negated: F
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(command.Sentence child:(C {<read>} {<LINE>}) terminator:<Id.Op_Semi _>)]
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:F)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {<echo>} {(DQ (${ Id.VSub_Name LINE))})
                                          (C {<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [12534]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:HASH)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {<echo>} {(DQ (${ Id.VSub_Name LINE))})
                                          (C {<cut>} {<-f>} {<2>} {<-d>} {(SQ <'|'>)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [12562]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-f>} 
                                  {<files/> (${ Id.VSub_Name HASH) <.gz>} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [(command.ControlFlow token:<Id.ControlFlow_Continue continue>)]
                          spids: [12595 12610]
                        )
                      ]
                    )
                    (C {<cp>} {(DQ (${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F))} {<tmpfile>})
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} 
                                  {
                                    (command_sub
                                      left_token: <Id.Left_Backtick '`'>
                                      command_list: 
                                        (command.CommandList
                                          children: [(C {<sha256>} {<-q>} {<tmpfile>})]
                                        )
                                    )
                                  } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(${ Id.VSub_Name HASH)} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<echo>})
                            (C {<echo>} 
                              {
                                (DQ <'File changed while FreeBSD Update running: '> 
                                  (${ Id.VSub_Name F)
                                )
                              }
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [12639 12663]
                        )
                      ]
                    )
                    (command.Simple
                      words: [{<gzip>} {<-c>}]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {<tmpfile>}
                        )
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {<files/> (${ Id.VSub_Name HASH) <.gz>}
                        )
                      ]
                    )
                    (C {<rm>} {<tmpfile>})
                  ]
                )
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Less '<'>
                  fd: -1
                  arg_word: {($ Id.VSub_Number '$2') <.hashes>}
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {<sort>} {<-k>} {<1> <Id.Lit_Comma ','> <1>} {<-t>} {(SQ <'|'>)} 
                  {($ Id.VSub_Number '$3') <.hashes>}
                )
                (C {<join>} {<-t>} {(SQ <'|'>)} {<-o>} {<2.2> <Id.Lit_Comma ','> <1.2>} {<->} 
                  {<unmodified.files>}
                )
                (command.Simple
                  words: [{<fetch_make_patchlist>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<patchlist>})]
                )
              ]
              negated: F
            )
            (C {<rm>} {<unmodified.files>} {($ Id.VSub_Number '$1') <.hashes>} 
              {($ Id.VSub_Number '$2') <.hashes>} {($ Id.VSub_Number '$3') <.hashes>}
            )
            (C {<rm>} {($ Id.VSub_Number '$1')})
            (C {<echo>} {(DQ <done.>)})
          ]
        )
    )
    (command.ShFunction
      name: fetch_files
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {<Id.Lit_LBracket '['>} {<-s>} {<patchlist>} {<Id.Lit_RBracket ']'>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ <'Fetching '> 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Pipeline
                                    children: [
                                      (command.Simple
                                        words: [{<wc>} {<-l>}]
                                        redirects: [
                                          (redir.Redir
                                            op: <Id.Redir_Less '<'>
                                            fd: -1
                                            arg_word: {<patchlist>}
                                          )
                                        ]
                                      )
                                      (C {<tr>} {<-d>} {(SQ <' '>)})
                                    ]
                                    negated: F
                                  )
                                ]
                              )
                          ) <' '>
                        )
                      }
                    )
                    (C {<echo>} {(${ Id.VSub_Name NDEBUG)} {(DQ <patches.> (${ Id.VSub_Name DDSTATS))})
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{<tr>} {(SQ <'|'>)} {(SQ <->)}]
                          redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<patchlist>})]
                        )
                        (C {<lam>} {<-s>} {(DQ (${ Id.VSub_Name PATCHDIR) </>)} {<->})
                        (command.Simple
                          words: [
                            {<xargs>}
                            {(${ Id.VSub_Name XARGST)}
                            {(${ Id.VSub_Name PHTTPGET)}
                            {(${ Id.VSub_Name SERVERNAME)}
                          ]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '2>'>
                              fd: 2
                              arg_word: {(${ Id.VSub_Name STATSREDIR)}
                            )
                          ]
                        )
                        (C {<fetch_progress>})
                      ]
                      negated: F
                    )
                    (C {<echo>} {(DQ <done.>)})
                    (C {<echo>} {<-n>} {(DQ <'Applying patches... '>)})
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{<tr>} {(SQ <'|'>)} {(SQ <' '>)}]
                          redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<patchlist>})]
                        )
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: [
                            (command.Sentence
                              child: (C {<read>} {<X>} {<Y>})
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          body: 
                            (command.DoGroup
                              children: [
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                                              {(DQ (${ Id.VSub_Name X) <-> (${ Id.VSub_Name Y))} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (command.Sentence
                                          child: 
                                            (command.ControlFlow
                                              token: <Id.ControlFlow_Continue continue>
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      spids: [13001 13022]
                                    )
                                  ]
                                )
                                (command.Simple
                                  words: [{<gunzip>} {<-c>}]
                                  redirects: [
                                    (redir.Redir
                                      op: <Id.Redir_Less '<'>
                                      fd: -1
                                      arg_word: {<files/> (${ Id.VSub_Name X) <.gz>}
                                    )
                                    (redir.Redir
                                      op: <Id.Redir_Great '>'>
                                      fd: -1
                                      arg_word: {<OLD>}
                                    )
                                  ]
                                )
                                (C {<bspatch>} {<OLD>} {<NEW>} 
                                  {(${ Id.VSub_Name X) <-> (${ Id.VSub_Name Y)}
                                )
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} 
                                              {
                                                (command_sub
                                                  left_token: <Id.Left_Backtick '`'>
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(${ Id.VSub_Name SHA256)} {<-q>} {<NEW>})
                                                      ]
                                                    )
                                                )
                                              } {<Id.Lit_Equals '='>} {(${ Id.VSub_Name Y)} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (C {<mv>} {<NEW>} {<files/> (${ Id.VSub_Name Y)})
                                        (C {<gzip>} {<-n>} {<files/> (${ Id.VSub_Name Y)})
                                      ]
                                      spids: [13064 13089]
                                    )
                                  ]
                                )
                                (C {<rm>} {<-f>} {<diff>} {<OLD>} {<NEW>} 
                                  {(${ Id.VSub_Name X) <-> (${ Id.VSub_Name Y)}
                                )
                              ]
                            )
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '2>'>
                              fd: 2
                              arg_word: {(${ Id.VSub_Name QUIETREDIR)}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (C {<echo>} {(DQ <done.>)})
                  ]
                  spids: [12833 12844]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(command.Sentence child:(C {<read>} {<Y>}) terminator:<Id.Op_Semi _>)]
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                                  {(DQ <files/> (${ Id.VSub_Name Y) <.gz>)} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.Sentence
                              child: (C {<echo>} {(${ Id.VSub_Name Y)})
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          spids: [13167 13186]
                        )
                      ]
                    )
                  ]
                )
              redirects: [
                (redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<files.wanted>})
                (redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<filelist>})
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {<Id.Lit_LBracket '['>} {<-s>} {<filelist>} {<Id.Lit_RBracket ']'>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ <'Fetching '> 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Pipeline
                                    children: [
                                      (command.Simple
                                        words: [{<wc>} {<-l>}]
                                        redirects: [
                                          (redir.Redir
                                            op: <Id.Redir_Less '<'>
                                            fd: -1
                                            arg_word: {<filelist>}
                                          )
                                        ]
                                      )
                                      (C {<tr>} {<-d>} {(SQ <' '>)})
                                    ]
                                    negated: F
                                  )
                                ]
                              )
                          ) <' '>
                        )
                      }
                    )
                    (C {<echo>} {(${ Id.VSub_Name NDEBUG)} {(DQ <'files... '>)})
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [
                            {<lam>}
                            {<-s>}
                            {(DQ (${ Id.VSub_Name FETCHDIR) </f/>)}
                            {<->}
                            {<-s>}
                            {(DQ <.gz>)}
                          ]
                          redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<filelist>})]
                        )
                        (command.Simple
                          words: [
                            {<xargs>}
                            {(${ Id.VSub_Name XARGST)}
                            {(${ Id.VSub_Name PHTTPGET)}
                            {(${ Id.VSub_Name SERVERNAME)}
                          ]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '2>'>
                              fd: 2
                              arg_word: {(${ Id.VSub_Name QUIETREDIR)}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [(command.Sentence child:(C {<read>} {<Y>}) terminator:<Id.Op_Semi _>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {<Id.Lit_LBracket '['>} {<-f>} 
                                              {(${ Id.VSub_Name Y) <.gz>} {<Id.Lit_RBracket ']'>}
                                            )
                                          ]
                                          negated: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (C {<echo>} {(DQ <failed.>)})
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<1>}
                                    )
                                  ]
                                  spids: [13327 13343]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} 
                                          {
                                            (command_sub
                                              left_token: <Id.Left_Backtick '`'>
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (command.Pipeline
                                                      children: [
                                                        (command.Simple
                                                          words: [{<gunzip>} {<-c>}]
                                                          redirects: [
                                                            (redir.Redir
                                                              op: <Id.Redir_Less '<'>
                                                              fd: -1
                                                              arg_word: {(${ Id.VSub_Name Y) <.gz>}
                                                            )
                                                          ]
                                                        )
                                                        (C {(${ Id.VSub_Name SHA256)} {<-q>})
                                                      ]
                                                      negated: F
                                                    )
                                                  ]
                                                )
                                            )
                                          } {<Id.Lit_Equals '='>} {(${ Id.VSub_Name Y)} {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (C {<mv>} {(${ Id.VSub_Name Y) <.gz>} 
                                      {<files/> (${ Id.VSub_Name Y) <.gz>}
                                    )
                                  ]
                                  spids: [13361 13399]
                                )
                              ]
                              else_action: [
                                (C {<echo>} {(DQ (${ Id.VSub_Name Y) <' has incorrect hash.'>)})
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                            )
                          ]
                        )
                      redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<filelist>})]
                    )
                    (C {<echo>} {(DQ <done.>)})
                  ]
                  spids: [13212 13223]
                )
              ]
            )
            (C {<rm>} {<files.wanted>} {<filelist>} {<patchlist>})
          ]
        )
    )
    (command.ShFunction
      name: fetch_create_manifest
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-L>} {(DQ (${ Id.VSub_Name BDHASH) <-install>)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<rm>} {<-r>} {(${ Id.VSub_Name BDHASH) <-install/>})
                    (C {<rm>} {(${ Id.VSub_Name BDHASH) <-install>})
                  ]
                  spids: [13488 13504]
                )
              ]
            )
            (command.Pipeline
              children: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-s>} {<modifiedfiles>} {<Id.Lit_RBracket ']'>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                      action: [
                        (C {<echo>})
                        (C {<echo>} {<-n>} {(DQ <'The following files are affected by updates, '>)})
                        (C {<echo>} {(DQ <'but no changes have'>)})
                        (C {<echo>} {<-n>} {(DQ <'been downloaded because the files have been '>)})
                        (C {<echo>} {(DQ <'modified locally:'>)})
                        (C {<cat>} {<modifiedfiles>})
                      ]
                      spids: [13533 13544]
                    )
                  ]
                )
                (C {($ Id.VSub_DollarName '$PAGER')})
              ]
              negated: F
            )
            (C {<rm>} {<modifiedfiles>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (command.Pipeline
                              children: [
                                (C {<Id.Lit_LBracket '['>} {<-s>} {<INDEX-PRESENT>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              ]
                              negated: T
                            )
                            (command.Pipeline
                              children: [
                                (C {<Id.Lit_LBracket '['>} {<-s>} {<INDEX-NEW>} {<Id.Lit_RBracket ']'>})
                              ]
                              negated: T
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<rm>} {<INDEX-PRESENT>} {<INDEX-NEW>})
                    (C {<echo>})
                    (C {<echo>} {<-n>} {(DQ <'No updates needed to update system to '>)})
                    (C {<echo>} {(DQ (${ Id.VSub_Name RELNUM) <-p> (${ Id.VSub_Name RELPATCHNUM) <.>)})
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [13604 13630]
                )
              ]
            )
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<INDEX-PRESENT>})]
                )
                (command.Simple
                  words: [{<sort>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {<INDEX-PRESENT.flist>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<INDEX-NEW>})]
                )
                (command.Simple
                  words: [{<sort>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-NEW.flist>})]
                )
              ]
              negated: F
            )
            (command.Simple
              words: [{<comm>} {<-23>} {<INDEX-PRESENT.flist>} {<INDEX-NEW.flist>}]
              redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<files.removed>})]
            )
            (command.Simple
              words: [{<comm>} {<-13>} {<INDEX-PRESENT.flist>} {<INDEX-NEW.flist>}]
              redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<files.added>})]
            )
            (command.Simple
              words: [{<comm>} {<-12>} {<INDEX-PRESENT.flist>} {<INDEX-NEW.flist>}]
              redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<files.updated>})]
            )
            (C {<rm>} {<INDEX-PRESENT.flist>} {<INDEX-NEW.flist>})
            (command.Pipeline
              children: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-s>} {<files.removed>} {<Id.Lit_RBracket ']'>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                      action: [
                        (C {<echo>})
                        (C {<echo>} {<-n>} {(DQ <'The following files will be removed '>)})
                        (C {<echo>} 
                          {
                            (DQ <'as part of updating to '> (${ Id.VSub_Name RELNUM) <-p> 
                              (${ Id.VSub_Name RELPATCHNUM) <':'>
                            )
                          }
                        )
                        (C {<cat>} {<files.removed>})
                      ]
                      spids: [13784 13795]
                    )
                  ]
                )
                (C {($ Id.VSub_DollarName '$PAGER')})
              ]
              negated: F
            )
            (C {<rm>} {<files.removed>})
            (command.Pipeline
              children: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-s>} {<files.added>} {<Id.Lit_RBracket ']'>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                      action: [
                        (C {<echo>})
                        (C {<echo>} {<-n>} {(DQ <'The following files will be added '>)})
                        (C {<echo>} 
                          {
                            (DQ <'as part of updating to '> (${ Id.VSub_Name RELNUM) <-p> 
                              (${ Id.VSub_Name RELPATCHNUM) <':'>
                            )
                          }
                        )
                        (C {<cat>} {<files.added>})
                      ]
                      spids: [13847 13858]
                    )
                  ]
                )
                (C {($ Id.VSub_DollarName '$PAGER')})
              ]
              negated: F
            )
            (C {<rm>} {<files.added>})
            (command.Pipeline
              children: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-s>} {<files.updated>} {<Id.Lit_RBracket ']'>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                      action: [
                        (C {<echo>})
                        (C {<echo>} {<-n>} {(DQ <'The following files will be updated '>)})
                        (C {<echo>} 
                          {
                            (DQ <'as part of updating to '> (${ Id.VSub_Name RELNUM) <-p> 
                              (${ Id.VSub_Name RELPATCHNUM) <':'>
                            )
                          }
                        )
                        (C {<cat>} {<files.updated>})
                      ]
                      spids: [13910 13921]
                    )
                  ]
                )
                (C {($ Id.VSub_DollarName '$PAGER')})
              ]
              negated: F
            )
            (C {<rm>} {<files.updated>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:MDIR)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<mktemp>} {<-d>} {<install.XXXXXX>})]
                              )
                          )
                        }
                      spids: [13974]
                    )
                  ]
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (C {<mv>} {<INDEX-PRESENT>} {(${ Id.VSub_Name MDIR) </INDEX-OLD>})
            (C {<mv>} {<INDEX-NEW>} {(${ Id.VSub_Name MDIR) </INDEX-NEW>})
            (C {<ln>} {<-s>} {(${ Id.VSub_Name MDIR)} {(${ Id.VSub_Name BDHASH) <-install>})
          ]
        )
    )
    (command.ShFunction
      name: fetch_warn_eol
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:NOWTIME)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: (command.CommandList children:[(C {<date>} {(DQ <'+%s'>)})])
                      )
                    }
                  spids: [14053]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {<Id.Lit_LBracket '['>} {<-f>} {<lasteolwarn>} {<Id.Lit_RBracket ']'>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:LASTWARN)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                command_list: 
                                  (command.CommandList
                                    children: [(C {<cat>} {<lasteolwarn>})]
                                  )
                              )
                            }
                          spids: [14084]
                        )
                      ]
                    )
                  ]
                  spids: [14070 14081]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:LASTWARN)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<expr>} {(${ Id.VSub_Name NOWTIME)} {<->} {<63072000>})]
                              )
                          )
                        }
                      spids: [14097]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name EOLTIME)} {<-lt>} 
                          {(${ Id.VSub_Name NOWTIME)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>})
                    (command.Simple
                      words: [{<cat>}]
                      redirects: [
                        (redir.HereDoc
                          op: <Id.Redir_DLessDash '<<-'>
                          fd: -1
                          here_begin: {<EOF>}
                          here_end_span_id: 14173
                          stdin_parts: [
                            <'WARNING: '>
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              command_list: (command.CommandList children:[(C {<uname>} {<-sr>})])
                            )
                            <' HAS PASSED ITS END-OF-LIFE DATE.\n'>
                            <'Any security issues discovered after '>
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              command_list: 
                                (command.CommandList
                                  children: [(C {<date>} {<-r>} {(${ Id.VSub_Name EOLTIME)})]
                                )
                            )
                            <'\n'>
                            <'will not have been corrected.\n'>
                          ]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [14121 14138]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SINCEWARN)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {<expr>} {(${ Id.VSub_Name NOWTIME)} {<->} {(${ Id.VSub_Name LASTWARN)})
                            ]
                          )
                      )
                    }
                  spids: [14192]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:TIMELEFT)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {<expr>} {(${ Id.VSub_Name EOLTIME)} {<->} {(${ Id.VSub_Name NOWTIME)})
                            ]
                          )
                      )
                    }
                  spids: [14210]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name TIMELEFT)} {<-gt>} {<7884000>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [14233 14248]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name TIMELEFT)} {<-gt>} 
                          {
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {<expr>} {(${ Id.VSub_Name SINCEWARN)} 
                                      {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\*'>)} {<3>}
                                    )
                                  ]
                                )
                            )
                          } {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [14268 14297]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name TIMELEFT)} {<-lt>} {<604800>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:UNIT)
                          op: assign_op.Equal
                          rhs: {(DQ <day>)}
                          spids: [14331]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SIZE)
                          op: assign_op.Equal
                          rhs: {<86400>}
                          spids: [14337]
                        )
                      ]
                    )
                  ]
                  spids: [14313 14328]
                )
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name TIMELEFT)} {<-lt>} {<2678400>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:UNIT)
                          op: assign_op.Equal
                          rhs: {(DQ <week>)}
                          spids: [14359]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SIZE)
                          op: assign_op.Equal
                          rhs: {<604800>}
                          spids: [14365]
                        )
                      ]
                    )
                  ]
                  spids: [14341 14356]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:UNIT)
                      op: assign_op.Equal
                      rhs: {(DQ <month>)}
                      spids: [14372]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:SIZE)
                      op: assign_op.Equal
                      rhs: {<2678400>}
                      spids: [14378]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:NUM)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {<expr>} {(${ Id.VSub_Name TIMELEFT)} {</>} {(${ Id.VSub_Name SIZE)})
                            ]
                          )
                      )
                    }
                  spids: [14390]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name NUM)} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:UNIT)
                          op: assign_op.Equal
                          rhs: {(DQ (${ Id.VSub_Name UNIT) <s>)}
                          spids: [14427]
                        )
                      ]
                    )
                  ]
                  spids: [14408 14424]
                )
              ]
            )
            (C {<echo>})
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir.HereDoc
                  op: <Id.Redir_DLessDash '<<-'>
                  fd: -1
                  here_begin: {<EOF>}
                  here_end_span_id: 14472
                  stdin_parts: [
                    <'WARNING: '>
                    (command_sub
                      left_token: <Id.Left_Backtick '`'>
                      command_list: (command.CommandList children:[(C {<uname>} {<-sr>})])
                    )
                    <' is approaching its End-of-Life date.\n'>
                    <'It is strongly recommended that you upgrade to a newer\n'>
                    <'release within the next '>
                    (${ Id.VSub_Name NUM)
                    <' '>
                    (${ Id.VSub_Name UNIT)
                    <'.\n'>
                  ]
                )
              ]
            )
            (command.Simple
              words: [{<echo>} {(${ Id.VSub_Name NOWTIME)}]
              redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<lasteolwarn>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: fetch_run
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<workdir_init>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [(C {<fetch_pick_server_init>}) (C {<fetch_pick_server>})]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: (command.Pipeline children:[(C {<fetch_key>})] negated:T)
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<fetch_pick_server>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                  ]
                )
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: (command.Pipeline children:[(C {<fetch_tag>})] negated:T)
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<fetch_pick_server>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                  ]
                )
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_tagsanity>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_metadata>} {<INDEX-NEW>} {<INDEX-OLD>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_filter_metadata>} {<INDEX-NEW>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_filter_metadata>} {<INDEX-OLD>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (C {<fetch_filter_kernel_names>} {<INDEX-NEW>} {(${ Id.VSub_Name KERNCONF)})
            (C {<fetch_filter_kernel_names>} {<INDEX-OLD>} {(${ Id.VSub_Name KERNCONF)})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_inspect_system>} {<INDEX-OLD>} {<INDEX-PRESENT>} {<INDEX-NEW>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (C {<fetch_filter_unmodified_notpresent>} {<INDEX-OLD>} {<INDEX-PRESENT>} {<INDEX-NEW>} 
              {</dev/null>}
            )
            (C {<fetch_filter_allowadd>} {<INDEX-PRESENT>} {<INDEX-NEW>})
            (C {<fetch_filter_allowdelete>} {<INDEX-PRESENT>} {<INDEX-NEW>})
            (C {<fetch_filter_modified_metadata>} {<INDEX-OLD>} {<INDEX-PRESENT>} {<INDEX-NEW>})
            (C {<fetch_filter_uptodate>} {<INDEX-PRESENT>} {<INDEX-NEW>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_files_prepare>} {<INDEX-OLD>} {<INDEX-PRESENT>} {<INDEX-NEW>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_files>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_create_manifest>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_warn_eol>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: upgrade_guess_components
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name STRICTCOMPONENTS))} 
                          {<Id.Lit_Equals '='>} {(DQ <no>)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<fetch_filter_metadata_components>} {($ Id.VSub_Number '$1')})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                    (C {<echo>} {<-n>} {(DQ <'Inspecting system... '>)})
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{<cut>} {<-f>} {<1-3>} {<-d>} {(SQ <'|'>)}]
                          redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<INDEX-ALL>})]
                        )
                        (C {<tr>} {(SQ <'|'>)} {(SQ <' '>)})
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: [
                            (command.Sentence
                              child: (C {<read>} {<C>} {<S>} {<F>})
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          body: 
                            (command.DoGroup
                              children: [
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {<-e>} 
                                              {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F)} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (C {<echo>} 
                                          {(DQ <'+ '> (${ Id.VSub_Name C) <'|'> (${ Id.VSub_Name S))}
                                        )
                                      ]
                                      spids: [15003 15020]
                                    )
                                  ]
                                )
                                (C {<echo>} {(DQ <'= '> (${ Id.VSub_Name C) <'|'> (${ Id.VSub_Name S))})
                              ]
                            )
                        )
                        (C {<sort>})
                        (C {<uniq>} {<-c>})
                        (command.Simple
                          words: [{<sed>} {<-E>} {(SQ <'s,^ +,,'>)}]
                          redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<compfreq>})]
                        )
                      ]
                      negated: F
                    )
                    (command.Pipeline
                      children: [
                        (C {<grep>} {(SQ <' = '>)} {<compfreq>})
                        (C {<cut>} {<-f>} {<1> <Id.Lit_Comma ','> <3>} {<-d>} {(SQ <' '>)})
                        (command.Simple
                          words: [{<sort>} {<-k>} {<2> <Id.Lit_Comma ','> <2>} {<-t>} {(SQ <' '>)}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {<compfreq.total>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (command.Pipeline
                      children: [
                        (C {<grep>} {(SQ <' + '>)} {<compfreq>})
                        (C {<cut>} {<-f>} {<1> <Id.Lit_Comma ','> <3>} {<-d>} {(SQ <' '>)})
                        (command.Simple
                          words: [{<sort>} {<-k>} {<2> <Id.Lit_Comma ','> <2>} {<-t>} {(SQ <' '>)}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {<compfreq.present>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (command.Pipeline
                      children: [
                        (C {<join>} {<-t>} {(SQ <' '>)} {<-1>} {<2>} {<-2>} {<2>} {<compfreq.present>} 
                          {<compfreq.total>}
                        )
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: [
                            (command.Sentence
                              child: (C {<read>} {<S>} {<P>} {<T>})
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          body: 
                            (command.DoGroup
                              children: [
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name P)} {<-gt>} 
                                              {
                                                (command_sub
                                                  left_token: <Id.Left_Backtick '`'>
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {<expr>} {(${ Id.VSub_Name T)} {</>} {<2>})
                                                      ]
                                                    )
                                                )
                                              } {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [(C {<echo>} {(${ Id.VSub_Name S)})]
                                      spids: [15215 15242]
                                    )
                                  ]
                                )
                              ]
                            )
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {<comp.present>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (command.Simple
                      words: [{<cut>} {<-f>} {<2>} {<-d>} {(SQ <' '>)}]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {<compfreq.total>}
                        )
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {<comp.total>}
                        )
                      ]
                    )
                    (C {<rm>} {<INDEX-ALL>} {<compfreq>} {<compfreq.total>} {<compfreq.present>})
                    (C {<echo>} {(DQ <done.>)})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:KCOMP)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {<echo>} {(${ Id.VSub_Name KERNCONF)})
                                          (C {<tr>} {(SQ <A-Z>)} {(SQ <a-z>)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [15343]
                        )
                      ]
                    )
                    (command.Simple
                      words: [
                        {<grep>}
                        {<-E>}
                        {
                          (DQ <'^kernel'> <Id.Lit_Other '\\'> <'|'> (${ Id.VSub_Name KCOMP) 
                            (word_part.EscapedLiteral
                              token: <Id.Lit_EscapedChar '\\$'>
                            )
                          )
                        }
                        {<comp.total>}
                      ]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_DGreat '>>'>
                          fd: -1
                          arg_word: {<comp.present>}
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.AndOr
                                  ops: [Id.Op_DAmp]
                                  children: [
                                    (C {<grep>} {<-qE>} {(DQ <'^kernel'> <Id.Lit_Other '\\'> <'|'>)} 
                                      {<comp.total>}
                                    )
                                    (command.Pipeline
                                      children: [
                                        (C {<grep>} {<-qE>} 
                                          {
                                            (DQ <'^kernel'> <Id.Lit_Other '\\'> <'|'> 
                                              (${ Id.VSub_Name KCOMP) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>)
                                            )
                                          } {<comp.total>}
                                        )
                                      ]
                                      negated: T
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [{<cat>}]
                              redirects: [
                                (redir.HereDoc
                                  op: <Id.Redir_DLessDash '<<-'>
                                  fd: -1
                                  here_begin: {<EOF>}
                                  here_end_span_id: 15454
                                  stdin_parts: [
                                    <'\n'>
                                    <'WARNING: This system is running a '>
                                    <Id.Right_DoubleQuote '"'>
                                    (${ Id.VSub_Name KCOMP)
                                    <Id.Right_DoubleQuote '"'>
                                    <' kernel, which is not a\n'>
                                    <'kernel configuration distributed as part of FreeBSD '>
                                    (${ Id.VSub_Name RELNUM)
                                    <'.\n'>
                                    <
'This kernel will not be updated: you MUST update the kernel manually\n'
                                    >
                                    <'before running '>
                                    <Id.Right_DoubleQuote '"'>
                                    ($ Id.VSub_Number '$0')
                                    <' install'>
                                    <Id.Right_DoubleQuote '"'>
                                    <'.\n'>
                                  ]
                                )
                              ]
                            )
                          ]
                          spids: [15389 15425]
                        )
                      ]
                    )
                    (command.Simple
                      words: [{<sort>} {<-u>}]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {<comp.present>}
                        )
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {<comp.present.tmp>}
                        )
                      ]
                    )
                    (C {<mv>} {<comp.present.tmp>} {<comp.present>})
                    (command.Simple
                      words: [{<comm>} {<-13>} {<comp.present>} {<comp.total>}]
                      redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<comp.absent>})]
                    )
                    (C {<echo>})
                    (C {<echo>} {<-n>} {(DQ <'The following components of FreeBSD '>)})
                    (C {<echo>} {(DQ <'seem to be installed:'>)})
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{<tr>} {(SQ <'|'>)} {(SQ </>)}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Less '<'>
                              fd: -1
                              arg_word: {<comp.present>}
                            )
                          ]
                        )
                        (C {<fmt>} {<-72>})
                      ]
                      negated: F
                    )
                    (C {<echo>})
                    (C {<echo>} {<-n>} {(DQ <'The following components of FreeBSD '>)})
                    (C {<echo>} {(DQ <'do not seem to be installed:'>)})
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{<tr>} {(SQ <'|'>)} {(SQ </>)}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Less '<'>
                              fd: -1
                              arg_word: {<comp.absent>}
                            )
                          ]
                        )
                        (C {<fmt>} {<-72>})
                      ]
                      negated: F
                    )
                    (C {<echo>})
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<continuep>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                    (C {<echo>})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPONENTS)
                          op: assign_op.Equal
                          rhs: {(DQ )}
                          spids: [15624]
                        )
                      ]
                    )
                    (command.Simple
                      words: [{<tr>} {(SQ <'|'>)} {(SQ </>)}]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {<comp.present>}
                        )
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {<comp.present.tmp>}
                        )
                      ]
                    )
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [(command.Sentence child:(C {<read>} {<C>}) terminator:<Id.Op_Semi _>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:COMPONENTS)
                                  op: assign_op.Equal
                                  rhs: {(DQ (${ Id.VSub_Name COMPONENTS) <' '> (${ Id.VSub_Name C))}
                                  spids: [15658]
                                )
                              ]
                            )
                          ]
                        )
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {<comp.present.tmp>}
                        )
                      ]
                    )
                    (C {<rm>} {<comp.present>} {<comp.present.tmp>} {<comp.absent>} {<comp.total>})
                  ]
                  spids: [14893 14912]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: upgrade_guess_new_kernel
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name STRICTCOMPONENTS))} 
                          {<Id.Lit_Equals '='>} {(DQ <no>)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:METAHASH)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {<look>} {(DQ ($ Id.VSub_Number '$1') <'|'>)} 
                                            {<tINDEX.present>}
                                          )
                                          (C {<cut>} {<-f>} {<2>} {<-d>} {(SQ <'|'>)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [15744]
                        )
                      ]
                    )
                    (command.Simple
                      words: [{<gunzip>} {<-c>}]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {<files/> (${ Id.VSub_Name METAHASH) <.gz>}
                        )
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {($ Id.VSub_Number '$1') <.all>}
                        )
                      ]
                    )
                    (command.ForEach
                      iter_name: C
                      iter_words: [{(${ Id.VSub_Name COMPONENTS)}]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.AndOr
                                          ops: [Id.Op_DAmp]
                                          children: [
                                            (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name C)} 
                                              {<Id.Lit_Equals '='>} {(DQ <kernel/> (${ Id.VSub_Name KCOMP))} {<Id.Lit_RBracket ']'>}
                                            )
                                            (command.Pipeline
                                              children: [
                                                (C {<grep>} {<-qE>} 
                                                  {
                                                    (DQ <'^kernel'> <Id.Lit_Other '\\'> <'|'> 
                                                      (${ Id.VSub_Name KCOMP) <Id.Lit_Other '\\'> <'|'>
                                                    )
                                                  } {($ Id.VSub_Number '$1') <.all>}
                                                )
                                              ]
                                              negated: T
                                            )
                                          ]
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:COMPONENTS)
                                          op: assign_op.Equal
                                          rhs: {(DQ (${ Id.VSub_Name COMPONENTS) <' kernel/generic'>)}
                                          spids: [15860]
                                        )
                                      ]
                                    )
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:NKERNCONF)
                                          op: assign_op.Equal
                                          rhs: {(DQ <GENERIC>)}
                                          spids: [15869]
                                        )
                                      ]
                                    )
                                    (command.Simple
                                      words: [{<cat>}]
                                      redirects: [
                                        (redir.HereDoc
                                          op: <Id.Redir_DLessDash '<<-'>
                                          fd: -1
                                          here_begin: {<EOF>}
                                          here_end_span_id: 15904
                                          stdin_parts: [
                                            <'\n'>
                                            <'WARNING: This system is running a '>
                                            <Id.Right_DoubleQuote '"'>
                                            (${ Id.VSub_Name KCOMP)
                                            <Id.Right_DoubleQuote '"'>
                                            <' kernel, which is not a\n'>
                                            <'kernel configuration distributed as part of FreeBSD '>
                                            (${ Id.VSub_Name RELNUM)
                                            <'.\n'>
                                            <'As part of upgrading to FreeBSD '>
                                            (${ Id.VSub_Name RELNUM)
                                            <', this kernel will be\n'>
                                            <'replaced with a '>
                                            <Id.Right_DoubleQuote '"'>
                                            <generic>
                                            <Id.Right_DoubleQuote '"'>
                                            <' kernel.\n'>
                                          ]
                                        )
                                      ]
                                    )
                                    (command.AndOr
                                      ops: [Id.Op_DPipe]
                                      children: [
                                        (C {<continuep>})
                                        (command.ControlFlow
                                          token: <Id.ControlFlow_Return return>
                                          arg_word: {<1>}
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [15814 15857]
                                )
                              ]
                            )
                          ]
                        )
                    )
                    (C {<rm>} {($ Id.VSub_Number '$1') <.all>})
                  ]
                  spids: [15718 15737]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: upgrade_oldall_to_oldnew
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Less '<'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1')}
                    )
                  ]
                )
                (command.Simple
                  words: [{<sort>} {<-u>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1') <.paths>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Less '<'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$2')}
                    )
                  ]
                )
                (C {<sort>} {<-u>})
                (C {<comm>} {<-13>} {($ Id.VSub_Number '$1') <.paths>} {<->})
                (C {<lam>} {<->} {<-s>} {(DQ <'|-||||||'>)})
                (command.Simple
                  words: [{<sort>} {<->} {($ Id.VSub_Number '$1')}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1') <.tmp>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (C {<mv>} {($ Id.VSub_Number '$1') <.tmp>} {($ Id.VSub_Number '$1')})
            (command.Simple
              words: [{<comm>} {<-23>} {($ Id.VSub_Number '$1')} {($ Id.VSub_Number '$2')}]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {($ Id.VSub_Number '$1') <.tmp>}
                )
              ]
            )
            (C {<mv>} {($ Id.VSub_Number '$1') <.tmp>} {($ Id.VSub_Number '$1')})
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Less '<'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1')}
                    )
                  ]
                )
                (command.Simple
                  words: [{<sort>} {<-u>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1') <.paths>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<sort>} {<-k>} {<1> <Id.Lit_Comma ','> <1>} {<-t>} {(SQ <'|'>)}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Less '<'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$2')}
                    )
                  ]
                )
                (C {<join>} {<-t>} {(SQ <'|'>)} {<->} {($ Id.VSub_Number '$1') <.paths>})
                (command.Simple
                  words: [{<sort>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$2') <.tmp>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (C {<rm>} {($ Id.VSub_Number '$1') <.paths>})
            (C {<mv>} {($ Id.VSub_Number '$2') <.tmp>} {($ Id.VSub_Number '$2')})
            (C {<mv>} {($ Id.VSub_Number '$2')} {($ Id.VSub_Number '$3')})
          ]
        )
    )
    (command.ShFunction
      name: samef
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:X)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (command.Simple
                                    words: [{<sed>} {<-E>} {(SQ <'s/\\$FreeBSD.*\\$/$FreeBSD$/'>)}]
                                    redirects: [
                                      (redir.Redir
                                        op: <Id.Redir_Less '<'>
                                        fd: -1
                                        arg_word: {($ Id.VSub_Number '$1')}
                                      )
                                    ]
                                  )
                                  (C {(${ Id.VSub_Name SHA256)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [16215]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:Y)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (command.Simple
                                    words: [{<sed>} {<-E>} {(SQ <'s/\\$FreeBSD.*\\$/$FreeBSD$/'>)}]
                                    redirects: [
                                      (redir.Redir
                                        op: <Id.Redir_Less '<'>
                                        fd: -1
                                        arg_word: {($ Id.VSub_Number '$2')}
                                      )
                                    ]
                                  )
                                  (C {(${ Id.VSub_Name SHA256)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [16247]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$X')} {<Id.Lit_Equals '='>} 
                          {($ Id.VSub_DollarName '$Y')} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Sentence
                      child: (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [16280 16293]
                )
              ]
              else_action: [
                (command.Sentence
                  child: (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: upgrade_merge
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-s>} {($ Id.VSub_Number '$1')} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Pipeline
                      children: [
                        (C {<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)} {($ Id.VSub_Number '$1')})
                        (command.Simple
                          words: [{<sort>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {($ Id.VSub_Number '$1') <-paths>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (C {<rm>} {<-rf>} {<merge/>})
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [(command.Sentence child:(C {<read>} {<F>}) terminator:<Id.Op_Semi _>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:D)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_Backtick '`'>
                                        command_list: 
                                          (command.CommandList
                                            children: [(C {<dirname>} {(${ Id.VSub_Name F)})]
                                          )
                                      )
                                    }
                                  spids: [16395]
                                )
                              ]
                            )
                            (C {<mkdir>} {<-p>} {<merge/old/> (${ Id.VSub_Name D)})
                            (C {<mkdir>} {<-p>} 
                              {<merge/> (${ Id.VSub_Name OLDRELNUM) </> (${ Id.VSub_Name D)}
                            )
                            (C {<mkdir>} {<-p>} 
                              {<merge/> (${ Id.VSub_Name RELNUM) </> (${ Id.VSub_Name D)}
                            )
                            (C {<mkdir>} {<-p>} {<merge/new/> (${ Id.VSub_Name D)})
                          ]
                        )
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {($ Id.VSub_Number '$1') <-paths>}
                        )
                      ]
                    )
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [(command.Sentence child:(C {<read>} {<F>}) terminator:<Id.Op_Semi _>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:V)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_Backtick '`'>
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (command.Pipeline
                                                children: [
                                                  (C {<look>} {(DQ (${ Id.VSub_Name F) <'|'>)} 
                                                    {($ Id.VSub_Number '$2')}
                                                  )
                                                  (C {<cut>} {<-f>} {<7>} {<-d>} {(SQ <'|'>)})
                                                ]
                                                negated: F
                                              )
                                            ]
                                          )
                                      )
                                    }
                                  spids: [16482]
                                )
                              ]
                            )
                            (command.Simple
                              words: [{<gunzip>}]
                              redirects: [
                                (redir.Redir
                                  op: <Id.Redir_Less '<'>
                                  fd: -1
                                  arg_word: {<files/> (${ Id.VSub_Name V) <.gz>}
                                )
                                (redir.Redir
                                  op: <Id.Redir_Great '>'>
                                  fd: -1
                                  arg_word: {<merge/old/> (${ Id.VSub_Name F)}
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {<look>} {(DQ (${ Id.VSub_Name F) <'|'>)} 
                                              {($ Id.VSub_Number '$1')}
                                            )
                                            (C {<fgrep>} {<-q>} {(DQ <'|f|'>)})
                                          ]
                                          negated: F
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:V)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (command_sub
                                                left_token: <Id.Left_Backtick '`'>
                                                command_list: 
                                                  (command.CommandList
                                                    children: [
                                                      (command.Pipeline
                                                        children: [
                                                          (C {<look>} {(DQ (${ Id.VSub_Name F) <'|'>)} 
                                                            {($ Id.VSub_Number '$1')}
                                                          )
                                                          (C {<cut>} {<-f>} {<3>} {<-d>} {(SQ <'|'>)})
                                                        ]
                                                        negated: F
                                                      )
                                                    ]
                                                  )
                                              )
                                            }
                                          spids: [16563]
                                        )
                                      ]
                                    )
                                    (command.Simple
                                      words: [{<gunzip>}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Id.Redir_Less '<'>
                                          fd: -1
                                          arg_word: {<files/> (${ Id.VSub_Name V) <.gz>}
                                        )
                                        (redir.Redir
                                          op: <Id.Redir_Great '>'>
                                          fd: -1
                                          arg_word: 
                                            {<merge/> (${ Id.VSub_Name OLDRELNUM) </> 
                                              (${ Id.VSub_Name F)
                                            }
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [16536 16560]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {<look>} {(DQ (${ Id.VSub_Name F) <'|'>)} 
                                              {($ Id.VSub_Number '$3')}
                                            )
                                            (C {<cut>} {<-f>} 
                                              {<1> <Id.Lit_Comma ','> <2> <Id.Lit_Comma ','> <7>} {<-d>} {(SQ <'|'>)}
                                            )
                                            (C {<fgrep>} {<-q>} {(DQ <'|f|'>)})
                                          ]
                                          negated: F
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:V)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (command_sub
                                                left_token: <Id.Left_Backtick '`'>
                                                command_list: 
                                                  (command.CommandList
                                                    children: [
                                                      (command.Pipeline
                                                        children: [
                                                          (C {<look>} {(DQ (${ Id.VSub_Name F) <'|'>)} 
                                                            {($ Id.VSub_Number '$3')}
                                                          )
                                                          (C {<cut>} {<-f>} {<7>} {<-d>} {(SQ <'|'>)})
                                                        ]
                                                        negated: F
                                                      )
                                                    ]
                                                  )
                                              )
                                            }
                                          spids: [16672]
                                        )
                                      ]
                                    )
                                    (command.Simple
                                      words: [{<gunzip>}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Id.Redir_Less '<'>
                                          fd: -1
                                          arg_word: {<files/> (${ Id.VSub_Name V) <.gz>}
                                        )
                                        (redir.Redir
                                          op: <Id.Redir_Great '>'>
                                          fd: -1
                                          arg_word: 
                                            {<merge/> (${ Id.VSub_Name RELNUM) </> (${ Id.VSub_Name F)}
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [16626 16669]
                                )
                              ]
                            )
                          ]
                        )
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {($ Id.VSub_Number '$1') <-paths>}
                        )
                      ]
                    )
                    (C {<echo>} {<-n>} {(DQ <'Attempting to automatically merge '>)})
                    (C {<echo>} {<-n>} {(DQ <'changes in files...'>)})
                    (command.Simple
                      words: [{<Id.Lit_Other ':'>}]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {<failed.merges>}
                        )
                      ]
                    )
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [(command.Sentence child:(C {<read>} {<F>}) terminator:<Id.Op_Semi _>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {<Id.Lit_LBracket '['>} {<-f>} 
                                              {<merge/> (${ Id.VSub_Name RELNUM) </> 
                                                (${ Id.VSub_Name F)
                                              } {<Id.Lit_RBracket ']'>}
                                            )
                                          ]
                                          negated: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Continue continue>
                                    )
                                  ]
                                  spids: [16790 16810]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {<Id.Lit_LBracket '['>} {<-f>} 
                                              {<merge/> (${ Id.VSub_Name OLDRELNUM) </> 
                                                (${ Id.VSub_Name F)
                                              } {<Id.Lit_RBracket ']'>}
                                            )
                                          ]
                                          negated: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (C {<cp>} 
                                      {<merge/> (${ Id.VSub_Name RELNUM) </> (${ Id.VSub_Name F)} {<merge/new/> (${ Id.VSub_Name F)}
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Continue continue>
                                    )
                                  ]
                                  spids: [16832 16852]
                                )
                              ]
                            )
                            (command.Case
                              to_match: {(${ Id.VSub_Name F)}
                              arms: [
                                (case_arm
                                  pat_list: [{</etc/spwd.db>} {</etc/pwd.db>} {</etc/login.conf.db>}]
                                  action: [
                                    (C {<cp>} {<merge/old/> (${ Id.VSub_Name F)} 
                                      {<merge/new/> (${ Id.VSub_Name F)}
                                    )
                                  ]
                                  spids: [16892 16901 16925 -1]
                                )
                                (case_arm
                                  pat_list: [{<Id.Lit_Star '*'>}]
                                  action: [
                                    (command.If
                                      arms: [
                                        (if_arm
                                          cond: [
                                            (command.Sentence
                                              child: 
                                                (command.Pipeline
                                                  children: [
                                                    (command.Simple
                                                      words: [
                                                        {<merge>}
                                                        {<-p>}
                                                        {<-L>}
                                                        {(DQ <'current version'>)}
                                                        {<-L>}
                                                        {(DQ (${ Id.VSub_Name OLDRELNUM))}
                                                        {<-L>}
                                                        {(DQ (${ Id.VSub_Name RELNUM))}
                                                        {<merge/old/> (${ Id.VSub_Name F)}
                                                        {<merge/> (${ Id.VSub_Name OLDRELNUM) </> 
                                                          (${ Id.VSub_Name F)
                                                        }
                                                        {<merge/> (${ Id.VSub_Name RELNUM) </> 
                                                          (${ Id.VSub_Name F)
                                                        }
                                                      ]
                                                      redirects: [
                                                        (redir.Redir
                                                          op: <Id.Redir_Great '>'>
                                                          fd: -1
                                                          arg_word: {<merge/new/> (${ Id.VSub_Name F)}
                                                        )
                                                        (redir.Redir
                                                          op: <Id.Redir_Great '2>'>
                                                          fd: 2
                                                          arg_word: {</dev/null>}
                                                        )
                                                      ]
                                                    )
                                                  ]
                                                  negated: T
                                                )
                                              terminator: <Id.Op_Semi _>
                                            )
                                          ]
                                          action: [
                                            (command.Simple
                                              words: [{<echo>} {(${ Id.VSub_Name F)}]
                                              redirects: [
                                                (redir.Redir
                                                  op: <Id.Redir_DGreat '>>'>
                                                  fd: -1
                                                  arg_word: {<failed.merges>}
                                                )
                                              ]
                                            )
                                          ]
                                          spids: [16932 17006]
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [16928 16929 17023 -1]
                                )
                              ]
                            )
                          ]
                        )
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {($ Id.VSub_Number '$1') <-paths>}
                        )
                      ]
                    )
                    (C {<echo>} {(DQ <' done.'>)})
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [(command.Sentence child:(C {<read>} {<F>}) terminator:<Id.Op_Semi _>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<samef>} {<merge/old/> (${ Id.VSub_Name F)} 
                                          {<merge/> (${ Id.VSub_Name OLDRELNUM) </> (${ Id.VSub_Name F)}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (C {<cp>} 
                                      {<merge/> (${ Id.VSub_Name RELNUM) </> (${ Id.VSub_Name F)} {<merge/new/> (${ Id.VSub_Name F)}
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Continue continue>
                                    )
                                  ]
                                  spids: [17071 17090]
                                )
                              ]
                            )
                            (command.Simple
                              words: [{<cat>}]
                              redirects: [
                                (redir.HereDoc
                                  op: <Id.Redir_DLessDash '<<-'>
                                  fd: -1
                                  here_begin: {<EOF>}
                                  here_end_span_id: 17135
                                  stdin_parts: [
                                    <'\n'>
                                    <'The following file could not be merged automatically: '>
                                    (${ Id.VSub_Name F)
                                    <'\n'>
                                    <'Press Enter to edit this file in '>
                                    (${ Id.VSub_Name EDITOR)
                                    <' and resolve the conflicts\n'>
                                    <'manually...\n'>
                                  ]
                                )
                              ]
                            )
                            (command.Simple
                              words: [{<read>} {<dummy>}]
                              redirects: [
                                (redir.Redir
                                  op: <Id.Redir_Less '<'>
                                  fd: -1
                                  arg_word: {</dev/tty>}
                                )
                              ]
                            )
                            (command.Simple
                              words: [
                                {(${ Id.VSub_Name EDITOR)}
                                {
                                  (command_sub
                                    left_token: <Id.Left_Backtick '`'>
                                    command_list: (command.CommandList children:[(C {<pwd>})])
                                  ) </merge/new/> (${ Id.VSub_Name F)
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: <Id.Redir_Less '<'>
                                  fd: -1
                                  arg_word: {</dev/tty>}
                                )
                              ]
                            )
                          ]
                        )
                      redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<failed.merges>})]
                    )
                    (C {<rm>} {<failed.merges>})
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [(command.Sentence child:(C {<read>} {<F>}) terminator:<Id.Op_Semi _>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.AndOr
                                          ops: [Id.Op_DAmp Id.Op_DAmp]
                                          children: [
                                            (C {<Id.Lit_LBracket '['>} {<-f>} 
                                              {<merge/old/> (${ Id.VSub_Name F)} {<Id.Lit_RBracket ']'>}
                                            )
                                            (C {<Id.Lit_LBracket '['>} {<-f>} 
                                              {<merge/new/> (${ Id.VSub_Name F)} {<Id.Lit_RBracket ']'>}
                                            )
                                            (C {<samef>} {<merge/old/> (${ Id.VSub_Name F)} 
                                              {<merge/new/> (${ Id.VSub_Name F)}
                                            )
                                          ]
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Continue continue>
                                    )
                                  ]
                                  spids: [17203 17245]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.AndOr
                                          ops: [Id.Op_DAmp Id.Op_DAmp]
                                          children: [
                                            (C {<Id.Lit_LBracket '['>} {<-f>} 
                                              {<merge/old/> (${ Id.VSub_Name F)} {<Id.Lit_RBracket ']'>}
                                            )
                                            (C {<Id.Lit_LBracket '['>} {<-f>} 
                                              {<merge/> (${ Id.VSub_Name OLDRELNUM) </> 
                                                (${ Id.VSub_Name F)
                                              } {<Id.Lit_RBracket ']'>}
                                            )
                                            (C {<samef>} {<merge/old/> (${ Id.VSub_Name F)} 
                                              {<merge/> (${ Id.VSub_Name OLDRELNUM) </> 
                                                (${ Id.VSub_Name F)
                                              }
                                            )
                                          ]
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Continue continue>
                                    )
                                  ]
                                  spids: [17263 17314]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {<Id.Lit_LBracket '['>} {<-f>} 
                                              {<merge/new/> (${ Id.VSub_Name F)} {<Id.Lit_RBracket ']'>}
                                            )
                                          ]
                                          negated: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.Simple
                                      words: [{<cat>}]
                                      redirects: [
                                        (redir.HereDoc
                                          op: <Id.Redir_DLessDash '<<-'>
                                          fd: -1
                                          here_begin: {<EOF>}
                                          here_end_span_id: 17364
                                          stdin_parts: [
                                            <'\n'>
                                            <
'The following file will be removed, as it no longer exists in\n'
                                            >
                                            <'FreeBSD '>
                                            (${ Id.VSub_Name RELNUM)
                                            <': '>
                                            (${ Id.VSub_Name F)
                                            <'\n'>
                                          ]
                                        )
                                      ]
                                    )
                                    (command.AndOr
                                      ops: [Id.Op_DPipe]
                                      children: [
                                        (command.Simple
                                          words: [{<continuep>}]
                                          redirects: [
                                            (redir.Redir
                                              op: <Id.Redir_Less '<'>
                                              fd: -1
                                              arg_word: {</dev/tty>}
                                            )
                                          ]
                                        )
                                        (command.ControlFlow
                                          token: <Id.ControlFlow_Return return>
                                          arg_word: {<1>}
                                        )
                                      ]
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Continue continue>
                                    )
                                  ]
                                  spids: [17328 17344]
                                )
                              ]
                            )
                            (command.Simple
                              words: [{<cat>}]
                              redirects: [
                                (redir.HereDoc
                                  op: <Id.Redir_DLessDash '<<-'>
                                  fd: -1
                                  here_begin: {<EOF>}
                                  here_end_span_id: 17411
                                  stdin_parts: [
                                    <'\n'>
                                    <'The following changes, which occurred between FreeBSD '>
                                    (${ Id.VSub_Name OLDRELNUM)
                                    <' and\n'>
                                    <'FreeBSD '>
                                    (${ Id.VSub_Name RELNUM)
                                    <' have been merged into '>
                                    (${ Id.VSub_Name F)
                                    <':\n'>
                                  ]
                                )
                              ]
                            )
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (C {<diff>} {<-U>} {<5>} {<-L>} {(DQ <'current version'>)} {<-L>} 
                                  {(DQ <'new version'>)} {<merge/old/> (${ Id.VSub_Name F)} {<merge/new/> (${ Id.VSub_Name F)}
                                )
                                (C {<true>})
                              ]
                            )
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (command.Simple
                                  words: [{<continuep>}]
                                  redirects: [
                                    (redir.Redir
                                      op: <Id.Redir_Less '<'>
                                      fd: -1
                                      arg_word: {</dev/tty>}
                                    )
                                  ]
                                )
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                            )
                          ]
                        )
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {($ Id.VSub_Number '$1') <-paths>}
                        )
                      ]
                    )
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [(command.Sentence child:(C {<read>} {<F>}) terminator:<Id.Op_Semi _>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {<-f>} 
                                          {<merge/new/> (${ Id.VSub_Name F)} {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:V)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (command_sub
                                                left_token: <Id.Left_Backtick '`'>
                                                command_list: 
                                                  (command.CommandList
                                                    children: [
                                                      (C {(${ Id.VSub_Name SHA256)} {<-q>} 
                                                        {<merge/new/> (${ Id.VSub_Name F)}
                                                      )
                                                    ]
                                                  )
                                              )
                                            }
                                          spids: [17501]
                                        )
                                      ]
                                    )
                                    (command.Simple
                                      words: [{<gzip>} {<-c>}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Id.Redir_Less '<'>
                                          fd: -1
                                          arg_word: {<merge/new/> (${ Id.VSub_Name F)}
                                        )
                                        (redir.Redir
                                          op: <Id.Redir_Great '>'>
                                          fd: -1
                                          arg_word: {<files/> (${ Id.VSub_Name V) <.gz>}
                                        )
                                      ]
                                    )
                                    (C {<echo>} {(DQ (${ Id.VSub_Name F) <'|'> (${ Id.VSub_Name V))})
                                  ]
                                  spids: [17484 17498]
                                )
                              ]
                            )
                          ]
                        )
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {($ Id.VSub_Number '$1') <-paths>}
                        )
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {<newhashes>}
                        )
                      ]
                    )
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [(command.Sentence child:(C {<read>} {<F>}) terminator:<Id.Op_Semi _>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (C {<look>} {(DQ (${ Id.VSub_Name F) <'|'>)} {($ Id.VSub_Number '$3')})
                          ]
                        )
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {($ Id.VSub_Number '$1') <-paths>}
                        )
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {($ Id.VSub_Number '$3') <-oldlines>}
                        )
                      ]
                    )
                    (command.Simple
                      words: [
                        {<join>}
                        {<-t>}
                        {(SQ <'|'>)}
                        {<-o>}
                        {<1.1> <Id.Lit_Comma ','> <1.2> <Id.Lit_Comma ','> <1.3> <Id.Lit_Comma ','> <1.4> 
                          <Id.Lit_Comma ','> <1.5> <Id.Lit_Comma ','> <1.6> <Id.Lit_Comma ','> <2.2> <Id.Lit_Comma ','> <1.8>
                        }
                        {($ Id.VSub_Number '$3') <-oldlines>}
                        {<newhashes>}
                      ]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {($ Id.VSub_Number '$3') <-newlines>}
                        )
                      ]
                    )
                    (command.Pipeline
                      children: [
                        (C {<sort>} {($ Id.VSub_Number '$3') <-oldlines>})
                        (C {<comm>} {<-13>} {<->} {($ Id.VSub_Number '$3')})
                        (command.Simple
                          words: [{<sort>} {<->} {($ Id.VSub_Number '$3') <-newlines>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {($ Id.VSub_Number '$3') <.tmp>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (C {<mv>} {($ Id.VSub_Number '$3') <.tmp>} {($ Id.VSub_Number '$3')})
                    (C {<rm>} {($ Id.VSub_Number '$1') <-paths>} {<newhashes>} 
                      {($ Id.VSub_Number '$3') <-oldlines>} {($ Id.VSub_Number '$3') <-newlines>}
                    )
                    (C {<rm>} {<-rf>} {<merge/>})
                  ]
                  spids: [16334 16345]
                )
              ]
            )
            (C {<rm>} {($ Id.VSub_Number '$1')})
          ]
        )
    )
    (command.ShFunction
      name: upgrade_run
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<workdir_init>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [(C {<fetch_pick_server_init>}) (C {<fetch_pick_server>})]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: (command.Pipeline children:[(C {<fetch_key>})] negated:T)
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<fetch_pick_server>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                  ]
                )
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: (command.Pipeline children:[(C {<fetch_tag>})] negated:T)
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<fetch_pick_server>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                  ]
                )
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_tagsanity>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_metadata>} {<INDEX-OLD>} {<INDEX-ALL>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<upgrade_guess_components>} {<INDEX-ALL>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_filter_metadata>} {<INDEX-OLD>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_filter_metadata>} {<INDEX-ALL>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.Simple
              words: [{<sort>} {<INDEX-OLD>} {<INDEX-ALL>}]
              redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-OLD.tmp>})]
            )
            (C {<mv>} {<INDEX-OLD.tmp>} {<INDEX-OLD>})
            (C {<rm>} {<INDEX-ALL>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:OLDRELNUM)
                  op: assign_op.Equal
                  rhs: {(${ Id.VSub_Name RELNUM)}
                  spids: [17943]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RELNUM)
                  op: assign_op.Equal
                  rhs: {(${ Id.VSub_Name TARGETRELEASE)}
                  spids: [17949]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:OLDFETCHDIR)
                  op: assign_op.Equal
                  rhs: {(${ Id.VSub_Name FETCHDIR)}
                  spids: [17955]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FETCHDIR)
                  op: assign_op.Equal
                  rhs: {(${ Id.VSub_Name RELNUM) </> (${ Id.VSub_Name ARCH)}
                  spids: [17961]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: (command.Pipeline children:[(C {<fetch_tag>})] negated:T)
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<fetch_pick_server>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                  ]
                )
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_metadata>} {<INDEX-ALL>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<upgrade_guess_new_kernel>} {<INDEX-ALL>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_filter_metadata>} {<INDEX-ALL>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (C {<upgrade_oldall_to_oldnew>} {<INDEX-OLD>} {<INDEX-ALL>} {<INDEX-NEW>})
            (C {<fetch_filter_kernel_names>} {<INDEX-NEW>} {(${ Id.VSub_Name NKERNCONF)})
            (C {<fetch_filter_kernel_names>} {<INDEX-OLD>} {(${ Id.VSub_Name KERNCONF)})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_inspect_system>} {<INDEX-OLD>} {<INDEX-PRESENT>} {<INDEX-NEW>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (C {<fetch_filter_mergechanges>} {<INDEX-OLD>} {<INDEX-PRESENT>} {<tomerge-old>})
            (C {<fetch_filter_unmodified_notpresent>} {<INDEX-OLD>} {<INDEX-PRESENT>} {<INDEX-NEW>} 
              {<tomerge-old>}
            )
            (C {<fetch_filter_allowadd>} {<INDEX-PRESENT>} {<INDEX-NEW>})
            (C {<fetch_filter_allowdelete>} {<INDEX-PRESENT>} {<INDEX-NEW>})
            (C {<fetch_filter_modified_metadata>} {<INDEX-OLD>} {<INDEX-PRESENT>} {<INDEX-NEW>})
            (C {<fetch_filter_uptodate>} {<INDEX-PRESENT>} {<INDEX-NEW>})
            (C {<fetch_files_premerge>} {<tomerge-old>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_files_prepare>} {<INDEX-OLD>} {<INDEX-PRESENT>} {<INDEX-NEW>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:PATCHDIR)
                  op: assign_op.Equal
                  rhs: {<to-> (${ Id.VSub_Name RELNUM) </> (${ Id.VSub_Name ARCH) </bp>}
                  spids: [18304]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_files>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<upgrade_merge>} {<tomerge-old>} {<INDEX-PRESENT>} {<INDEX-NEW>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_create_manifest>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (C {<touch>} {(${ Id.VSub_Name BDHASH) <-install/kernelfirst>})
            (C {<echo>} 
              {
                (DQ <'To install the downloaded upgrades, run '> 
                  (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ($ Id.VSub_Number '$0') <' install'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <.>
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: install_verify
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<cat>} {($ Id.VSub_At '$@')})
                (C {<cut>} {<-f>} {<2> <Id.Lit_Comma ','> <7>} {<-d>} {(SQ <'|'>)})
                (C {<grep>} {<-E>} {(SQ <'^f'>)})
                (C {<cut>} {<-f>} {<2>} {<-d>} {(SQ <'|'>)})
                (command.Simple
                  words: [{<sort>} {<-u>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<filelist>})]
                )
              ]
              negated: F
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(command.Sentence child:(C {<read>} {<HASH>}) terminator:<Id.Op_Semi _>)]
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (C {<Id.Lit_LBracket '['>} {<-f>} 
                                      {<files/> (${ Id.VSub_Name HASH) <.gz>} {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                  negated: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<echo>} {<-n>} {(DQ <'Update files missing -- '>)})
                            (C {<echo>} {(DQ <'this should never happen.'>)})
                            (C {<echo>} {(DQ <"Re-run '"> ($ Id.VSub_Number '$0') <" fetch'.">)})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [18495 18512]
                        )
                      ]
                    )
                  ]
                )
              redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<filelist>})]
            )
            (C {<rm>} {<filelist>})
          ]
        )
    )
    (command.ShFunction
      name: install_unschg
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<cat>} {($ Id.VSub_At '$@')})
                (command.Simple
                  words: [{<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<filelist>})]
                )
              ]
              negated: F
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Pipeline
                  children: [
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [(command.Sentence child:(C {<read>} {<F>}) terminator:<Id.Op_Semi _>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {<Id.Lit_LBracket '['>} {<-e>} 
                                              {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F)} {<Id.Lit_RBracket ']'>}
                                            )
                                          ]
                                          negated: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Continue continue>
                                    )
                                  ]
                                  spids: [18621 18640]
                                )
                              ]
                              else_action: [
                                (C {<echo>} {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name F)})
                              ]
                            )
                          ]
                        )
                      redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<filelist>})]
                    )
                    (C {<xargs>} {<chflags>} {<noschg>})
                  ]
                  negated: F
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (C {<rm>} {<filelist>})
          ]
        )
    )
    (command.ShFunction
      name: backup_kernel_finddir
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:CNT)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [18707]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(command.Sentence child:(C {<true>}) terminator:<Id.Op_Semi _>)]
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-e>} 
                                  {($ Id.VSub_DollarName '$BASEDIR') </> 
                                    ($ Id.VSub_DollarName '$BACKUPKERNELDIR')
                                  } {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<0>}
                            )
                          ]
                          spids: [18728 18743]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-d>} 
                                  {($ Id.VSub_DollarName '$BASEDIR') </> 
                                    ($ Id.VSub_DollarName '$BACKUPKERNELDIR')
                                  } {<-a>} {<-e>} 
                                  {($ Id.VSub_DollarName '$BASEDIR') </> 
                                    ($ Id.VSub_DollarName '$BACKUPKERNELDIR') </.freebsd-update>
                                  } {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<0>}
                            )
                          ]
                          spids: [18763 18787]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:CNT)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Plus
                                    left: (arith_expr.VarRef token:<Id.Lit_ArithVarLike CNT>)
                                    right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>})
                                  )
                              )
                            }
                          spids: [18807]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$CNT')} {<-gt>} {<9>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<echo>} 
                              {
                                (DQ <'Could not find valid backup dir ('> 
                                  ($ Id.VSub_DollarName '$BASEDIR') </> ($ Id.VSub_DollarName '$BACKUPKERNELDIR') <')'>
                                )
                              }
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [18818 18831]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:BACKUPKERNELDIR)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (command_sub
                                  left_token: <Id.Left_Backtick '`'>
                                  command_list: 
                                    (command.CommandList
                                      children: [
                                        (command.Pipeline
                                          children: [
                                            (C {<echo>} {($ Id.VSub_DollarName '$BACKUPKERNELDIR')})
                                            (C {<sed>} {<-Ee>} {(SQ <'s/[0-9]$//'>)})
                                          ]
                                          negated: F
                                        )
                                      ]
                                    )
                                )
                              )
                            }
                          spids: [18853]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:BACKUPKERNELDIR)
                          op: assign_op.Equal
                          rhs: {(DQ (${ Id.VSub_Name BACKUPKERNELDIR) (${ Id.VSub_Name CNT))}
                          spids: [18877]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: backup_kernel
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$BACKUPKERNEL')} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<yes>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [18926 18940]
                )
              ]
            )
            (C {<backup_kernel_finddir>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-d>} 
                          {($ Id.VSub_DollarName '$BASEDIR') </> 
                            ($ Id.VSub_DollarName '$BACKUPKERNELDIR')
                          } {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<rm>} {<-fr>} 
                      {($ Id.VSub_DollarName '$BASEDIR') </> ($ Id.VSub_DollarName '$BACKUPKERNELDIR')}
                    )
                  ]
                  spids: [18972 18985]
                )
              ]
            )
            (C {<mkdir>} {<-p>} 
              {($ Id.VSub_DollarName '$BASEDIR') </> ($ Id.VSub_DollarName '$BACKUPKERNELDIR')}
            )
            (command.Pipeline
              children: [
                (C {<mtree>} {<-cdn>} {<-p>} 
                  {(DQ (${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name KERNELDIR))}
                )
                (command.Simple
                  words: [
                    {<mtree>}
                    {<-Ue>}
                    {<-p>}
                    {(DQ (${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name BACKUPKERNELDIR))}
                  ]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{</dev/null>})]
                )
              ]
              negated: F
            )
            (C {<touch>} 
              {($ Id.VSub_DollarName '$BASEDIR') </> ($ Id.VSub_DollarName '$BACKUPKERNELDIR') 
                </.freebsd-update>
              }
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ <'Could not create kernel backup directory'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [19068 19081]
                )
              ]
            )
            (C {<Id.KW_Set set>} {<-f>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$BACKUPKERNELSYMBOLFILES')} 
                          {<Id.Lit_Equals '='>} {<yes>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:FINDFILTER)
                          op: assign_op.Equal
                          rhs: {(DQ )}
                          spids: [19134]
                        )
                      ]
                    )
                  ]
                  spids: [19118 19131]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:FINDFILTER)
                      op: assign_op.Equal
                      rhs: {(DQ <'-a ! -name *.debug -a ! -name *.symbols'>)}
                      spids: [19142]
                    )
                  ]
                )
              ]
            )
            (command.Subshell
              command_list: 
                (command.CommandList
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<cd>} {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name KERNELDIR)})
                        (C {<find>} {<.>} {<-type>} {<f>} {($ Id.VSub_DollarName '$FINDFILTER')} {<-exec>} 
                          {<cp>} {<-pl>} {(SQ <'{}'>)} {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name BACKUPKERNELDIR) </> (SQ <'{}'>)} 
                          {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\;'>)}
                        )
                      ]
                    )
                  ]
                )
            )
            (C {<Id.KW_Set set>} {<Id.Lit_Other '+'> <f>})
          ]
        )
    )
    (command.ShFunction
      name: install_from_index
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<sort>} {<-k>} {<1> <Id.Lit_Comma ','> <1>} {<-t>} {(SQ <'|'>)} 
                  {($ Id.VSub_Number '$1')}
                )
                (C {<tr>} {(SQ <'|'>)} {(SQ <' '>)})
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<read>} {<FPATH>} {<TYPE>} {<OWNER>} {<GROUP>} {<PERM>} {<FLAGS>} {<HASH>} 
                          {<LINK>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  body: 
                    (command.DoGroup
                      children: [
                        (command.Case
                          to_match: {(${ Id.VSub_Name TYPE)}
                          arms: [
                            (case_arm
                              pat_list: [{<d>}]
                              action: [
                                (C {<install>} {<-d>} {<-o>} {(${ Id.VSub_Name OWNER)} {<-g>} 
                                  {(${ Id.VSub_Name GROUP)} {<-m>} {(${ Id.VSub_Name PERM)} {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name FPATH)}
                                )
                              ]
                              spids: [19304 19305 19345 -1]
                            )
                            (case_arm
                              pat_list: [{<f>}]
                              action: [
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {<-z>} 
                                              {(DQ (${ Id.VSub_Name LINK))} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (command.Simple
                                          words: [{<gunzip>}]
                                          redirects: [
                                            (redir.Redir
                                              op: <Id.Redir_Less '<'>
                                              fd: -1
                                              arg_word: {<files/> (${ Id.VSub_Name HASH) <.gz>}
                                            )
                                            (redir.Redir
                                              op: <Id.Redir_Great '>'>
                                              fd: -1
                                              arg_word: {(${ Id.VSub_Name HASH)}
                                            )
                                          ]
                                        )
                                        (C {<install>} {<-S>} {<-o>} {(${ Id.VSub_Name OWNER)} {<-g>} 
                                          {(${ Id.VSub_Name GROUP)} {<-m>} {(${ Id.VSub_Name PERM)} {(${ Id.VSub_Name HASH)} 
                                          {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name FPATH)}
                                        )
                                        (C {<rm>} {(${ Id.VSub_Name HASH)})
                                      ]
                                      spids: [19352 19367]
                                    )
                                  ]
                                  else_action: [
                                    (C {<ln>} {<-f>} 
                                      {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name LINK)} {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name FPATH)}
                                    )
                                  ]
                                )
                              ]
                              spids: [19348 19349 19466 -1]
                            )
                            (case_arm
                              pat_list: [{<L>}]
                              action: [
                                (C {<ln>} {<-sfh>} {(${ Id.VSub_Name HASH)} 
                                  {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name FPATH)}
                                )
                              ]
                              spids: [19469 19470 19494 -1]
                            )
                          ]
                        )
                      ]
                    )
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<tr>} {(SQ <'|'>)} {(SQ <' '>)}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Less '<'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$1')}
                    )
                  ]
                )
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<read>} {<FPATH>} {<TYPE>} {<OWNER>} {<GROUP>} {<PERM>} {<FLAGS>} {<HASH>} 
                          {<LINK>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  body: 
                    (command.DoGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.AndOr
                                      ops: [Id.Op_DAmp]
                                      children: [
                                        (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name TYPE)} 
                                          {<Id.Lit_Equals '='>} {(DQ <f>)} {<Id.Lit_RBracket ']'>}
                                        )
                                        (command.Pipeline
                                          children: [
                                            (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name FLAGS)} 
                                              {<Id.Lit_Equals '='>} {(DQ <0>)} {<Id.Lit_RBracket ']'>}
                                            )
                                          ]
                                          negated: T
                                        )
                                      ]
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [
                                (C {<chflags>} {(${ Id.VSub_Name FLAGS)} 
                                  {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name FPATH)}
                                )
                              ]
                              spids: [19549 19585]
                            )
                          ]
                        )
                      ]
                    )
                )
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: install_delete
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Less '<'>
                      fd: -1
                      arg_word: {($ Id.VSub_Number '$2')}
                    )
                  ]
                )
                (command.Simple
                  words: [{<sort>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<newfiles>})]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (C {<sort>} {<-k>} {<1> <Id.Lit_Comma ','> <1>} {<-t>} {(SQ <'|'>)} 
                  {($ Id.VSub_Number '$1')}
                )
                (C {<join>} {<-t>} {(SQ <'|'>)} {<-v>} {<1>} {<->} {<newfiles>})
                (C {<sort>} {<-r>} {<-k>} {<1> <Id.Lit_Comma ','> <1>} {<-t>} {(SQ <'|'>)})
                (C {<cut>} {<-f>} {<1> <Id.Lit_Comma ','> <2>} {<-d>} {(SQ <'|'>)})
                (command.Simple
                  words: [{<tr>} {(SQ <'|'>)} {(SQ <' '>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<killfiles>})]
                )
              ]
              negated: F
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: (C {<read>} {<FPATH>} {<TYPE>})
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(${ Id.VSub_Name TYPE)}
                      arms: [
                        (case_arm
                          pat_list: [{<d>}]
                          action: [
                            (C {<rmdir>} {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name FPATH)})
                          ]
                          spids: [19772 19773 19787 -1]
                        )
                        (case_arm
                          pat_list: [{<f>}]
                          action: [(C {<rm>} {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name FPATH)})]
                          spids: [19790 19791 19805 -1]
                        )
                        (case_arm
                          pat_list: [{<L>}]
                          action: [(C {<rm>} {(${ Id.VSub_Name BASEDIR) </> (${ Id.VSub_Name FPATH)})]
                          spids: [19808 19809 19823 -1]
                        )
                      ]
                    )
                  ]
                )
              redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<killfiles>})]
            )
            (C {<rm>} {<newfiles>} {<killfiles>})
          ]
        )
    )
    (command.ShFunction
      name: install_files
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_Number '$1') </kerneldone>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [{<grep>} {<-E>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-OLD>}]
                      redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-OLD>})]
                    )
                    (command.Simple
                      words: [{<grep>} {<-E>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-NEW>}]
                      redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-NEW>})]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<backup_kernel>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<install_from_index>} {<INDEX-NEW>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<install_delete>} {<INDEX-OLD>} {<INDEX-NEW>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-s>} {<INDEX-OLD>} {<-o>} {<-s>} {<INDEX-NEW>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [{<kldxref>} {<-R>} {(${ Id.VSub_Name BASEDIR) </boot/>}]
                              redirects: [
                                (redir.Redir
                                  op: <Id.Redir_Great '2>'>
                                  fd: 2
                                  arg_word: {</dev/null>}
                                )
                              ]
                            )
                          ]
                          spids: [19967 19984]
                        )
                      ]
                    )
                    (C {<touch>} {($ Id.VSub_Number '$1') </kerneldone>})
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.AndOr
                                  ops: [Id.Op_DAmp]
                                  children: [
                                    (C {<Id.Lit_LBracket '['>} {<-f>} 
                                      {($ Id.VSub_Number '$1') </kernelfirst>} {<Id.Lit_RBracket ']'>}
                                    )
                                    (C {<Id.Lit_LBracket '['>} {<-s>} {<INDEX-OLD>} {<-o>} {<-s>} 
                                      {<INDEX-NEW>} {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [{<cat>}]
                              redirects: [
                                (redir.HereDoc
                                  op: <Id.Redir_DLessDash '<<-'>
                                  fd: -1
                                  here_begin: {<EOF>}
                                  here_end_span_id: 20064
                                  stdin_parts: [
                                    <'\n'>
                                    <'Kernel updates have been installed.  Please reboot and run\n'>
                                    <Id.Right_DoubleQuote '"'>
                                    ($ Id.VSub_Number '$0')
                                    <' install'>
                                    <Id.Right_DoubleQuote '"'>
                                    <' again to finish installing updates.\n'>
                                  ]
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<0>}
                            )
                          ]
                          spids: [20019 20048]
                        )
                      ]
                    )
                  ]
                  spids: [19865 19879]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_Number '$1') </worlddone>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Pipeline
                      children: [
                        (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-NEW>})
                        (command.Simple
                          words: [{<grep>} {<-E>} {(SQ <'^[^|]+\\|d\\|'>)}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {<INDEX-NEW>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<install_from_index>} {<INDEX-NEW>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                    (command.Pipeline
                      children: [
                        (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-NEW>})
                        (C {<grep>} {<-vE>} {(SQ <'^[^|]+\\|d\\|'>)})
                        (command.Simple
                          words: [{<grep>} {<-E>} {(SQ <'^/libexec/ld-elf[^|]*\\.so\\.[0-9]+\\|'>)}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {<INDEX-NEW>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<install_from_index>} {<INDEX-NEW>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                    (command.Pipeline
                      children: [
                        (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-NEW>})
                        (C {<grep>} {<-vE>} {(SQ <'^[^|]+\\|d\\|'>)})
                        (C {<grep>} {<-vE>} {(SQ <'^/libexec/ld-elf[^|]*\\.so\\.[0-9]+\\|'>)})
                        (command.Simple
                          words: [{<grep>} {<-E>} {(SQ <'^[^|]*/lib/[^|]*\\.so\\.[0-9]+\\|'>)}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {<INDEX-NEW>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<install_from_index>} {<INDEX-NEW>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                    (command.Pipeline
                      children: [
                        (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-OLD>})
                        (C {<grep>} {<-vE>} {(SQ <'^[^|]+\\|d\\|'>)})
                        (C {<grep>} {<-vE>} {(SQ <'^/libexec/ld-elf[^|]*\\.so\\.[0-9]+\\|'>)})
                        (command.Simple
                          words: [{<grep>} {<-vE>} {(SQ <'^[^|]*/lib/[^|]*\\.so\\.[0-9]+\\|'>)}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {<INDEX-OLD>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (command.Pipeline
                      children: [
                        (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-NEW>})
                        (C {<grep>} {<-vE>} {(SQ <'^[^|]+\\|d\\|'>)})
                        (C {<grep>} {<-vE>} {(SQ <'^/libexec/ld-elf[^|]*\\.so\\.[0-9]+\\|'>)})
                        (command.Simple
                          words: [{<grep>} {<-vE>} {(SQ <'^[^|]*/lib/[^|]*\\.so\\.[0-9]+\\|'>)}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {<INDEX-NEW>}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<install_from_index>} {<INDEX-NEW>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<install_delete>} {<INDEX-OLD>} {<INDEX-NEW>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<Id.Lit_LBracket '['>} 
                                      {(${ Id.VSub_Name BASEDIR) </etc/master.passwd>} {<-nt>} {(${ Id.VSub_Name BASEDIR) </etc/spwd.db>} {<Id.Lit_RBracket ']'>}
                                    )
                                    (C {<Id.Lit_LBracket '['>} 
                                      {(${ Id.VSub_Name BASEDIR) </etc/master.passwd>} {<-nt>} {(${ Id.VSub_Name BASEDIR) </etc/pwd.db>} {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<pwd_mkdb>} {<-d>} {(${ Id.VSub_Name BASEDIR) </etc>} 
                              {(${ Id.VSub_Name BASEDIR) </etc/master.passwd>}
                            )
                          ]
                          spids: [20392 20430]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} 
                                  {(${ Id.VSub_Name BASEDIR) </etc/login.conf>} {<-nt>} {(${ Id.VSub_Name BASEDIR) </etc/login.conf.db>} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [(C {<cap_mkdb>} {(${ Id.VSub_Name BASEDIR) </etc/login.conf>})]
                          spids: [20456 20475]
                        )
                      ]
                    )
                    (C {<touch>} {($ Id.VSub_Number '$1') </worlddone>})
                    (command.Pipeline
                      children: [
                        (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-NEW>})
                        (C {<grep>} {<-E>} {(SQ <'^[^|]*/lib/[^|]*\\.so\\.[0-9]+\\|'>)})
                        (C {<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)})
                        (command.Simple
                          words: [{<sort>}]
                          redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<newfiles>})]
                        )
                      ]
                      negated: F
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} 
                                      {($ Id.VSub_Number '$1') </INDEX-OLD>}
                                    )
                                    (C {<grep>} {<-E>} {(SQ <'^[^|]*/lib/[^|]*\\.so\\.[0-9]+\\|'>)})
                                    (C {<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)})
                                    (C {<sort>})
                                    (C {<join>} {<-v>} {<1>} {<->} {<newfiles>})
                                    (C {<grep>} {<-q>} {<.>})
                                  ]
                                  negated: F
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [{<cat>}]
                              redirects: [
                                (redir.HereDoc
                                  op: <Id.Redir_DLessDash '<<-'>
                                  fd: -1
                                  here_begin: {<EOF>}
                                  here_end_span_id: 20642
                                  stdin_parts: [
                                    <'\n'>
                                    <
'Completing this upgrade requires removing old shared object files.\n'
                                    >
                                    <
'Please rebuild all installed 3rd party software (e.g., programs\n'
                                    >
                                    <'installed from the ports tree) and then run '>
                                    <Id.Right_DoubleQuote '"'>
                                    ($ Id.VSub_Number '$0')
                                    <' install'>
                                    <Id.Right_DoubleQuote '"'>
                                    <'\n'>
                                    <'again to finish installing updates.\n'>
                                  ]
                                )
                              ]
                            )
                            (C {<rm>} {<newfiles>})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<0>}
                            )
                          ]
                          spids: [20556 20623]
                        )
                      ]
                    )
                    (C {<rm>} {<newfiles>})
                  ]
                  spids: [20082 20096]
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-NEW>})
                (C {<grep>} {<-vE>} {(SQ <'^[^|]+\\|d\\|'>)})
                (command.Simple
                  words: [{<grep>} {<-E>} {(SQ <'^[^|]*/lib/[^|]*\\.so\\.[0-9]+\\|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-NEW>})]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-OLD>})
                (C {<grep>} {<-vE>} {(SQ <'^[^|]+\\|d\\|'>)})
                (command.Simple
                  words: [{<grep>} {<-E>} {(SQ <'^[^|]*/lib/[^|]*\\.so\\.[0-9]+\\|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-OLD>})]
                )
              ]
              negated: F
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_delete>} {<INDEX-OLD>} {<INDEX-NEW>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-NEW>})
                (command.Simple
                  words: [{<grep>} {<-E>} {(SQ <'^[^|]+\\|d\\|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-NEW>})]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-OLD>})
                (command.Simple
                  words: [{<grep>} {<-E>} {(SQ <'^[^|]+\\|d\\|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-OLD>})]
                )
              ]
              negated: F
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_delete>} {<INDEX-OLD>} {<INDEX-NEW>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (C {<rm>} {<INDEX-OLD>} {<INDEX-NEW>})
          ]
        )
    )
    (command.ShFunction
      name: install_setup_rollback
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-f>} 
                          {(${ Id.VSub_Name BDHASH) <-install/kernelfirst>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<rm>} {(${ Id.VSub_Name BDHASH) <-install/kernelfirst>})
                    (C {<rm>} {(${ Id.VSub_Name BDHASH) <-install/kerneldone>})
                  ]
                  spids: [20868 20882]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-f>} 
                          {(${ Id.VSub_Name BDHASH) <-install/worlddone>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(C {<rm>} {(${ Id.VSub_Name BDHASH) <-install/worlddone>})]
                  spids: [20904 20918]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-L>} {(${ Id.VSub_Name BDHASH) <-rollback>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<mv>} {(${ Id.VSub_Name BDHASH) <-rollback>} 
                      {(${ Id.VSub_Name BDHASH) <-install/rollback>}
                    )
                  ]
                  spids: [20933 20947]
                )
              ]
            )
            (C {<mv>} {(${ Id.VSub_Name BDHASH) <-install>} {(${ Id.VSub_Name BDHASH) <-rollback>})
          ]
        )
    )
    (command.ShFunction
      name: install_run
      body: 
        (command.BraceGroup
          children: [
            (C {<echo>} {<-n>} {(DQ <'Installing updates...'>)})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_verify>} {(${ Id.VSub_Name BDHASH) <-install/INDEX-OLD>} 
                  {(${ Id.VSub_Name BDHASH) <-install/INDEX-NEW>}
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_unschg>} {(${ Id.VSub_Name BDHASH) <-install/INDEX-OLD>} 
                  {(${ Id.VSub_Name BDHASH) <-install/INDEX-NEW>}
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_files>} {(${ Id.VSub_Name BDHASH) <-install>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (C {<install_setup_rollback>})
            (C {<echo>} {(DQ <' done.'>)})
          ]
        )
    )
    (command.ShFunction
      name: rollback_setup_rollback
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-L>} 
                          {(${ Id.VSub_Name BDHASH) <-rollback/rollback>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<mv>} {(${ Id.VSub_Name BDHASH) <-rollback/rollback>} {<rollback-tmp>})
                    (C {<rm>} {<-r>} {(${ Id.VSub_Name BDHASH) <-rollback/>})
                    (C {<rm>} {(${ Id.VSub_Name BDHASH) <-rollback>})
                    (C {<mv>} {<rollback-tmp>} {(${ Id.VSub_Name BDHASH) <-rollback>})
                  ]
                  spids: [21102 21116]
                )
              ]
              else_action: [
                (C {<rm>} {<-r>} {(${ Id.VSub_Name BDHASH) <-rollback/>})
                (C {<rm>} {(${ Id.VSub_Name BDHASH) <-rollback>})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: rollback_files
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-NEW>})
                (C {<grep>} {<-E>} {(SQ <'/lib/.*\\.so\\.[0-9]+\\|'>)})
                (C {<cut>} {<-f>} {<1>} {<-d>} {(SQ <'|'>)})
                (command.Simple
                  words: [{<sort>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {<INDEX-NEW.libs.flist>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-OLD>})
                (C {<grep>} {<-E>} {(SQ <'/lib/.*\\.so\\.[0-9]+\\|'>)})
                (C {<sort>} {<-k>} {<1> <Id.Lit_Comma ','> <1>} {<-t>} {(SQ <'|'>)} {<->})
                (command.Simple
                  words: [{<join>} {<-t>} {(SQ <'|'>)} {<-v>} {<1>} {<->} {<INDEX-NEW.libs.flist>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-OLD>})]
                )
              ]
              negated: F
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_from_index>} {<INDEX-OLD>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-OLD>})
                (command.Simple
                  words: [{<grep>} {<-vE>} {(SQ <'/lib/.*\\.so\\.[0-9]+\\|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-OLD>})]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-NEW>})
                (command.Simple
                  words: [{<grep>} {<-vE>} {(SQ <'/lib/.*\\.so\\.[0-9]+\\|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-NEW>})]
                )
              ]
              negated: F
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_from_index>} {<INDEX-OLD>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_delete>} {<INDEX-NEW>} {<INDEX-OLD>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-OLD>})
                (C {<grep>} {<-E>} {(SQ <'/lib/.*\\.so\\.[0-9]+\\|'>)})
                (C {<sort>} {<-k>} {<1> <Id.Lit_Comma ','> <1>} {<-t>} {(SQ <'|'>)} {<->})
                (command.Simple
                  words: [{<join>} {<-t>} {(SQ <'|'>)} {<->} {<INDEX-NEW.libs.flist>}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-OLD>})]
                )
              ]
              negated: F
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_from_index>} {<INDEX-OLD>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-OLD>})
                (command.Simple
                  words: [{<grep>} {<-E>} {(SQ <'/lib/.*\\.so\\.[0-9]+\\|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-OLD>})]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (C {<grep>} {<-vE>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-NEW>})
                (command.Simple
                  words: [{<grep>} {<-E>} {(SQ <'/lib/.*\\.so\\.[0-9]+\\|'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-NEW>})]
                )
              ]
              negated: F
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_delete>} {<INDEX-NEW>} {<INDEX-OLD>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.Simple
              words: [{<grep>} {<-E>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-OLD>}]
              redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-OLD>})]
            )
            (command.Simple
              words: [{<grep>} {<-E>} {(SQ <'^/boot/'>)} {($ Id.VSub_Number '$1') </INDEX-NEW>}]
              redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-NEW>})]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_from_index>} {<INDEX-OLD>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_delete>} {<INDEX-NEW>} {<INDEX-OLD>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-s>} {<INDEX-OLD>} {<-o>} {<-s>} {<INDEX-NEW>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [{<kldxref>} {<-R>} {</boot/>}]
                      redirects: [(redir.Redir op:<Id.Redir_Great '2>'> fd:2 arg_word:{</dev/null>})]
                    )
                  ]
                  spids: [21618 21635]
                )
              ]
            )
            (C {<rm>} {<INDEX-OLD>} {<INDEX-NEW>} {<INDEX-NEW.libs.flist>})
          ]
        )
    )
    (command.ShFunction
      name: rollback_run
      body: 
        (command.BraceGroup
          children: [
            (C {<echo>} {<-n>} {(DQ <'Uninstalling updates...'>)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-L>} {(${ Id.VSub_Name BDHASH) <-install>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<rm>} {<-r>} {(${ Id.VSub_Name BDHASH) <-install/>})
                    (C {<rm>} {(${ Id.VSub_Name BDHASH) <-install>})
                  ]
                  spids: [21696 21710]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_verify>} {(${ Id.VSub_Name BDHASH) <-rollback/INDEX-NEW>} 
                  {(${ Id.VSub_Name BDHASH) <-rollback/INDEX-OLD>}
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_unschg>} {(${ Id.VSub_Name BDHASH) <-rollback/INDEX-NEW>} 
                  {(${ Id.VSub_Name BDHASH) <-rollback/INDEX-OLD>}
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<rollback_files>} {(${ Id.VSub_Name BDHASH) <-rollback>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (C {<rollback_setup_rollback>})
            (C {<echo>} {(DQ <' done.'>)})
          ]
        )
    )
    (command.ShFunction
      name: IDS_compare
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [
                {<cut>}
                {<-f>}
                {<1-5> <Id.Lit_Comma ','> <7-8>}
                {<-d>}
                {(SQ <'|'>)}
                {($ Id.VSub_Number '$1')}
              ]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {($ Id.VSub_Number '$1') <.noflags>}
                )
              ]
            )
            (command.Simple
              words: [
                {<sort>}
                {<-k>}
                {<1> <Id.Lit_Comma ','> <1>}
                {<-t>}
                {(SQ <'|'>)}
                {($ Id.VSub_Number '$1') <.noflags>}
              ]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {($ Id.VSub_Number '$1') <.sorted>}
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {<cut>} {<-f>} {<1-5> <Id.Lit_Comma ','> <7-8>} {<-d>} {(SQ <'|'>)} 
                  {($ Id.VSub_Number '$2')}
                )
                (C {<comm>} {<-13>} {($ Id.VSub_Number '$1') <.noflags>} {<->})
                (C {<fgrep>} {<-v>} {(SQ <'|-|||||'>)})
                (C {<sort>} {<-k>} {<1> <Id.Lit_Comma ','> <1>} {<-t>} {(SQ <'|'>)})
                (command.Simple
                  words: [{<join>} {<-t>} {(SQ <'|'>)} {($ Id.VSub_Number '$1') <.sorted>} {<->}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {<INDEX-NOTMATCHING>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (command.ForEach
                  iter_name: X
                  iter_words: [{(${ Id.VSub_Name IDSIGNOREPATHS)}]
                  do_arg_iter: F
                  body: 
                    (command.DoGroup
                      children: [
                        (C {<grep>} {<-E>} {(DQ <'^'> (${ Id.VSub_Name X))} {<INDEX-NOTMATCHING>})
                      ]
                    )
                )
                (C {<sort>} {<-u>})
                (command.Simple
                  words: [{<comm>} {<-13>} {<->} {<INDEX-NOTMATCHING>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {<INDEX-NOTMATCHING.tmp>}
                    )
                  ]
                )
              ]
              negated: F
            )
            (C {<mv>} {<INDEX-NOTMATCHING.tmp>} {<INDEX-NOTMATCHING>})
            (C {<local>} {<Id.Lit_VarLike 'IFS='> (SQ <'|'>)})
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: 
                    (C {<read>} {<FPATH>} {<TYPE>} {<OWNER>} {<GROUP>} {<PERM>} {<HASH>} {<LINK>} {<P_TYPE>} 
                      {<P_OWNER>} {<P_GROUP>} {<P_PERM>} {<P_HASH>} {<P_LINK>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name TYPE))} 
                                      {<Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name P_TYPE))} {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                  negated: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<echo>} {<-n>} {(DQ (${ Id.VSub_Name FPATH) <' is a '>)})
                            (command.Case
                              to_match: {(DQ (${ Id.VSub_Name P_TYPE))}
                              arms: [
                                (case_arm
                                  pat_list: [{<f>}]
                                  action: [(C {<echo>} {<-n>} {(DQ <'regular file, '>)})]
                                  spids: [22145 22146 22157 -1]
                                )
                                (case_arm
                                  pat_list: [{<d>}]
                                  action: [(C {<echo>} {<-n>} {(DQ <'directory, '>)})]
                                  spids: [22160 22161 22172 -1]
                                )
                                (case_arm
                                  pat_list: [{<L>}]
                                  action: [(C {<echo>} {<-n>} {(DQ <'symlink, '>)})]
                                  spids: [22175 22176 22187 -1]
                                )
                              ]
                            )
                            (C {<echo>} {<-n>} {(DQ <'but should be a '>)})
                            (command.Case
                              to_match: {(DQ (${ Id.VSub_Name TYPE))}
                              arms: [
                                (case_arm
                                  pat_list: [{<f>}]
                                  action: [(C {<echo>} {<-n>} {(DQ <'regular file.'>)})]
                                  spids: [22213 22214 22225 -1]
                                )
                                (case_arm
                                  pat_list: [{<d>}]
                                  action: [(C {<echo>} {<-n>} {(DQ <directory.>)})]
                                  spids: [22228 22229 22240 -1]
                                )
                                (case_arm
                                  pat_list: [{<L>}]
                                  action: [(C {<echo>} {<-n>} {(DQ <symlink.>)})]
                                  spids: [22243 22244 22255 -1]
                                )
                              ]
                            )
                            (C {<echo>})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Continue continue>
                            )
                          ]
                          spids: [22096 22119]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name OWNER))} 
                                      {<Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name P_OWNER))} {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                  negated: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<echo>} {<-n>} 
                              {
                                (DQ (${ Id.VSub_Name FPATH) <' is owned by user id '> 
                                  (${ Id.VSub_Name P_OWNER) <', '>
                                )
                              }
                            )
                            (C {<echo>} 
                              {(DQ <'but should be owned by user id '> (${ Id.VSub_Name OWNER) <.>)}
                            )
                          ]
                          spids: [22284 22307]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name GROUP))} 
                                      {<Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name P_GROUP))} {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                  negated: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<echo>} {<-n>} 
                              {
                                (DQ (${ Id.VSub_Name FPATH) <' is owned by group id '> 
                                  (${ Id.VSub_Name P_GROUP) <', '>
                                )
                              }
                            )
                            (C {<echo>} 
                              {(DQ <'but should be owned by group id '> (${ Id.VSub_Name GROUP) <.>)}
                            )
                          ]
                          spids: [22345 22368]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.AndOr
                                  ops: [Id.Op_DAmp]
                                  children: [
                                    (command.Pipeline
                                      children: [
                                        (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name PERM))} 
                                          {<Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name P_PERM))} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                      negated: T
                                    )
                                    (command.Pipeline
                                      children: [
                                        (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name TYPE))} 
                                          {<Id.Lit_Equals '='>} {(DQ <L>)} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                      negated: T
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<echo>} {<-n>} 
                              {
                                (DQ (${ Id.VSub_Name FPATH) <' has '> (${ Id.VSub_Name P_PERM) 
                                  <' permissions, '>
                                )
                              }
                            )
                            (C {<echo>} 
                              {(DQ <'but should have '> (${ Id.VSub_Name PERM) <' permissions.'>)}
                            )
                          ]
                          spids: [22418 22462]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name HASH))} 
                                      {<Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name P_HASH))} {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                  negated: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name TYPE))} 
                                          {<Id.Lit_Equals '='>} {(DQ <L>)} {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (C {<echo>} {<-n>} 
                                      {
                                        (DQ (${ Id.VSub_Name FPATH) <' is a symlink to '> 
                                          (${ Id.VSub_Name P_HASH) <', '>
                                        )
                                      }
                                    )
                                    (C {<echo>} 
                                      {
                                        (DQ <'but should be a symlink to '> (${ Id.VSub_Name HASH) <.>)
                                      }
                                    )
                                  ]
                                  spids: [22526 22545]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name TYPE))} 
                                          {<Id.Lit_Equals '='>} {(DQ <f>)} {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (C {<echo>} {<-n>} 
                                      {
                                        (DQ (${ Id.VSub_Name FPATH) <' has SHA256 hash '> 
                                          (${ Id.VSub_Name P_HASH) <', '>
                                        )
                                      }
                                    )
                                    (C {<echo>} 
                                      {
                                        (DQ <'but should have SHA256 hash '> (${ Id.VSub_Name HASH) <.>)
                                      }
                                    )
                                  ]
                                  spids: [22578 22597]
                                )
                              ]
                            )
                          ]
                          spids: [22500 22523]
                        )
                      ]
                    )
                  ]
                )
              redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<INDEX-NOTMATCHING>})]
            )
            (C {<rm>} {($ Id.VSub_Number '$1')} {($ Id.VSub_Number '$1') <.noflags>} 
              {($ Id.VSub_Number '$1') <.sorted>} {($ Id.VSub_Number '$2')} {<INDEX-NOTMATCHING>}
            )
          ]
        )
    )
    (command.ShFunction
      name: IDS_run
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<workdir_init>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [(C {<fetch_pick_server_init>}) (C {<fetch_pick_server>})]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: (command.Pipeline children:[(C {<fetch_key>})] negated:T)
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<fetch_pick_server>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                  ]
                )
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: (command.Pipeline children:[(C {<fetch_tag>})] negated:T)
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<fetch_pick_server>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                    )
                  ]
                )
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_tagsanity>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_metadata>} {<INDEX-OLD>} {<INDEX-ALL>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_filter_metadata>} {<INDEX-OLD>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_filter_metadata>} {<INDEX-ALL>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.Simple
              words: [{<sort>} {<INDEX-OLD>} {<INDEX-ALL>}]
              redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<INDEX-ALL.tmp>})]
            )
            (C {<mv>} {<INDEX-ALL.tmp>} {<INDEX-ALL>})
            (C {<rm>} {<INDEX-OLD>})
            (C {<fetch_filter_kernel_names>} {<INDEX-ALL>} {(${ Id.VSub_Name KERNCONF)})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_inspect_system>} {<INDEX-ALL>} {<INDEX-PRESENT>} {</dev/null>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (C {<IDS_compare>} {<INDEX-ALL>} {<INDEX-PRESENT>})
          ]
        )
    )
    (command.ShFunction
      name: get_params
      body: 
        (command.BraceGroup
          children: [
            (C {<init_params>})
            (C {<parse_cmdline>} {($ Id.VSub_At '$@')})
            (C {<parse_conffile>})
            (C {<default_params>})
          ]
        )
    )
    (command.ShFunction
      name: cmd_fetch
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-t>} {<0>} {<-a>} 
                          {($ Id.VSub_DollarName '$NOTTYOK')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-n>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <' fetch should not '>
                        )
                      }
                    )
                    (C {<echo>} {(DQ <'be run non-interactively.'>)})
                    (C {<echo>} 
                      {
                        (DQ <'Run '> 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <' cron instead.'>
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [22952 22973]
                )
              ]
            )
            (C {<fetch_check_params>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<fetch_run>})
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: cmd_cron
      body: 
        (command.BraceGroup
          children: [
            (C {<fetch_check_params>})
            (C {<sleep>} 
              {
                (command_sub
                  left_token: <Id.Left_Backtick '`'>
                  command_list: 
                    (command.CommandList
                      children: [(C {<jot>} {<-r>} {<1>} {<0>} {<3600>})]
                    )
                )
              }
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:TMPFILE)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<mktemp>} {</tmp/freebsd-update.XXXXXX>})]
                              )
                          )
                        }
                      spids: [23077]
                    )
                  ]
                )
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DPipe Id.Op_DPipe]
                          children: [
                            (command.Pipeline
                              children: [
                                (command.Simple
                                  words: [{<fetch_run>}]
                                  redirects: [
                                    (redir.Redir
                                      op: <Id.Redir_DGreat '>>'>
                                      fd: -1
                                      arg_word: {(${ Id.VSub_Name TMPFILE)}
                                    )
                                  ]
                                )
                              ]
                              negated: T
                            )
                            (command.Pipeline
                              children: [
                                (C {<grep>} {<-q>} {(DQ <'No updates needed'>)} 
                                  {(${ Id.VSub_Name TMPFILE)}
                                )
                              ]
                              negated: T
                            )
                            (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name VERBOSELEVEL)} 
                              {<Id.Lit_Equals '='>} {(DQ <debug>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [
                        {<mail>}
                        {<-s>}
                        {
                          (DQ 
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              command_list: (command.CommandList children:[(C {<hostname>})])
                            ) <' security updates'>
                          )
                        }
                        {(${ Id.VSub_Name MAILTO)}
                      ]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Less '<'>
                          fd: -1
                          arg_word: {(${ Id.VSub_Name TMPFILE)}
                        )
                      ]
                    )
                  ]
                  spids: [23093 23140]
                )
              ]
            )
            (C {<rm>} {(${ Id.VSub_Name TMPFILE)})
          ]
        )
    )
    (command.ShFunction
      name: cmd_upgrade
      body: 
        (command.BraceGroup
          children: [
            (C {<upgrade_check_params>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<upgrade_run>})
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: cmd_install
      body: 
        (command.BraceGroup
          children: [
            (C {<install_check_params>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<install_run>})
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: cmd_rollback
      body: 
        (command.BraceGroup
          children: [
            (C {<rollback_check_params>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<rollback_run>})
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: cmd_IDS
      body: 
        (command.BraceGroup
          children: [
            (C {<IDS_check_params>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<IDS_run>})
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
          ]
        )
    )
    (C {<export>} 
      {<Id.Lit_VarLike 'PATH='> </sbin> <Id.Lit_Other ':'> </bin> <Id.Lit_Other ':'> </usr/sbin> 
        <Id.Lit_Other ':'> </usr/bin> <Id.Lit_Other ':'> (${ Id.VSub_Name PATH)
      }
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$PAGER'))} 
                  {<Id.Lit_RBracket ']'>}
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:PAGER)
                  op: assign_op.Equal
                  rhs: {</usr/bin/more>}
                  spids: [23322]
                )
              ]
            )
          ]
          spids: [23306 23319]
        )
      ]
    )
    (C {<export>} {<Id.Lit_VarLike 'LC_ALL='> <C>})
    (C {<get_params>} {($ Id.VSub_At '$@')})
    (command.ForEach
      iter_name: COMMAND
      iter_words: [{(${ Id.VSub_Name COMMANDS)}]
      do_arg_iter: F
      body: (command.DoGroup children:[(C {<cmd_> (${ Id.VSub_Name COMMAND)})])
    )
  ]
)