(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike 'PIDFILE='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'PIDFILE='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PIDFILE='> name:PIDFILE)
          op: assign_op.Equal
          rhs: {<ggated.pid>}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'PLAINFILES='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'PLAINFILES='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PLAINFILES='> name:PLAINFILES)
          op: assign_op.Equal
          rhs: {<plainfiles>}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'PORT='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'PORT='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PORT='> name:PORT)
          op: assign_op.Equal
          rhs: {<33080>}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'CONF='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'CONF='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CONF='> name:CONF)
          op: assign_op.Equal
          rhs: {<gg.exports>}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <atf_test_case>
      more_env: []
      words: [{<atf_test_case>} {<ggated>} {<cleanup>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <ggated_head>
      name: ggated_head
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [{<atf_set>} {(DQ <descr>)} {(DQ <'ggated can proxy geoms'>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [{<atf_set>} {(DQ <require.progs>)} {(DQ <'ggatec ggated'>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [{<atf_set>} {(DQ <require.user>)} {(DQ <root>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [{<atf_set>} {(DQ <timeout>)} {<60>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <ggated_body>
      name: ggated_body
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <load_ggate>
              more_env: []
              words: [{<load_ggate>}]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'us='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'us='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'us='> name:us)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <alloc_ggate_dev>
                            more_env: []
                            words: [{<alloc_ggate_dev>}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'work='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'work='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'work='> name:work)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <alloc_md>
                            more_env: []
                            words: [{<alloc_md>}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'src='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'src='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'src='> name:src)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <alloc_md>
                            more_env: []
                            words: [{<alloc_md>}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-e>}
                {<ignore>}
                {<-o>}
                {<ignore>}
                {<dd>}
                {<Id.Lit_VarLike 'if='> <'/dev/random'>}
                {<Id.Lit_VarLike 'of='> <'/dev/'> ($ Id.VSub_DollarName work)}
                {<Id.Lit_VarLike 'bs='> <1m>}
                {<Id.Lit_VarLike 'count='> <1>}
                {<Id.Lit_VarLike 'conv='> <notrunc>}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-e>}
                {<ignore>}
                {<-o>}
                {<ignore>}
                {<dd>}
                {<Id.Lit_VarLike 'if='> <'/dev/random'>}
                {<Id.Lit_VarLike 'of='> <'/dev/'> ($ Id.VSub_DollarName src)}
                {<Id.Lit_VarLike 'bs='> <1m>}
                {<Id.Lit_VarLike 'count='> <1>}
                {<Id.Lit_VarLike 'conv='> <notrunc>}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {($ Id.VSub_DollarName CONF)}]
              redirects: [
                (Redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName PLAINFILES)}
                )
              ]
              do_fork: T
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'127.0.0.1 RW /dev/'> ($ Id.VSub_DollarName work))}]
              redirects: [
                (Redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName CONF)}
                )
              ]
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<ggated>}
                {<-p>}
                {($ Id.VSub_DollarName PORT)}
                {<-F>}
                {($ Id.VSub_DollarName PIDFILE)}
                {($ Id.VSub_DollarName CONF)}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<ggatec>}
                {<create>}
                {<-p>}
                {($ Id.VSub_DollarName PORT)}
                {<-u>}
                {($ Id.VSub_DollarName us)}
                {<127.0.0.1>}
                {<'/dev/'> ($ Id.VSub_DollarName work)}
              ]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'ggate_dev='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'ggate_dev='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ggate_dev='> name:ggate_dev)
                  op: assign_op.Equal
                  rhs: {<'/dev/ggate'> (${ Id.VSub_Name us)}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <wait_for_ggate_device>
              more_env: []
              words: [{<wait_for_ggate_device>} {(${ Id.VSub_Name ggate_dev)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-e>}
                {<ignore>}
                {<-o>}
                {<ignore>}
                {<dd>}
                {<Id.Lit_VarLike 'if='> <'/dev/'> (${ Id.VSub_Name src)}
                {<Id.Lit_VarLike 'of='> (${ Id.VSub_Name ggate_dev)}
                {<Id.Lit_VarLike 'bs='> <1m>}
                {<Id.Lit_VarLike 'count='> <1>}
                {<Id.Lit_VarLike 'conv='> <notrunc>}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <checksum>
              more_env: []
              words: [
                {<checksum>}
                {<'/dev/'> ($ Id.VSub_DollarName src)}
                {<'/dev/'> ($ Id.VSub_DollarName work)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <ggated_cleanup>
      name: ggated_cleanup
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <common_cleanup>
              more_env: []
              words: [{<common_cleanup>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <atf_test_case>
      more_env: []
      words: [{<atf_test_case>} {<ggatel_file>} {<cleanup>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <ggatel_file_head>
      name: ggatel_file_head
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [{<atf_set>} {(DQ <descr>)} {(DQ <'ggatel can proxy files'>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [{<atf_set>} {(DQ <require.progs>)} {(DQ <ggatel>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [{<atf_set>} {(DQ <require.user>)} {(DQ <root>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [{<atf_set>} {(DQ <timeout>)} {<15>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <ggatel_file_body>
      name: ggatel_file_body
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <load_ggate>
              more_env: []
              words: [{<load_ggate>}]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'us='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'us='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'us='> name:us)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <alloc_ggate_dev>
                            more_env: []
                            words: [{<alloc_ggate_dev>}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {<src>} {<work>}]
              redirects: [
                (Redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name PLAINFILES)}
                )
              ]
              do_fork: T
            )
            (command.Simple
              blame_tok: <dd>
              more_env: []
              words: [
                {<dd>}
                {<Id.Lit_VarLike 'if='> <'/dev/random'>}
                {<Id.Lit_VarLike 'of='> <work>}
                {<Id.Lit_VarLike 'bs='> <1m>}
                {<Id.Lit_VarLike 'count='> <1>}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <dd>
              more_env: []
              words: [
                {<dd>}
                {<Id.Lit_VarLike 'if='> <'/dev/random'>}
                {<Id.Lit_VarLike 'of='> <src>}
                {<Id.Lit_VarLike 'bs='> <1m>}
                {<Id.Lit_VarLike 'count='> <1>}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [{<atf_check>} {<ggatel>} {<create>} {<-u>} {($ Id.VSub_DollarName us)} {<work>}]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'ggate_dev='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'ggate_dev='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ggate_dev='> name:ggate_dev)
                  op: assign_op.Equal
                  rhs: {<'/dev/ggate'> (${ Id.VSub_Name us)}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <wait_for_ggate_device>
              more_env: []
              words: [{<wait_for_ggate_device>} {(${ Id.VSub_Name ggate_dev)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-e>}
                {<ignore>}
                {<-o>}
                {<ignore>}
                {<dd>}
                {<Id.Lit_VarLike 'if='> <src>}
                {<Id.Lit_VarLike 'of='> (${ Id.VSub_Name ggate_dev)}
                {<Id.Lit_VarLike 'bs='> <1m>}
                {<Id.Lit_VarLike 'count='> <1>}
                {<Id.Lit_VarLike 'conv='> <notrunc>}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <checksum>
              more_env: []
              words: [{<checksum>} {<src>} {<work>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <ggatel_file_cleanup>
      name: ggatel_file_cleanup
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <common_cleanup>
              more_env: []
              words: [{<common_cleanup>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <atf_test_case>
      more_env: []
      words: [{<atf_test_case>} {<ggatel_md>} {<cleanup>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <ggatel_md_head>
      name: ggatel_md_head
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [{<atf_set>} {(DQ <descr>)} {(DQ <'ggatel can proxy files'>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [{<atf_set>} {(DQ <require.progs>)} {(DQ <ggatel>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [{<atf_set>} {(DQ <require.user>)} {(DQ <root>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [{<atf_set>} {(DQ <timeout>)} {<15>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <ggatel_md_body>
      name: ggatel_md_body
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <load_ggate>
              more_env: []
              words: [{<load_ggate>}]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'us='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'us='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'us='> name:us)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <alloc_ggate_dev>
                            more_env: []
                            words: [{<alloc_ggate_dev>}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'work='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'work='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'work='> name:work)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <alloc_md>
                            more_env: []
                            words: [{<alloc_md>}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'src='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'src='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'src='> name:src)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <alloc_md>
                            more_env: []
                            words: [{<alloc_md>}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-e>}
                {<ignore>}
                {<-o>}
                {<ignore>}
                {<dd>}
                {<Id.Lit_VarLike 'if='> <'/dev/random'>}
                {<Id.Lit_VarLike 'of='> ($ Id.VSub_DollarName work)}
                {<Id.Lit_VarLike 'bs='> <1m>}
                {<Id.Lit_VarLike 'count='> <1>}
                {<Id.Lit_VarLike 'conv='> <notrunc>}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-e>}
                {<ignore>}
                {<-o>}
                {<ignore>}
                {<dd>}
                {<Id.Lit_VarLike 'if='> <'/dev/random'>}
                {<Id.Lit_VarLike 'of='> ($ Id.VSub_DollarName src)}
                {<Id.Lit_VarLike 'bs='> <1m>}
                {<Id.Lit_VarLike 'count='> <1>}
                {<Id.Lit_VarLike 'conv='> <notrunc>}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<ggatel>}
                {<create>}
                {<-u>}
                {($ Id.VSub_DollarName us)}
                {<'/dev/'> ($ Id.VSub_DollarName work)}
              ]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'ggate_dev='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'ggate_dev='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ggate_dev='> name:ggate_dev)
                  op: assign_op.Equal
                  rhs: {<'/dev/ggate'> (${ Id.VSub_Name us)}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <wait_for_ggate_device>
              more_env: []
              words: [{<wait_for_ggate_device>} {(${ Id.VSub_Name ggate_dev)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-e>}
                {<ignore>}
                {<-o>}
                {<ignore>}
                {<dd>}
                {<Id.Lit_VarLike 'if='> <'/dev/'> ($ Id.VSub_DollarName src)}
                {<Id.Lit_VarLike 'of='> (${ Id.VSub_Name ggate_dev)}
                {<Id.Lit_VarLike 'bs='> <1m>}
                {<Id.Lit_VarLike 'count='> <1>}
                {<Id.Lit_VarLike 'conv='> <notrunc>}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <checksum>
              more_env: []
              words: [
                {<checksum>}
                {<'/dev/'> ($ Id.VSub_DollarName src)}
                {<'/dev/'> ($ Id.VSub_DollarName work)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <ggatel_md_cleanup>
      name: ggatel_md_cleanup
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <common_cleanup>
              more_env: []
              words: [{<common_cleanup>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <atf_init_test_cases>
      name: atf_init_test_cases
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_add_test_case>
              more_env: []
              words: [{<atf_add_test_case>} {<ggated>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_add_test_case>
              more_env: []
              words: [{<atf_add_test_case>} {<ggatel_file>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_add_test_case>
              more_env: []
              words: [{<atf_add_test_case>} {<ggatel_md>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <alloc_ggate_dev>
      name: alloc_ggate_dev
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<us>}]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'us='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'us='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'us='> name:us)
                  op: assign_op.Equal
                  rhs: {<0>}
                )
              ]
              redirects: []
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          blame_tok: <Id.Lit_LBracket '['>
                          more_env: []
                          words: [
                            {<Id.Lit_LBracket '['>}
                            {<-c>}
                            {<'/dev/ggate'> (${ Id.VSub_Name us)}
                            {<Id.Lit_RBracket ']'>}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.Simple
                      blame_tok: <Id.Lit_Colon ':'>
                      more_env: []
                      words: [
                        {<Id.Lit_Colon ':'>}
                        {
                          (word_part.ArithSub
                            left: <Id.Left_DollarDParen '$(('>
                            anode: 
                              (arith_expr.BinaryAssign
                                op_id: Id.Arith_PlusEqual
                                left: ($ Id.Lit_ArithVarLike us)
                                right: {<Id.Lit_Digits 1>}
                              )
                            right: <Id.Right_DollarDParen _>
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(${ Id.VSub_Name us)}]
              redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<ggate.devs>})]
              do_fork: T
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(${ Id.VSub_Name us)}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <alloc_md>
      name: alloc_md
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<md>}]
              redirects: []
              do_fork: T
            )
            (command.AndOr
              children: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'md='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'md='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'md='> name:md)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (CommandSub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.Simple
                                blame_tok: <mdconfig>
                                more_env: []
                                words: [{<mdconfig>} {<-a>} {<-t>} {<malloc>} {<-s>} {<1M>}]
                                redirects: []
                                do_fork: T
                              )
                            right: <Id.Eof_RParen _>
                          )
                        }
                    )
                  ]
                  redirects: []
                )
                (command.Simple
                  blame_tok: <atf_fail>
                  more_env: []
                  words: [{<atf_fail>} {(DQ <'failed to allocate md device'>)}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DPipe _>]
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(${ Id.VSub_Name md)}]
              redirects: [(Redir op:<Id.Redir_DGreat '>>'> loc:(redir_loc.Fd fd:1) arg:{<md.devs>})]
              do_fork: T
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(${ Id.VSub_Name md)}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <checksum>
      name: checksum
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<src>} {<work>}]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'src='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'src='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'src='> name:src)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 1)}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'work='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'work='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'work='> name:work)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 2)}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'src_checksum='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'src_checksum='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'src_checksum='> name:src_checksum)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <md5>
                            more_env: []
                            words: [{<md5>} {<-q>} {($ Id.VSub_DollarName src)}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'work_checksum='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'work_checksum='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'work_checksum='> name:work_checksum)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <md5>
                            more_env: []
                            words: [{<md5>} {<-q>} {($ Id.VSub_DollarName work)}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {(DQ ($ Id.VSub_DollarName work_checksum))}
                                {<Id.KW_Bang '!'> <Id.Lit_Equals '='>}
                                {(DQ ($ Id.VSub_DollarName src_checksum))}
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <atf_fail>
                      more_env: []
                      words: [{<atf_fail>} {(DQ <'work md5 checksum didn\'t match'>)}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [937 955]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'ggate_checksum='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'ggate_checksum='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ggate_checksum='> name:ggate_checksum)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <md5>
                            more_env: []
                            words: [{<md5>} {<-q>} {<'/dev/ggate'> (${ Id.VSub_Name us)}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {(DQ ($ Id.VSub_DollarName ggate_checksum))}
                                {<Id.KW_Bang '!'> <Id.Lit_Equals '='>}
                                {(DQ ($ Id.VSub_DollarName src_checksum))}
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <atf_fail>
                      more_env: []
                      words: [{<atf_fail>} {(DQ <'ggate md5 checksum didn\'t match'>)}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [982 1000]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <common_cleanup>
      name: common_cleanup
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {<-f>}
                                {(DQ <ggate.devs>)}
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  blame_tok: <read>
                                  more_env: []
                                  words: [{<read>} {<test_ggate>}]
                                  redirects: []
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      body: 
                        (command.DoGroup
                          left: <Id.KW_Do do>
                          children: [
                            (command.Simple
                              blame_tok: <ggatec>
                              more_env: []
                              words: [
                                {<ggatec>}
                                {<destroy>}
                                {<-f>}
                                {<-u>}
                                {($ Id.VSub_DollarName test_ggate)}
                              ]
                              redirects: [
                                (Redir
                                  op: <Id.Redir_Great '>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          right: <Id.KW_Done done>
                        )
                      redirects: [
                        (Redir
                          op: <Id.Redir_Less '<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {<ggate.devs>}
                        )
                      ]
                    )
                    (command.Simple
                      blame_tok: <rm>
                      more_env: []
                      words: [{<rm>} {<ggate.devs>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [1022 1035]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {<-f>}
                                {(DQ ($ Id.VSub_DollarName PIDFILE))}
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <pkill>
                      more_env: []
                      words: [{<pkill>} {<-F>} {(DQ ($ Id.VSub_DollarName PIDFILE))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <rm>
                      more_env: []
                      words: [{<rm>} {($ Id.VSub_DollarName PIDFILE)}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [1078 1091]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {<-f>}
                                {(DQ <PLAINFILES>)}
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  blame_tok: <read>
                                  more_env: []
                                  words: [{<read>} {<f>}]
                                  redirects: []
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      body: 
                        (command.DoGroup
                          left: <Id.KW_Do do>
                          children: [
                            (command.Simple
                              blame_tok: <rm>
                              more_env: []
                              words: [{<rm>} {<-f>} {(${ Id.VSub_Name f)}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.KW_Done done>
                        )
                      redirects: [
                        (Redir
                          op: <Id.Redir_Less '<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {(${ Id.VSub_Name PLAINFILES)}
                        )
                      ]
                    )
                    (command.Simple
                      blame_tok: <rm>
                      more_env: []
                      words: [{<rm>} {(${ Id.VSub_Name PLAINFILES)}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [1112 1125]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {<-f>}
                                {(DQ <md.devs>)}
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  blame_tok: <read>
                                  more_env: []
                                  words: [{<read>} {<test_md>}]
                                  redirects: []
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      body: 
                        (command.DoGroup
                          left: <Id.KW_Do do>
                          children: [
                            (command.Simple
                              blame_tok: <mdconfig>
                              more_env: []
                              words: [{<mdconfig>} {<-d>} {<-u>} {($ Id.VSub_DollarName test_md)}]
                              redirects: [
                                (Redir
                                  op: <Id.Redir_Great '2>'>
                                  loc: (redir_loc.Fd fd:2)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          right: <Id.KW_Done done>
                        )
                      redirects: [
                        (Redir
                          op: <Id.Redir_Less '<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {<md.devs>}
                        )
                      ]
                    )
                    (command.Simple
                      blame_tok: <rm>
                      more_env: []
                      words: [{<rm>} {<md.devs>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [1167 1180]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Simple
              blame_tok: <true>
              more_env: []
              words: [{<true>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <load_ggate>
      name: load_ggate
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'class='> <gate>}]
              redirects: []
              do_fork: T
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              negated: <Id.KW_Bang '!'>
                              children: [
                                (command.Simple
                                  blame_tok: <kldstat>
                                  more_env: []
                                  words: [{<kldstat>} {<-q>} {<-m>} {<g_> (${ Id.VSub_Name class)}]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              ops: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      negated: <Id.KW_Bang '!'>
                                      children: [
                                        (command.Simple
                                          blame_tok: <geom>
                                          more_env: []
                                          words: [{<geom>} {(${ Id.VSub_Name class)} {<load>}]
                                          redirects: []
                                          do_fork: T
                                        )
                                      ]
                                      ops: []
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.Simple
                              blame_tok: <atf_skip>
                              more_env: []
                              words: [
                                {<atf_skip>}
                                {
                                  (DQ <'could not load module for geom class='> 
                                    (${ Id.VSub_Name class)
                                  )
                                }
                              ]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          spids: [1262 1275]
                        )
                      ]
                      else_action: []
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                  ]
                  spids: [1243 1259]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <wait_for_ggate_device>
      name: wait_for_ggate_device
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'ggate_device='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'ggate_device='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ggate_device='> name:ggate_device)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 1)}
                )
              ]
              redirects: []
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          blame_tok: <Id.Lit_LBracket '['>
                          more_env: []
                          words: [
                            {<Id.Lit_LBracket '['>}
                            {<Id.KW_Bang '!'>}
                            {<-c>}
                            {($ Id.VSub_DollarName ggate_device)}
                            {<Id.Lit_RBracket ']'>}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.Simple
                      blame_tok: <sleep>
                      more_env: []
                      words: [{<sleep>} {<0.5>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
  ]
)