(command.CommandList children: [ (command.ShFunction name: sort_list body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Arith_NEqual left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (C {(typeset)} {(-i)} {(Lit_VarLike 'left=') ($ VSub_Number '$1')}) (command.AndOr ops: [Op_DPipe Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike left>) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) ) (command.DParen child: (arith_expr.Binary op_id: Arith_DEqual left: (arith_expr.ArithWord w:{(Lit_Digits 0)}) right: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name list> prefix_op: VSub_Pound bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) } ) ) ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(2)}) ] ) (C {(typeset)} {(-i)} {(Lit_VarLike 'right=') ($ VSub_Number '$2')}) (command.AndOr ops: [Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Arith_GreatEqual left: (arith_expr.VarRef token:<Lit_ArithVarLike right>) right: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name list> prefix_op: VSub_Pound bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) } ) ) ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(3)}) ] ) (command.Sentence child: (C {(typeset)} {(-i)} {(Lit_VarLike 'i=') ($ VSub_DollarName '$left')}) terminator: <Op_Semi ';'> ) (C {(typeset)} {(-i)} {(Lit_VarLike 'j=') ($ VSub_DollarName '$right')}) (command.Sentence child: (C {(typeset)} {(-i)} {(mid)}) terminator: <Op_Semi ';'> ) (command.DParen child: (arith_expr.BinaryAssign op_id: Arith_Equal left: (sh_lhs_expr.Name name:mid) right: (arith_expr.Binary op_id: Arith_Slash left: (arith_expr.Binary op_id: Arith_Plus left: (arith_expr.VarRef token:<Lit_ArithVarLike left>) right: (arith_expr.VarRef token:<Lit_ArithVarLike right>) ) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) ) (command.Sentence child: (C {(typeset)} {(partition_item)}) terminator: <Op_Semi ';'> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:partition_item) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name list> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$mid')}) ) ) ) } ) ] ) (C {(typeset)} {(temp)}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_Great left: (arith_expr.VarRef token:<Lit_ArithVarLike j>) right: (arith_expr.VarRef token:<Lit_ArithVarLike i>) ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:item) op: Equal rhs: { (braced_var_sub token: <VSub_Name list> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.VarRef token:<Lit_ArithVarLike i>) ) ) } ) ] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Op_Less left: { (DQ (braced_var_sub token: <VSub_Name list> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$i')}) ) ) ) } right: {(DQ ($ VSub_DollarName '$partition_item'))} ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.DParen child: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) ) ] ) ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Op_Great left: { (DQ (braced_var_sub token: <VSub_Name list> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$j')}) ) ) ) } right: {(DQ ($ VSub_DollarName '$partition_item'))} ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.DParen child: (arith_expr.UnaryAssign op_id: Node_PostDMinus child: (sh_lhs_expr.Name name:j) ) ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_LessEqual left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.VarRef token:<Lit_ArithVarLike j>) ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:temp) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name list> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$i')} ) ) ) ) } ) ] ) terminator: <Op_Semi ';'> ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: list index: (arith_expr.ArithWord w:{($ VSub_DollarName '$i')}) ) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name list> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$j')} ) ) ) ) } ) ] ) terminator: <Op_Semi ';'> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: list index: (arith_expr.ArithWord w:{($ VSub_DollarName '$j')}) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$temp'))} ) ] ) (command.DParen child: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) ) (command.DParen child: (arith_expr.UnaryAssign op_id: Node_PostDMinus child: (sh_lhs_expr.Name name:j) ) ) ] ) ] ) ] ) ) (command.AndOr ops: [Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike left>) right: (arith_expr.VarRef token:<Lit_ArithVarLike j>) ) ) (C {(sort_list)} {($ VSub_DollarName '$left')} {($ VSub_DollarName '$j')}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Arith_Great left: (arith_expr.VarRef token:<Lit_ArithVarLike right>) right: (arith_expr.VarRef token:<Lit_ArithVarLike i>) ) ) (C {(sort_list)} {($ VSub_DollarName '$i')} {($ VSub_DollarName '$right')}) ] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {($ VSub_Number '$0')} right: {(Lit_Other '*') (sorting.sh)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id:BoolUnary_n child:{($ VSub_DollarName '$ZSH_VERSION')}) ) (C {(setopt)} {(ksharrays)}) ] ) (C {(typeset)} {(-a)} {(list)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:list) op: Equal rhs: {(sh_array_literal left:<Op_LParen '('>)} ) ] ) (C {(sort_list)} {(-1)} {(0)}) (C {(typeset)} {(-p)} {(list)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:list) op: Equal rhs: {(sh_array_literal left:<Op_LParen '('> words:[{(SQ <one>)}])} ) ] ) (C {(typeset)} {(-p)} {(list)}) (C {(sort_list)} {(0)} {(0)}) (C {(typeset)} {(-p)} {(list)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:list) op: Equal rhs: { (sh_array_literal left: <Op_LParen '('> words: [{(SQ <one>)} {(SQ <two>)} {(SQ <three>)}] ) } ) ] ) (C {(sort_list)} {(0)} {(2)}) (C {(typeset)} {(-p)} {(list)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:list) op: Equal rhs: {(sh_array_literal left:<Op_LParen '('> words:[{(4)} {(3)} {(2)} {(1)}])} ) ] ) (C {(sort_list)} {(0)} {(3)}) (C {(typeset)} {(-p)} {(list)}) ] ) ] ) ] )