(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:tid)
          op: assign_op.Equal
          rhs: {(DQ <'address match'>)}
          spids: [7]
        )
      ]
    )
    (C {<mv>} {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>} 
      {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy_bak'>}
    )
    (command.ShFunction
      name: run_trial
      body: 
        (BraceGroup
          children: [
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:user)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [29]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:addr)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$2'))}
                      spids: [35]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:host)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$3'))}
                      spids: [41]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:laddr)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$4'))}
                      spids: [47]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:lport)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$5'))}
                  spids: [53]
                )
              ]
            )
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:expected)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$6'))}
                      spids: [59]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:descr)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$7'))}
                  spids: [65]
                )
              ]
            )
            (C {<verbose>} 
              {
                (DQ <'test '> ($ Id.VSub_DollarName '$descr') <' for '> ($ Id.VSub_DollarName '$user') 
                  <' '> ($ Id.VSub_DollarName '$addr') <' '> ($ Id.VSub_DollarName '$host')
                )
              }
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:result)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {(${ Id.VSub_Name SSHD)} {<-f>} 
                                {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>} {<-T>} {<-C>} 
                                {<Id.Lit_VarLike 'user='> (${ Id.VSub_Name user) <Id.Lit_Comma ','> 
                                  <Id.Lit_VarLike 'addr='> (${ Id.VSub_Name addr) <Id.Lit_Comma ','> <Id.Lit_VarLike 'host='> (${ Id.VSub_Name host) 
                                  <Id.Lit_Comma ','> <Id.Lit_VarLike 'laddr='> (${ Id.VSub_Name laddr) <Id.Lit_Comma ','> <Id.Lit_VarLike 'lport='> 
                                  (${ Id.VSub_Name lport)
                                }
                              )
                              (C {<awk>} {(SQ <'/^forcecommand/ {print $2}'>)})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [86]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$result'))} 
                              {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName '$expected'))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<fail>} 
                      {
                        (DQ <'failed \''> ($ Id.VSub_DollarName '$descr') <'\' expected '> 
                          ($ Id.VSub_DollarName '$expected') <' got '> ($ Id.VSub_DollarName '$result')
                        )
                      }
                    )
                  ]
                  spids: [148 166]
                )
              ]
            )
          ]
        )
    )
    (C {<cp>} {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy_bak'>} 
      {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>}
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir
          op: <Id.Redir_DGreat '>>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>}
        )
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOD>}
              here_end_span_id: 213
              stdin_parts: [
                <'ForceCommand nomatch\n'>
                <'Match Address 192.168.0.0/16,!192.168.30.0/24,10.0.0.0/8,host.example.com\n'>
                <'\tForceCommand match1\n'>
                <'Match Address 1.1.1.1,::1,!::3,2000::/16\n'>
                <'\tForceCommand match2\n'>
                <'Match LocalAddress 127.0.0.1,::1\n'>
                <'\tForceCommand match3\n'>
                <'Match LocalPort 5678\n'>
                <'\tForceCommand match4\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (C {<run_trial>} {<user>} {<192.168.0.1>} {<somehost>} {<1.2.3.4>} {<1234>} {<match1>} 
      {(DQ <'first entry'>)}
    )
    (C {<run_trial>} {<user>} {<192.168.30.1>} {<somehost>} {<1.2.3.4>} {<1234>} {<nomatch>} 
      {(DQ <'negative match'>)}
    )
    (C {<run_trial>} {<user>} {<19.0.0.1>} {<somehost>} {<1.2.3.4>} {<1234>} {<nomatch>} {(DQ <'no match'>)})
    (C {<run_trial>} {<user>} {<10.255.255.254>} {<somehost>} {<1.2.3.4>} {<1234>} {<match1>} 
      {(DQ <'list middle'>)}
    )
    (C {<run_trial>} {<user>} {<192.168.30.1>} {<192.168.0.1>} {<1.2.3.4>} {<1234>} {<nomatch>} 
      {(DQ <'faked IP in hostname'>)}
    )
    (C {<run_trial>} {<user>} {<1.1.1.1>} {<somehost.example.com>} {<1.2.3.4>} {<1234>} {<match2>} 
      {(DQ <'bare IP4 address'>)}
    )
    (C {<run_trial>} {<user>} {<19.0.0.1>} {<somehost>} {<127.0.0.1>} {<1234>} {<match3>} 
      {(DQ <localaddress>)}
    )
    (C {<run_trial>} {<user>} {<19.0.0.1>} {<somehost>} {<1.2.3.4>} {<5678>} {<match4>} {(DQ <localport>)})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<test>} {(DQ ($ Id.VSub_DollarName '$TEST_SSH_IPV6'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <no>)}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<run_trial>} {<user>} {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <1>} 
              {<somehost.example.com>} {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <2>} {<1234>} {<match2>} {(DQ <'bare IP6 address'>)}
            )
            (C {<run_trial>} {<user>} {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <2>} {<somehost.exaple.com>} 
              {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <2>} {<1234>} {<nomatch>} {(DQ <'deny IPv6'>)}
            )
            (C {<run_trial>} {<user>} {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <3>} {<somehost>} 
              {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <2>} {<1234>} {<nomatch>} {(DQ <'IP6 negated'>)}
            )
            (C {<run_trial>} {<user>} {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <4>} {<somehost>} 
              {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <2>} {<1234>} {<nomatch>} {(DQ <'IP6 no match'>)}
            )
            (C {<run_trial>} {<user>} {<2000> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <1>} {<somehost>} 
              {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <2>} {<1234>} {<match2>} {(DQ <'IP6 network'>)}
            )
            (C {<run_trial>} {<user>} {<2001> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <1>} {<somehost>} 
              {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <2>} {<1234>} {<nomatch>} {(DQ <'IP6 network'>)}
            )
            (C {<run_trial>} {<user>} {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <5>} {<somehost>} 
              {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <1>} {<1234>} {<match3>} {(DQ <'IP6 localaddress'>)}
            )
            (C {<run_trial>} {<user>} {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <5>} {<somehost>} 
              {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <2>} {<5678>} {<match4>} {(DQ <'IP6 localport'>)}
            )
          ]
          spids: [360 376]
        )
      ]
    )
    (C {<cp>} {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy_bak'>} 
      {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>}
    )
    (C {<rm>} {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy_bak'>})
  ]
)