#
# This file is created by Template of umsCodeGenerator version 0.3 candidate
#


				
				
package xrteRead;

#
# Decoder Common Routines
#
# 2004/11/09 - release 0.1 - Created by KM
# 2004/11/09 - release 0.2 - Modified by KM
#

sub ums::readReset {
  $ums::output = "";
}

sub ums::txtCopy {
  my $spos, $epos;
  ($spos, $epos) = @_;
  $ums::output = $ums::output . substr($ums::input, $spos/8, ($epos-$spos)/8);
}

sub ums::txtRead {
  my $spos, $epos;
  ($spos, $epos) = @_;
  return substr($ums::input, $spos/8, ($epos-$spos)/8);
}

sub ums::signedRead {
  my $spos, $epos;
  ($spos, $epos) = @_;

  my $n = unpack("C", substr($ums::input, int($spos/8), 1));
  my $tmp = (($n >> (7-$spos%8)) & 1) * -1;

  for($i=$spos+1; $i < $epos; $i++ ){
    my $n = unpack("C", substr($ums::input, int($i/8), 1));
    $tmp = $tmp * 2;
    $tmp += ($n >> (7-$i%8)) & 1;
  }
  return $tmp;
}

sub ums::unsignedRead {
  my $spos, $epos;
  ($spos, $epos) = @_;

  my $n = unpack("C", substr($ums::input, int($spos/8), 1));
  my $tmp = (($n >> (7-$spos%8)) & 1) * +1;

  for(my $i=$spos+1; $i < $epos; $i++ ){
    my $n = unpack("C", substr($ums::input, int($i/8), 1));
    $tmp = $tmp * 2;
    $tmp += ($n >> (7-$i%8)) & 1;
  }
  return $tmp;
}

sub ums::ieee754singleRead {
  my $spos, $epos;
  ($spos, $epos) = @_;

  return unpack("f", substr($ums::input, int($spos/8), 4));
}

sub ums::ieee754doubleRead {
  my $spos, $epos;
  ($spos, $epos) = @_;

  return unpack("d", substr($ums::input, int($spos/8), 8));
}
#
#  Definition of Decoder (matcher)
#

# < operl:decoderSub> #
sub match {
  my $label, $epos1;
  ($label,$epos1) = @_;

  $ums::pos0  = $ums::pos;

  $ums::found = &match1($label, $epos1);
  if($ums::found == 0 ){ $ums::pos = $ums::pos0; }
  return $ums::found;
}

sub match1 {
  my $label, $epos1;
  ($label, $epos1) = @_;

  my $level   =  -1;
  LOOP: while(1){
    # < group> #
    {
      my $found1 = 0;

      if ($level >= 0 || $label == 4){ $level++; }
      LOOP: while(1){
        # < operl:readerSub> #
        # < idat:byte> #
        {
          my $found2 = 0;
          if ($level >= 0 || $label == 6){ $level++; }
          LOOP: while(1){
            my $epos2 = $ums::pos + 29 * 8; 
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 7){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 1 * 8; 
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 8){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 3 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 9){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 10){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 1 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 12){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 13){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 4 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 15){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 16){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 1 * 8; 
                # < data> #
                {
                  my $found = 1;
                  my $eposd = $epos3;
                  if ($level >= 0 || $label == 18){ $level++; }
                  if ($level >= 0){ $level--;
                    $ums::pos = $eposd;
                    if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                    if (!$found){ last LOOP; }
                  }
                }
                # </data> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 19){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 1 * 8; 
                # < data> #
                {
                  my $found = 1;
                  my $eposd = $epos3;
                  if ($level >= 0 || $label == 21){ $level++; }
                  if ($level >= 0){ $level--;
                    $ums::pos = $eposd;
                    if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                    if (!$found){ last LOOP; }
                  }
                }
                # </data> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 22){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 1 * 8; 
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 23){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 2 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 24){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 25){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 6 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 27){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 28){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 1 * 8; 
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 29){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 2 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 30){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 31){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 6 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 33){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 34){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 1 * 8; 
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 35){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 7 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 36){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 37){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 1 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 39){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 40){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 1 * 8; 
                # < data> #
                {
                  my $found = 1;
                  my $eposd = $epos3;
                  if ($level >= 0 || $label == 42){ $level++; }
                  if ($level >= 0){ $level--;
                    $ums::pos = $eposd;
                    if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                    if (!$found){ last LOOP; }
                  }
                }
                # </data> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 43){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 2 * 8; 
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 44){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 2 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 46){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 47){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 2 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 49){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 50){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 2 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 52){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 53){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 2 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 55){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 56){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 2 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 58){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 59){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 2 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 61){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 62){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 2 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 64){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                # < idat:bit> #
                {
                  my $found4 = 0;
                  if ($level >= 0 || $label == 65){ $level++; }
                  LOOP: while(1){
                    my $epos4 = $ums::pos + 2 * 1; 
                    # < data> #
                    {
                      my $found = 1;
                      my $eposd = $epos4;
                      if ($level >= 0 || $label == 67){ $level++; }
                      if ($level >= 0){ $level--;
                        $ums::pos = $eposd;
                        if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                        if (!$found){ last LOOP; }
                      }
                    }
                    # </data> #
                    if ($level < 0){ last LOOP; }
                    if($ums::pos == $epos4 ){ $found4 = 1; }else{ $found4 = 0; }
                    $found4 = 1;
                    last LOOP;                           
                  }
                  if ($level >= 0){ $level--;
                    if ($level < 0){ return $found4; }
                    if ($found4==0){ last LOOP; }
                  }
                }
                # </idat:bit> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 68){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 2 * 8; 
                # < data> #
                {
                  my $found = 1;
                  my $eposd = $epos3;
                  if ($level >= 0 || $label == 70){ $level++; }
                  if ($level >= 0){ $level--;
                    $ums::pos = $eposd;
                    if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                    if (!$found){ last LOOP; }
                  }
                }
                # </data> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 71){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 2 * 8; 
                # < data> #
                {
                  my $found = 1;
                  my $eposd = $epos3;
                  if ($level >= 0 || $label == 73){ $level++; }
                  if ($level >= 0){ $level--;
                    $ums::pos = $eposd;
                    if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                    if (!$found){ last LOOP; }
                  }
                }
                # </data> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 74){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 2 * 8; 
                # < data> #
                {
                  my $found = 1;
                  my $eposd = $epos3;
                  if ($level >= 0 || $label == 76){ $level++; }
                  if ($level >= 0){ $level--;
                    $ums::pos = $eposd;
                    if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                    if (!$found){ last LOOP; }
                  }
                }
                # </data> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 77){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 2 * 8; 
                # < data> #
                {
                  my $found = 1;
                  my $eposd = $epos3;
                  if ($level >= 0 || $label == 79){ $level++; }
                  if ($level >= 0){ $level--;
                    $ums::pos = $eposd;
                    if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                    if (!$found){ last LOOP; }
                  }
                }
                # </data> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 80){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 4 * 8; 
                # < data> #
                {
                  my $found = 1;
                  my $eposd = $epos3;
                  if ($level >= 0 || $label == 82){ $level++; }
                  if ($level >= 0){ $level--;
                    $ums::pos = $eposd;
                    if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                    if (!$found){ last LOOP; }
                  }
                }
                # </data> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            # < idat:byte> #
            {
              my $found3 = 0;
              if ($level >= 0 || $label == 83){ $level++; }
              LOOP: while(1){
                my $epos3 = $ums::pos + 8 * 8; 
                # < data> #
                {
                  my $found = 1;
                  my $eposd = $epos3;
                  if ($level >= 0 || $label == 85){ $level++; }
                  if ($level >= 0){ $level--;
                    $ums::pos = $eposd;
                    if ($level < 0){ if($found){ return 1; }else{ return 0; }}
                    if (!$found){ last LOOP; }
                  }
                }
                # </data> #
                if ($level < 0){ last LOOP; }
                if($ums::pos == $epos3 ){ $found3 = 1; }else{ $found3 = 0; }
                $found3 = 1;
                last LOOP;                           
              }
              if ($level >= 0){ $level--;
                if ($level < 0){ return $found3; }
                if ($found3==0){ last LOOP; }
              }
            }
            # </idat:byte> #
            if ($level < 0){ last LOOP; }
            if($ums::pos == $epos2 ){ $found2 = 1; }else{ $found2 = 0; }
            $found2 = 1;
            last LOOP;                           
          }
          if ($level >= 0){ $level--;
            if ($level < 0){ return $found2; }
            if ($found2==0){ last LOOP; }
          }
        }
        # </idat:byte> #
        # </operl:readerSub> #
        if ($level < 0){ last LOOP; }
        $found1 = 1; 
        last LOOP;                           
      }
      if ($level >= 0){ $level--;
        if ($level < 0){ return $found1; }
        if ($found1==0){ last LOOP; }
      }
    }
    # </group> #
  }
  die("ums:match() - internal error");
  return 0;
}
# </operl:decoderSub> #

#
#  Definition of Decoder (mapping decoder)
#

# < operl:decoderSub> #
sub parse {
  ($ums::input) = @_;
  my $epos1 = 8*length($ums::input);
  &ums::readReset();

  $ums::pos = 0;
  # < group> #
  &match(4, $epos1);
  {
    my $epos2 = $ums::pos;
    $ums::pos = $ums::pos0;
    {
      # < operl:readerSub> #
      # < idat:byte> #
      &match(6, $epos2);
      {
        my $epos3 = $ums::pos;
        $ums::pos = $ums::pos0;
        {
        # < idat:byte> #
        &match(7, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < idat:bit> #
          &match(8, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(9, $epos5);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          # < idat:bit> #
          &match(10, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(12, $epos5);
            $CAL_INFO = &ums::unsignedRead($ums::pos0, $ums::pos);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          # < idat:bit> #
          &match(13, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(15, $epos5);
            $CHIP_SUM = &ums::unsignedRead($ums::pos0, $ums::pos);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        # < idat:byte> #
        &match(16, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < data> #
          &match(18, $epos4);
          $ROI_H_STA_POS = &ums::unsignedRead($ums::pos0, $ums::pos);
          # </data> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        # < idat:byte> #
        &match(19, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < data> #
          &match(21, $epos4);
          $ROI_V_STA_POS = &ums::unsignedRead($ums::pos0, $ums::pos);
          # </data> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        # < idat:byte> #
        &match(22, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < idat:bit> #
          &match(23, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(24, $epos5);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          # < idat:bit> #
          &match(25, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(27, $epos5);
            $ROI_H_SIZE = &ums::unsignedRead($ums::pos0, $ums::pos);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        # < idat:byte> #
        &match(28, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < idat:bit> #
          &match(29, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(30, $epos5);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          # < idat:bit> #
          &match(31, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(33, $epos5);
            $ROI_V_SIZE = &ums::unsignedRead($ums::pos0, $ums::pos);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        # < idat:byte> #
        &match(34, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < idat:bit> #
          &match(35, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(36, $epos5);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          # < idat:bit> #
          &match(37, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(39, $epos5);
            $CCD_READ_PORT = &ums::signedRead($ums::pos0, $ums::pos);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        # < idat:byte> #
        &match(40, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < data> #
          &match(42, $epos4);
          $CCD_TEMP = &ums::unsignedRead($ums::pos0, $ums::pos);
          # </data> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        # < idat:byte> #
        &match(43, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < idat:bit> #
          &match(44, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(46, $epos5);
            $CCD_OPE_STS1 = &ums::unsignedRead($ums::pos0, $ums::pos);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          # < idat:bit> #
          &match(47, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(49, $epos5);
            $CCD_OPE_STS2 = &ums::unsignedRead($ums::pos0, $ums::pos);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          # < idat:bit> #
          &match(50, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(52, $epos5);
            $CCD_OPE_STS3 = &ums::unsignedRead($ums::pos0, $ums::pos);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          # < idat:bit> #
          &match(53, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(55, $epos5);
            $CCD_OPE_STS4 = &ums::unsignedRead($ums::pos0, $ums::pos);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          # < idat:bit> #
          &match(56, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(58, $epos5);
            $CCD_OPE_STS5 = &ums::unsignedRead($ums::pos0, $ums::pos);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          # < idat:bit> #
          &match(59, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(61, $epos5);
            $CCD_OPE_STS6 = &ums::unsignedRead($ums::pos0, $ums::pos);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          # < idat:bit> #
          &match(62, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(64, $epos5);
            $CCD_OPE_STS7 = &ums::unsignedRead($ums::pos0, $ums::pos);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          # < idat:bit> #
          &match(65, $epos4);
          {
            my $epos5 = $ums::pos;
            $ums::pos = $ums::pos0;
            {
            # < data> #
            &match(67, $epos5);
            $CCD_OPE_STS8 = &ums::unsignedRead($ums::pos0, $ums::pos);
            # </data> #
            }
            $ums::pos = $epos5;
          }
          # </idat:bit> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        # < idat:byte> #
        &match(68, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < data> #
          &match(70, $epos4);
          $EXP_STA_TIME = &ums::unsignedRead($ums::pos0, $ums::pos);
          # </data> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        # < idat:byte> #
        &match(71, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < data> #
          &match(73, $epos4);
          $EXP_END_TIME = &ums::unsignedRead($ums::pos0, $ums::pos);
          # </data> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        # < idat:byte> #
        &match(74, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < data> #
          &match(76, $epos4);
          $READ_END_TIME = &ums::unsignedRead($ums::pos0, $ums::pos);
          # </data> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        # < idat:byte> #
        &match(77, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < data> #
          &match(79, $epos4);
          $TIMER_COUNTER = &ums::unsignedRead($ums::pos0, $ums::pos);
          # </data> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        # < idat:byte> #
        &match(80, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < data> #
          &match(82, $epos4);
          $floatData = &ums::ieee754singleRead($ums::pos0, $ums::pos);
          # </data> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        # < idat:byte> #
        &match(83, $epos3);
        {
          my $epos4 = $ums::pos;
          $ums::pos = $ums::pos0;
          {
          # < data> #
          &match(85, $epos4);
          $doubleData = &ums::ieee754doubleRead($ums::pos0, $ums::pos);
          # </data> #
          }
          $ums::pos = $epos4;
        }
        # </idat:byte> #
        }
        $ums::pos = $epos3;
      }
      # </idat:byte> #
      &recievedStatus();
      # </operl:readerSub> #
    }
    $ums::pos = $epos2;
  }
  # </group> #
  return 0;
}
# </operl:decoderSub> #

1;
