(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<test>} {(DQ <x> ($ Id.VSub_Number '$1'))} {<Id.Lit_Equals '='>} {(DQ <x>)} {<-o>} 
                      {(DQ <x> ($ Id.VSub_Number '$2'))} {<Id.Lit_Equals '='>} {(DQ <x>)} {<-o>} {(DQ <x> ($ Id.VSub_Number '$3'))} {<Id.Lit_Equals '='>} {(DQ <x>)}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Usage: ssh2putty hostname port ssh-private-key'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [7 50]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:HOST)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number '$1')}
          spids: [67]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PORT)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number '$2')}
          spids: [70]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:KEYFILE)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number '$3')}
          spids: [73]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      words: [
                        {<grep>}
                        {(DQ <'BEGIN RSA PRIVATE KEY'>)}
                        {($ Id.VSub_DollarName '$KEYFILE')}
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                      ]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<Id.Lit_Colon ':'>})]
          spids: [80 98]
        )
      ]
      else_action: [
        (C {<echo>} {(DQ <'Unsupported private key format'>)})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:public_exponent)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<openssl>} {<rsa>} {<-noout>} {<-text>} {<-in>} 
                        {($ Id.VSub_DollarName '$KEYFILE')}
                      )
                      (C {<grep>} {<Id.Lit_Other '^'> <publicExponent>})
                      (C {<sed>} {(SQ <'s/.*(//;s/).*//'>)})
                    ]
                    negated: F
                  )
              )
            }
          spids: [120]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<test>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:modulus)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<openssl>} {<rsa>} {<-noout>} {<-modulus>} {<-in>} 
                        {($ Id.VSub_DollarName '$KEYFILE')}
                      )
                      (C {<grep>} {<Id.Lit_Other '^'> <Id.Lit_VarLike 'Modulus='>})
                      (C {<sed>} {(SQ <'s/^Modulus=/0x/'>)})
                      (C {<tr>} {<A-Z>} {<a-z>})
                    ]
                    negated: F
                  )
              )
            }
          spids: [173]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<test>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
    (C {<echo>} 
      {
        (DQ <'rsa2@'> ($ Id.VSub_DollarName '$PORT') <':'> ($ Id.VSub_DollarName '$HOST') <' '> 
          ($ Id.VSub_DollarName '$public_exponent') <','> ($ Id.VSub_DollarName '$modulus')
        )
      }
    )
  ]
)