(CommandList
  children: [
    (FuncDef
      name: uninstall_command
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:plugin_name)
                  op: Equal
                  rhs: {($ VSub_Number "$1")}
                  spids: [9]
                )
              ]
              spids: [7]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:full_version)
                  op: Equal
                  rhs: {($ VSub_Number "$2")}
                  spids: [15]
                )
              ]
              spids: [13]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:plugin_path) op:Equal spids:[21])]
              spids: [19]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:plugin_path)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(get_plugin_path)} {(DQ ($ VSub_Name "$plugin_name"))})]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [25 31]
                      )
                    }
                  spids: [24]
                )
              ]
              spids: [24]
            )
            (C {(check_if_plugin_exists)} {(DQ ($ VSub_Name "$plugin_name"))})
            (SimpleCommand
              words: [{(read)} {(-r)} {(-a)} {(version_info)}]
              redirects: [
                (Redir
                  op_id: Redir_TLess
                  fd: -1
                  arg_word: {(DQ ($ VSub_Name "$full_version"))}
                  spids: [56]
                )
              ]
              more_env: [(env_pair name:IFS val:{(SQ <":">)} spids:[43])]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} 
                          {
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name version_info>
                                bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)}))
                                spids: [68 73]
                              )
                            )
                          } {(Lit_Other "=")} {(DQ (ref))} {(Lit_Other "]")}
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:install_type)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (BracedVarSub
                                  token: <VSub_Name version_info>
                                  bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)}))
                                  spids: [92 97]
                                )
                              )
                            }
                          spids: [90]
                        )
                      ]
                      spids: [88]
                    )
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:version)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (BracedVarSub
                                  token: <VSub_Name version_info>
                                  bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 1)}))
                                  spids: [105 110]
                                )
                              )
                            }
                          spids: [103]
                        )
                      ]
                      spids: [101]
                    )
                  ]
                  spids: [-1 85]
                )
              ]
              else_action: [
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:install_type)
                      op: Equal
                      rhs: {(DQ (version))}
                      spids: [119]
                    )
                  ]
                  spids: [117]
                )
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:version)
                      op: Equal
                      rhs: 
                        {
                          (DQ 
                            (BracedVarSub
                              token: <VSub_Name version_info>
                              bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)}))
                              spids: [129 134]
                            )
                          )
                        }
                      spids: [127]
                    )
                  ]
                  spids: [125]
                )
              ]
              spids: [114 138]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:install_path) op:Equal spids:[144])]
              spids: [142]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:install_path)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(get_install_path)} {(DQ ($ VSub_Name "$plugin_name"))} 
                                {(DQ ($ VSub_Name "$install_type"))} {(DQ ($ VSub_Name "$version"))}
                              )
                            ]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [148 162]
                      )
                    }
                  spids: [147]
                )
              ]
              spids: [147]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(KW_Bang "!")} {(-d)} {(DQ ($ VSub_Name "$install_path"))} 
                          {(Lit_Other "]")}
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [(C {(display_error)} {(DQ ("No such version"))}) (C {(exit)} {(1)})]
                  spids: [-1 181]
                )
              ]
              spids: [-1 196]
            )
            (C {(remove_shims_for_version)} {(DQ ($ VSub_Name "$plugin_name"))} 
              {(DQ ($ VSub_Name "$full_version"))}
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-f)} {(DQ (${ VSub_Name plugin_path) (/bin/uninstall))} 
                          {(Lit_Other "]")}
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Subshell
                      child: 
                        (CommandList
                          children: [
                            (C {(export)} 
                              {(Lit_VarLike "ASDF_INSTALL_TYPE=") ($ VSub_Name "$install_type")}
                            )
                            (C {(export)} 
                              {(Lit_VarLike "ASDF_INSTALL_VERSION=") ($ VSub_Name "$version")}
                            )
                            (C {(export)} 
                              {(Lit_VarLike "ASDF_INSTALL_PATH=") ($ VSub_Name "$install_path")}
                            )
                            (C {(bash)} {(DQ (${ VSub_Name plugin_path) (/bin/uninstall))})
                          ]
                        )
                      spids: [231 262]
                    )
                  ]
                  spids: [-1 228]
                )
              ]
              else_action: [(C {(rm)} {(-rf)} {(DQ ($ VSub_Name "$install_path"))})]
              spids: [265 277]
            )
          ]
          spids: [4]
        )
      spids: [0 3]
    )
  ]
)