(command.ShFunction
  name: __save_ebuild_env
  body: 
    (BraceGroup
      children: [
        (command.Subshell
          child: 
            (command.CommandList
              children: [
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: (C {<has>} {<--exclude-init-phases>} {($ Id.VSub_Star '$*')})
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (C {<unset>} {<S>} {<_E_DOCDESTTREE_>} {<_E_EXEDESTTREE_>} 
                          {<PORTAGE_DOCOMPRESS_SIZE_LIMIT>} {<PORTAGE_DOCOMPRESS>} {<PORTAGE_DOCOMPRESS_SKIP>}
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.LogicalAnd
                                              left: 
                                                (bool_expr.Unary
                                                  op_id: Id.BoolUnary_n
                                                  child: {($ Id.VSub_DollarName '$PYTHONPATH')}
                                                )
                                              right: 
                                                (bool_expr.Binary
                                                  op_id: Id.BoolBinary_ef
                                                  left: 
                                                    {
                                                      (braced_var_sub
                                                        token: <Id.VSub_Name PYTHONPATH>
                                                        suffix_op: 
                                                          (suffix_op.Unary
                                                            tok: <Id.VOp1_DPercent '%%'>
                                                            arg_word: {<':'> <Id.Lit_Other '*'>}
                                                          )
                                                      )
                                                    }
                                                  right: {($ Id.VSub_DollarName '$PORTAGE_PYM_PATH')}
                                                )
                                            )
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (command.Sentence
                                              child: 
                                                (command.DBracket
                                                  expr: 
                                                    (bool_expr.Binary
                                                      op_id: Id.BoolBinary_GlobDEqual
                                                      left: {($ Id.VSub_DollarName '$PYTHONPATH')}
                                                      right: 
                                                        {<Id.Lit_Other '*'> <Id.Lit_Colon ':'> 
                                                          <Id.Lit_Other '*'>
                                                        }
                                                    )
                                                )
                                              terminator: <Id.Op_Semi _>
                                            )
                                          ]
                                        )
                                      action: [
                                        (C {<export>} 
                                          {<Id.Lit_VarLike 'PYTHONPATH='> 
                                            (braced_var_sub
                                              token: <Id.VSub_Name PYTHONPATH>
                                              suffix_op: 
                                                (suffix_op.Unary
                                                  tok: <Id.VOp1_Pound '#'>
                                                  arg_word: {<Id.Lit_Other '*'> <':'>}
                                                )
                                            )
                                          }
                                        )
                                      ]
                                      spids: [105 121]
                                    )
                                  ]
                                  else_action: [(C {<unset>} {<PYTHONPATH>})]
                                )
                              ]
                              spids: [76 102]
                            )
                          ]
                        )
                      ]
                      spids: [44 54]
                    )
                  ]
                )
                (C {<unset>} {<COLORTERM>} {<DISPLAY>} {<EDITOR>} {<LESS>} {<LESSOPEN>} {<LOGNAME>} 
                  {<LS_COLORS>} {<PAGER>} {<TERM>} {<TERMCAP>} {<USER>} {<ftp_proxy>} {<http_proxy>} {<no_proxy>}
                )
                (C {<unset>} {<CVS_RSH>} {<ECHANGELOG_USER>} {<GPG_AGENT_INFO>} {<SSH_AGENT_PID>} 
                  {<SSH_AUTH_SOCK>} {<STY>} {<WINDOW>} {<XAUTHORITY>}
                )
                (C {<unset>} 
                  {
                    (braced_var_sub
                      token: <Id.VSub_Name CCACHE_>
                      prefix_op: (Id.VSub_Bang)
                      suffix_op: <Id.VOp3_Star '*'>
                    )
                  } {(braced_var_sub token:<Id.VSub_Name DISTCC_> prefix_op:(Id.VSub_Bang) suffix_op:<Id.VOp3_Star '*'>)}
                )
                (command.ForEach
                  iter_name: x
                  iter_words: [
                    {<pkg_setup>}
                    {<pkg_nofetch>}
                    {<src_unpack>}
                    {<src_prepare>}
                    {<src_configure>}
                    {<src_compile>}
                    {<src_test>}
                    {<src_install>}
                    {<pkg_preinst>}
                    {<pkg_postinst>}
                    {<pkg_prerm>}
                    {<pkg_postrm>}
                    {<pkg_config>}
                    {<pkg_info>}
                    {<pkg_pretend>}
                  ]
                  do_arg_iter: F
                  body: 
                    (command.DoGroup
                      children: [
                        (C {<unset>} {<-f>} {<default_> ($ Id.VSub_DollarName '$x')} 
                          (word.BracedTree
                            parts: [
                              <__eapi>
                              (word_part.BracedTuple
                                words: [{<0>} {<1>} {<2>} {<3>} {<4>}]
                              )
                              <Id.Lit_Underscore _>
                              ($ Id.VSub_DollarName '$x')
                            ]
                          )
                        )
                      ]
                    )
                )
                (C {<unset>} {<x>})
                (C {<unset>} {<-f>} {<assert>} {<__assert_sigpipe_ok>} {<__dump_trace>} {<die>} 
                  {<__quiet_mode>} {<__vecho>} {<__elog_base>} {<eqawarn>} {<elog>} {<einfo>} {<einfon>} {<ewarn>} {<eerror>} {<ebegin>} 
                  {<__eend>} {<eend>} {<KV_major>} {<KV_minor>} {<KV_micro>} {<KV_to_int>} {<get_KV>} {<has>} 
                  {<__has_phase_defined_up_to>} {<hasv>} {<hasq>} {<__qa_source>} {<__qa_call>} {<addread>} {<addwrite>} {<adddeny>} {<addpredict>} 
                  {<__sb_append_var>} {<use>} {<usev>} {<useq>} {<has_version>} {<portageq>} {<best_version>} {<use_with>} {<use_enable>} 
                  {<register_die_hook>} {<unpack>} {<__strip_duplicate_slashes>} {<econf>} {<einstall>} {<__dyn_setup>} {<__dyn_unpack>} 
                  {<__dyn_clean>} {<into>} {<insinto>} {<exeinto>} {<docinto>} {<insopts>} {<diropts>} {<exeopts>} {<libopts>} {<docompress>} 
                  {<__abort_handler>} {<__abort_prepare>} {<__abort_configure>} {<__abort_compile>} {<__abort_test>} {<__abort_install>} 
                  {<__dyn_prepare>} {<__dyn_configure>} {<__dyn_compile>} {<__dyn_test>} {<__dyn_install>} {<__dyn_pretend>} {<__dyn_help>} 
                  {<debug-print>} {<debug-print-function>} {<debug-print-section>} {<__helpers_die>} {<inherit>} {<EXPORT_FUNCTIONS>} 
                  {<nonfatal>} {<register_success_hook>} {<__hasg>} {<__hasgq>} {<__save_ebuild_env>} {<__set_colors>} 
                  {<__filter_readonly_variables>} {<__preprocess_ebuild_env>} {<__repo_attr>} {<__source_all_bashrcs>} {<__ebuild_main>} {<__ebuild_phase>} 
                  {<__ebuild_phase_with_hooks>} {<__ebuild_arg_to_phase>} {<__ebuild_phase_funcs>} {<default>} {<__unpack_tar>} {<__unset_colors>} 
                  {<__source_env_files>} {<__try_source>} {<__check_bash_version>} {<__bashpid>} {<__start_distcc>} {<__eqaquote>} {<__eqatag>} 
                  {(${ Id.VSub_Name QA_INTERCEPTORS)}
                )
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [(C {<___eapi_has_usex>}) (C {<unset>} {<-f>} {<usex>})]
                )
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (C {<___eapi_has_master_repositories>})
                    (C {<unset>} {<-f>} {<master_repositories>})
                  ]
                )
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (C {<___eapi_has_repository_path>})
                    (C {<unset>} {<-f>} {<repository_path>})
                  ]
                )
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (C {<___eapi_has_available_eclasses>})
                    (C {<unset>} {<-f>} {<available_eclasses>})
                  ]
                )
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [(C {<___eapi_has_eclass_path>}) (C {<unset>} {<-f>} {<eclass_path>})]
                )
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [(C {<___eapi_has_license_path>}) (C {<unset>} {<-f>} {<license_path>})]
                )
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (C {<___eapi_has_package_manager_build_user>})
                    (C {<unset>} {<-f>} {<package_manager_build_user>})
                  ]
                )
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (C {<___eapi_has_package_manager_build_group>})
                    (C {<unset>} {<-f>} {<package_manager_build_group>})
                  ]
                )
                (C {<unset>} {<-f>} 
                  {
                    (command_sub
                      left_token: <Id.Left_DollarParen '$('>
                      child: (C {<compgen>} {<-A>} {<Id.KW_Function function>} {<___>})
                    )
                  }
                )
                (C {<unset>} 
                  {
                    (braced_var_sub
                      token: <Id.VSub_Name ___>
                      prefix_op: (Id.VSub_Bang)
                      suffix_op: <Id.VOp3_Star '*'>
                    )
                  }
                )
                (C {<unset>} {<ACCEPT_LICENSE>} {<BAD>} {<BRACKET>} {<BUILD_PREFIX>} {<COLS>} {<DISTDIR>} 
                  {<DOC_SYMLINKS_DIR>} {<EBUILD_FORCE_TEST>} {<EBUILD_MASTER_PID>} {<ECLASS_DEPTH>} {<ENDCOL>} {<FAKEROOTKEY>} {<GOOD>} {<HILITE>} 
                  {<HOME>} {<LAST_E_CMD>} {<LAST_E_LEN>} {<LD_PRELOAD>} {<MISC_FUNCTIONS_ARGS>} {<MOPREFIX>} {<NOCOLOR>} {<NORMAL>} 
                  {<PKGDIR>} {<PKGUSE>} {<PKG_LOGDIR>} {<PKG_TMPDIR>} {<PORTAGE_BASHRC_FILES>} {<PORTAGE_BASHRCS_SOURCED>} 
                  {<PORTAGE_COMPRESS>} {<PORTAGE_COMPRESS_EXCLUDE_SUFFIXES>} {<PORTAGE_DOHTML_UNWARNED_SKIPPED_EXTENSIONS>} 
                  {<PORTAGE_DOHTML_UNWARNED_SKIPPED_FILES>} {<PORTAGE_DOHTML_WARN_ON_SKIPPED_FILES>} {<PORTAGE_NONFATAL>} {<PORTAGE_QUIET>} {<PORTAGE_SANDBOX_DENY>} 
                  {<PORTAGE_SANDBOX_PREDICT>} {<PORTAGE_SANDBOX_READ>} {<PORTAGE_SANDBOX_WRITE>} {<PORTAGE_SOCKS5_PROXY>} {<PREROOTPATH>} 
                  {<QA_INTERCEPTORS>} {<RC_DEFAULT_INDENT>} {<RC_DOT_PATTERN>} {<RC_ENDCOL>} {<RC_INDENTATION>} {<ROOT>} {<ROOTPATH>} {<RPMDIR>} 
                  {<TEMP>} {<TMP>} {<TMPDIR>} {<USE_EXPAND>} {<WARN>} {<XARGS>} {<_RC_GET_KV_CACHE>}
                )
                (C {<unset>} {<DOC_SYMLINKS_DIR>} {<INSTALL_MASK>} {<PKG_INSTALL_MASK>})
                (C {<declare>} {<-p>})
                (C {<declare>} {<-fp>})
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobDEqual
                                      left: 
                                        {
                                          (braced_var_sub
                                            token: <Id.VSub_Name BASH_VERSINFO>
                                            bracket_op: 
                                              (bracket_op.ArrayIndex
                                                expr: {<Id.Lit_Digits 0>}
                                              )
                                          )
                                        }
                                      right: {<3>}
                                    )
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [(C {<export>})]
                      spids: [897 915]
                    )
                  ]
                )
              ]
            )
        )
      ]
    )
)