Home | History | Annotate | Download | only in src
      1 /* This is AGAST and OAST, an optimal and accelerated corner detector
      2               based on the accelerated segment tests
      3    Below is the original copyright and the references */
      4 
      5 /*
      6 Copyright (C) 2010  Elmar Mair
      7 All rights reserved.
      8 
      9 Redistribution and use in source and binary forms, with or without
     10 modification, are permitted provided that the following conditions
     11 are met:
     12 
     13     *Redistributions of source code must retain the above copyright
     14      notice, this list of conditions and the following disclaimer.
     15 
     16     *Redistributions in binary form must reproduce the above copyright
     17      notice, this list of conditions and the following disclaimer in the
     18      documentation and/or other materials provided with the distribution.
     19 
     20     *Neither the name of the University of Cambridge nor the names of
     21      its contributors may be used to endorse or promote products derived
     22      from this software without specific prior written permission.
     23 
     24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     25 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     26 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     27 A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     28 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     29 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     30 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     31 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     32 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     33 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     34 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     35 */
     36 
     37 /*
     38 The references are:
     39  * Adaptive and Generic Corner Detection Based on the Accelerated Segment Test,
     40    Elmar Mair and Gregory D. Hager and Darius Burschka
     41    and Michael Suppa and Gerhard Hirzinger ECCV 2010
     42    URL: http://www6.in.tum.de/Main/ResearchAgast
     43 */
     44 
     45 #include "precomp.hpp"
     46 #include "agast_score.hpp"
     47 
     48 #ifdef _WIN32
     49 #pragma warning( disable : 4127 )
     50 #endif
     51 
     52 namespace cv
     53 {
     54 
     55 static void AGAST_5_8(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold)
     56 {
     57 
     58     cv::Mat img;
     59     if(!_img.getMat().isContinuous())
     60       img = _img.getMat().clone();
     61     else
     62       img = _img.getMat();
     63 
     64     size_t total = 0;
     65     int xsize = img.cols;
     66     int ysize = img.rows;
     67     size_t nExpectedCorners = keypoints.capacity();
     68     register int x, y;
     69     register int xsizeB = xsize - 2;
     70     register int ysizeB = ysize - 1;
     71     register int width;
     72 
     73     keypoints.resize(0);
     74 
     75     int pixel_5_8_[16];
     76     makeAgastOffsets(pixel_5_8_, (int)img.step, AgastFeatureDetector::AGAST_5_8);
     77 
     78     register short offset0 = (short) pixel_5_8_[0];
     79     register short offset1 = (short) pixel_5_8_[1];
     80     register short offset2 = (short) pixel_5_8_[2];
     81     register short offset3 = (short) pixel_5_8_[3];
     82     register short offset4 = (short) pixel_5_8_[4];
     83     register short offset5 = (short) pixel_5_8_[5];
     84     register short offset6 = (short) pixel_5_8_[6];
     85     register short offset7 = (short) pixel_5_8_[7];
     86 
     87     width = xsize;
     88 
     89     for(y = 1; y < ysizeB; y++)
     90     {
     91         x = 0;
     92         while(true)
     93         {
     94           homogeneous:
     95           {
     96             x++;
     97             if(x > xsizeB)
     98                 break;
     99             else
    100             {
    101                 register const unsigned char* const ptr = img.ptr() + y*width + x;
    102                 register const int cb = *ptr + threshold;
    103                 register const int c_b = *ptr - threshold;
    104                 if(ptr[offset0] > cb)
    105                   if(ptr[offset2] > cb)
    106                     if(ptr[offset3] > cb)
    107                       if(ptr[offset5] > cb)
    108                         if(ptr[offset1] > cb)
    109                           if(ptr[offset4] > cb)
    110                             goto success_structured;
    111                           else
    112                             if(ptr[offset7] > cb)
    113                               goto success_structured;
    114                             else
    115                               goto homogeneous;
    116                         else
    117                           if(ptr[offset4] > cb)
    118                             if(ptr[offset6] > cb)
    119                               goto success_structured;
    120                             else
    121                               goto homogeneous;
    122                           else
    123                             goto homogeneous;
    124                       else
    125                         if(ptr[offset1] > cb)
    126                           if(ptr[offset4] > cb)
    127                             goto success_homogeneous;
    128                           else
    129                             if(ptr[offset7] > cb)
    130                               goto success_homogeneous;
    131                             else
    132                               goto homogeneous;
    133                         else
    134                           goto homogeneous;
    135                     else
    136                       if(ptr[offset7] > cb)
    137                         if(ptr[offset6] > cb)
    138                           if(ptr[offset5] > cb)
    139                             if(ptr[offset1] > cb)
    140                               goto success_structured;
    141                             else
    142                               if(ptr[offset4] > cb)
    143                                 goto success_structured;
    144                               else
    145                                 goto homogeneous;
    146                           else
    147                             if(ptr[offset1] > cb)
    148                               goto success_homogeneous;
    149                             else
    150                               goto homogeneous;
    151                         else
    152                           goto homogeneous;
    153                       else
    154                         if(ptr[offset5] < c_b)
    155                           if(ptr[offset3] < c_b)
    156                             if(ptr[offset7] < c_b)
    157                               if(ptr[offset4] < c_b)
    158                                 if(ptr[offset6] < c_b)
    159                                   goto success_structured;
    160                                 else
    161                                   goto structured;
    162                               else
    163                                 goto homogeneous;
    164                             else
    165                               goto homogeneous;
    166                           else
    167                             goto homogeneous;
    168                         else
    169                           goto homogeneous;
    170                   else
    171                     if(ptr[offset5] > cb)
    172                       if(ptr[offset7] > cb)
    173                         if(ptr[offset6] > cb)
    174                           if(ptr[offset1] > cb)
    175                             goto success_homogeneous;
    176                           else
    177                             if(ptr[offset4] > cb)
    178                               goto success_homogeneous;
    179                             else
    180                               goto homogeneous;
    181                         else
    182                           goto homogeneous;
    183                       else
    184                         goto homogeneous;
    185                     else
    186                       if(ptr[offset5] < c_b)
    187                         if(ptr[offset3] < c_b)
    188                           if(ptr[offset2] < c_b)
    189                             if(ptr[offset1] < c_b)
    190                               if(ptr[offset4] < c_b)
    191                                 goto success_structured;
    192                               else
    193                                 goto homogeneous;
    194                             else
    195                               if(ptr[offset4] < c_b)
    196                                 if(ptr[offset6] < c_b)
    197                                   goto success_structured;
    198                                 else
    199                                   goto homogeneous;
    200                               else
    201                                 goto homogeneous;
    202                           else
    203                             if(ptr[offset7] < c_b)
    204                               if(ptr[offset4] < c_b)
    205                                 if(ptr[offset6] < c_b)
    206                                   goto success_structured;
    207                                 else
    208                                   goto homogeneous;
    209                               else
    210                                 goto homogeneous;
    211                             else
    212                               goto homogeneous;
    213                         else
    214                           goto homogeneous;
    215                       else
    216                         goto homogeneous;
    217                 else if(ptr[offset0] < c_b)
    218                   if(ptr[offset2] < c_b)
    219                     if(ptr[offset7] > cb)
    220                       if(ptr[offset3] < c_b)
    221                         if(ptr[offset5] < c_b)
    222                           if(ptr[offset1] < c_b)
    223                             if(ptr[offset4] < c_b)
    224                               goto success_structured;
    225                             else
    226                               goto structured;
    227                           else
    228                             if(ptr[offset4] < c_b)
    229                               if(ptr[offset6] < c_b)
    230                                 goto success_structured;
    231                               else
    232                                 goto structured;
    233                             else
    234                               goto homogeneous;
    235                         else
    236                           if(ptr[offset1] < c_b)
    237                             if(ptr[offset4] < c_b)
    238                               goto success_structured;
    239                             else
    240                               goto homogeneous;
    241                           else
    242                             goto homogeneous;
    243                       else
    244                         if(ptr[offset5] > cb)
    245                           if(ptr[offset3] > cb)
    246                             if(ptr[offset4] > cb)
    247                               if(ptr[offset6] > cb)
    248                                 goto success_structured;
    249                               else
    250                                 goto structured;
    251                             else
    252                               goto homogeneous;
    253                           else
    254                             goto homogeneous;
    255                         else
    256                           goto homogeneous;
    257                     else
    258                       if(ptr[offset7] < c_b)
    259                         if(ptr[offset3] < c_b)
    260                           if(ptr[offset5] < c_b)
    261                             if(ptr[offset1] < c_b)
    262                               goto success_structured;
    263                             else
    264                               if(ptr[offset4] < c_b)
    265                                 if(ptr[offset6] < c_b)
    266                                   goto success_structured;
    267                                 else
    268                                   goto structured;
    269                               else
    270                                 goto homogeneous;
    271                           else
    272                             if(ptr[offset1] < c_b)
    273                               goto success_homogeneous;
    274                             else
    275                               goto homogeneous;
    276                         else
    277                           if(ptr[offset6] < c_b)
    278                             if(ptr[offset5] < c_b)
    279                               if(ptr[offset1] < c_b)
    280                                 goto success_structured;
    281                               else
    282                                 if(ptr[offset4] < c_b)
    283                                   goto success_structured;
    284                                 else
    285                                   goto homogeneous;
    286                             else
    287                               if(ptr[offset1] < c_b)
    288                                 goto success_homogeneous;
    289                               else
    290                                 goto homogeneous;
    291                           else
    292                             goto homogeneous;
    293                       else
    294                         if(ptr[offset3] < c_b)
    295                           if(ptr[offset5] < c_b)
    296                             if(ptr[offset1] < c_b)
    297                               if(ptr[offset4] < c_b)
    298                                 goto success_structured;
    299                               else
    300                                 goto homogeneous;
    301                             else
    302                               if(ptr[offset4] < c_b)
    303                                 if(ptr[offset6] < c_b)
    304                                   goto success_structured;
    305                                 else
    306                                   goto homogeneous;
    307                               else
    308                                 goto homogeneous;
    309                           else
    310                             if(ptr[offset1] < c_b)
    311                               if(ptr[offset4] < c_b)
    312                                 goto success_homogeneous;
    313                               else
    314                                 goto homogeneous;
    315                             else
    316                               goto homogeneous;
    317                         else
    318                           goto homogeneous;
    319                   else
    320                     if(ptr[offset5] > cb)
    321                       if(ptr[offset3] > cb)
    322                         if(ptr[offset2] > cb)
    323                           if(ptr[offset1] > cb)
    324                             if(ptr[offset4] > cb)
    325                               goto success_structured;
    326                             else
    327                               goto homogeneous;
    328                           else
    329                             if(ptr[offset4] > cb)
    330                               if(ptr[offset6] > cb)
    331                                 goto success_structured;
    332                               else
    333                                 goto homogeneous;
    334                             else
    335                               goto homogeneous;
    336                         else
    337                           if(ptr[offset7] > cb)
    338                             if(ptr[offset4] > cb)
    339                               if(ptr[offset6] > cb)
    340                                 goto success_structured;
    341                               else
    342                                 goto homogeneous;
    343                             else
    344                               goto homogeneous;
    345                           else
    346                             goto homogeneous;
    347                       else
    348                         goto homogeneous;
    349                     else
    350                       if(ptr[offset5] < c_b)
    351                         if(ptr[offset7] < c_b)
    352                           if(ptr[offset6] < c_b)
    353                             if(ptr[offset1] < c_b)
    354                               goto success_homogeneous;
    355                             else
    356                               if(ptr[offset4] < c_b)
    357                                 goto success_homogeneous;
    358                               else
    359                                 goto homogeneous;
    360                           else
    361                             goto homogeneous;
    362                         else
    363                           goto homogeneous;
    364                       else
    365                         goto homogeneous;
    366                 else
    367                   if(ptr[offset3] > cb)
    368                     if(ptr[offset5] > cb)
    369                       if(ptr[offset2] > cb)
    370                         if(ptr[offset1] > cb)
    371                           if(ptr[offset4] > cb)
    372                             goto success_homogeneous;
    373                           else
    374                             goto homogeneous;
    375                         else
    376                           if(ptr[offset4] > cb)
    377                             if(ptr[offset6] > cb)
    378                               goto success_homogeneous;
    379                             else
    380                               goto homogeneous;
    381                           else
    382                             goto homogeneous;
    383                       else
    384                         if(ptr[offset7] > cb)
    385                           if(ptr[offset4] > cb)
    386                             if(ptr[offset6] > cb)
    387                               goto success_homogeneous;
    388                             else
    389                               goto homogeneous;
    390                           else
    391                             goto homogeneous;
    392                         else
    393                           goto homogeneous;
    394                     else
    395                       goto homogeneous;
    396                   else
    397                     if(ptr[offset3] < c_b)
    398                       if(ptr[offset5] < c_b)
    399                         if(ptr[offset2] < c_b)
    400                           if(ptr[offset1] < c_b)
    401                             if(ptr[offset4] < c_b)
    402                               goto success_homogeneous;
    403                             else
    404                               goto homogeneous;
    405                           else
    406                             if(ptr[offset4] < c_b)
    407                               if(ptr[offset6] < c_b)
    408                                 goto success_homogeneous;
    409                               else
    410                                 goto homogeneous;
    411                             else
    412                               goto homogeneous;
    413                         else
    414                           if(ptr[offset7] < c_b)
    415                             if(ptr[offset4] < c_b)
    416                               if(ptr[offset6] < c_b)
    417                                 goto success_homogeneous;
    418                               else
    419                                 goto homogeneous;
    420                             else
    421                               goto homogeneous;
    422                           else
    423                             goto homogeneous;
    424                       else
    425                         goto homogeneous;
    426                     else
    427                       goto homogeneous;
    428             }
    429           }
    430           structured:
    431           {
    432             x++;
    433             if(x > xsizeB)
    434                 break;
    435             else
    436             {
    437                 register const unsigned char* const ptr = img.ptr() + y*width + x;
    438                 register const int cb = *ptr + threshold;
    439                 register const int c_b = *ptr - threshold;
    440                 if(ptr[offset0] > cb)
    441                   if(ptr[offset2] > cb)
    442                     if(ptr[offset3] > cb)
    443                       if(ptr[offset5] > cb)
    444                         if(ptr[offset7] > cb)
    445                           if(ptr[offset1] > cb)
    446                             goto success_structured;
    447                           else
    448                             if(ptr[offset4] > cb)
    449                               if(ptr[offset6] > cb)
    450                                 goto success_structured;
    451                               else
    452                                 goto structured;
    453                             else
    454                               goto structured;
    455                         else
    456                           if(ptr[offset1] > cb)
    457                             if(ptr[offset4] > cb)
    458                               goto success_structured;
    459                             else
    460                               goto structured;
    461                           else
    462                             if(ptr[offset4] > cb)
    463                               if(ptr[offset6] > cb)
    464                                 goto success_structured;
    465                               else
    466                                 goto structured;
    467                             else
    468                               goto structured;
    469                       else
    470                         if(ptr[offset7] > cb)
    471                           if(ptr[offset1] > cb)
    472                             goto success_structured;
    473                           else
    474                             goto structured;
    475                         else
    476                           if(ptr[offset1] > cb)
    477                             if(ptr[offset4] > cb)
    478                               goto success_structured;
    479                             else
    480                               goto structured;
    481                           else
    482                             goto structured;
    483                     else
    484                       if(ptr[offset7] > cb)
    485                         if(ptr[offset6] > cb)
    486                           if(ptr[offset5] > cb)
    487                             if(ptr[offset1] > cb)
    488                               goto success_structured;
    489                             else
    490                               if(ptr[offset4] > cb)
    491                                 goto success_structured;
    492                               else
    493                                 goto structured;
    494                           else
    495                             if(ptr[offset1] > cb)
    496                               goto success_structured;
    497                             else
    498                               goto structured;
    499                         else
    500                           goto structured;
    501                       else
    502                         if(ptr[offset5] < c_b)
    503                           if(ptr[offset3] < c_b)
    504                             if(ptr[offset7] < c_b)
    505                               if(ptr[offset4] < c_b)
    506                                 if(ptr[offset6] < c_b)
    507                                   goto success_structured;
    508                                 else
    509                                   goto structured;
    510                               else
    511                                 goto structured;
    512                             else
    513                               goto homogeneous;
    514                           else
    515                             goto homogeneous;
    516                         else
    517                           goto structured;
    518                   else
    519                     if(ptr[offset5] > cb)
    520                       if(ptr[offset7] > cb)
    521                         if(ptr[offset6] > cb)
    522                           if(ptr[offset1] > cb)
    523                             goto success_structured;
    524                           else
    525                             if(ptr[offset4] > cb)
    526                               goto success_structured;
    527                             else
    528                               goto structured;
    529                         else
    530                           goto structured;
    531                       else
    532                         goto structured;
    533                     else
    534                       if(ptr[offset5] < c_b)
    535                         if(ptr[offset3] < c_b)
    536                           if(ptr[offset2] < c_b)
    537                             if(ptr[offset1] < c_b)
    538                               if(ptr[offset4] < c_b)
    539                                 goto success_structured;
    540                               else
    541                                 goto structured;
    542                             else
    543                               if(ptr[offset4] < c_b)
    544                                 if(ptr[offset6] < c_b)
    545                                   goto success_structured;
    546                                 else
    547                                   goto structured;
    548                               else
    549                                 goto structured;
    550                           else
    551                             if(ptr[offset7] < c_b)
    552                               if(ptr[offset4] < c_b)
    553                                 if(ptr[offset6] < c_b)
    554                                   goto success_homogeneous;
    555                                 else
    556                                   goto homogeneous;
    557                               else
    558                                 goto homogeneous;
    559                             else
    560                               goto homogeneous;
    561                         else
    562                           goto structured;
    563                       else
    564                         goto homogeneous;
    565                 else if(ptr[offset0] < c_b)
    566                   if(ptr[offset2] < c_b)
    567                     if(ptr[offset7] > cb)
    568                       if(ptr[offset3] < c_b)
    569                         if(ptr[offset5] < c_b)
    570                           if(ptr[offset1] < c_b)
    571                             if(ptr[offset4] < c_b)
    572                               goto success_structured;
    573                             else
    574                               goto structured;
    575                           else
    576                             if(ptr[offset4] < c_b)
    577                               if(ptr[offset6] < c_b)
    578                                 goto success_structured;
    579                               else
    580                                 goto structured;
    581                             else
    582                               goto structured;
    583                         else
    584                           if(ptr[offset1] < c_b)
    585                             if(ptr[offset4] < c_b)
    586                               goto success_structured;
    587                             else
    588                               goto structured;
    589                           else
    590                             goto structured;
    591                       else
    592                         if(ptr[offset5] > cb)
    593                           if(ptr[offset3] > cb)
    594                             if(ptr[offset4] > cb)
    595                               if(ptr[offset6] > cb)
    596                                 goto success_structured;
    597                               else
    598                                 goto structured;
    599                             else
    600                               goto structured;
    601                           else
    602                             goto homogeneous;
    603                         else
    604                           goto structured;
    605                     else
    606                       if(ptr[offset7] < c_b)
    607                         if(ptr[offset3] < c_b)
    608                           if(ptr[offset5] < c_b)
    609                             if(ptr[offset1] < c_b)
    610                               goto success_structured;
    611                             else
    612                               if(ptr[offset4] < c_b)
    613                                 if(ptr[offset6] < c_b)
    614                                   goto success_structured;
    615                                 else
    616                                   goto structured;
    617                               else
    618                                 goto structured;
    619                           else
    620                             if(ptr[offset1] < c_b)
    621                               goto success_structured;
    622                             else
    623                               goto structured;
    624                         else
    625                           if(ptr[offset6] < c_b)
    626                             if(ptr[offset5] < c_b)
    627                               if(ptr[offset1] < c_b)
    628                                 goto success_structured;
    629                               else
    630                                 if(ptr[offset4] < c_b)
    631                                   goto success_structured;
    632                                 else
    633                                   goto structured;
    634                             else
    635                               if(ptr[offset1] < c_b)
    636                                 goto success_structured;
    637                               else
    638                                 goto structured;
    639                           else
    640                             goto structured;
    641                       else
    642                         if(ptr[offset3] < c_b)
    643                           if(ptr[offset5] < c_b)
    644                             if(ptr[offset1] < c_b)
    645                               if(ptr[offset4] < c_b)
    646                                 goto success_homogeneous;
    647                               else
    648                                 goto homogeneous;
    649                             else
    650                               if(ptr[offset4] < c_b)
    651                                 if(ptr[offset6] < c_b)
    652                                   goto success_homogeneous;
    653                                 else
    654                                   goto homogeneous;
    655                               else
    656                                 goto homogeneous;
    657                           else
    658                             if(ptr[offset1] < c_b)
    659                               if(ptr[offset4] < c_b)
    660                                 goto success_homogeneous;
    661                               else
    662                                 goto homogeneous;
    663                             else
    664                               goto homogeneous;
    665                         else
    666                           goto homogeneous;
    667                   else
    668                     if(ptr[offset5] > cb)
    669                       if(ptr[offset3] > cb)
    670                         if(ptr[offset2] > cb)
    671                           if(ptr[offset1] > cb)
    672                             if(ptr[offset4] > cb)
    673                               goto success_structured;
    674                             else
    675                               goto structured;
    676                           else
    677                             if(ptr[offset4] > cb)
    678                               if(ptr[offset6] > cb)
    679                                 goto success_structured;
    680                               else
    681                                 goto structured;
    682                             else
    683                               goto structured;
    684                         else
    685                           if(ptr[offset7] > cb)
    686                             if(ptr[offset4] > cb)
    687                               if(ptr[offset6] > cb)
    688                                 goto success_homogeneous;
    689                               else
    690                                 goto homogeneous;
    691                             else
    692                               goto homogeneous;
    693                           else
    694                             goto homogeneous;
    695                       else
    696                         goto structured;
    697                     else
    698                       if(ptr[offset5] < c_b)
    699                         if(ptr[offset7] < c_b)
    700                           if(ptr[offset6] < c_b)
    701                             if(ptr[offset1] < c_b)
    702                               goto success_structured;
    703                             else
    704                               if(ptr[offset4] < c_b)
    705                                 goto success_structured;
    706                               else
    707                                 goto structured;
    708                           else
    709                             goto structured;
    710                         else
    711                           goto structured;
    712                       else
    713                         goto homogeneous;
    714                 else
    715                   if(ptr[offset3] > cb)
    716                     if(ptr[offset5] > cb)
    717                       if(ptr[offset2] > cb)
    718                         if(ptr[offset1] > cb)
    719                           if(ptr[offset4] > cb)
    720                             goto success_homogeneous;
    721                           else
    722                             goto homogeneous;
    723                         else
    724                           if(ptr[offset4] > cb)
    725                             if(ptr[offset6] > cb)
    726                               goto success_homogeneous;
    727                             else
    728                               goto homogeneous;
    729                           else
    730                             goto homogeneous;
    731                       else
    732                         if(ptr[offset7] > cb)
    733                           if(ptr[offset4] > cb)
    734                             if(ptr[offset6] > cb)
    735                               goto success_homogeneous;
    736                             else
    737                               goto homogeneous;
    738                           else
    739                             goto homogeneous;
    740                         else
    741                           goto homogeneous;
    742                     else
    743                       goto homogeneous;
    744                   else
    745                     if(ptr[offset3] < c_b)
    746                       if(ptr[offset5] < c_b)
    747                         if(ptr[offset2] < c_b)
    748                           if(ptr[offset1] < c_b)
    749                             if(ptr[offset4] < c_b)
    750                               goto success_homogeneous;
    751                             else
    752                               goto homogeneous;
    753                           else
    754                             if(ptr[offset4] < c_b)
    755                               if(ptr[offset6] < c_b)
    756                                 goto success_homogeneous;
    757                               else
    758                                 goto homogeneous;
    759                             else
    760                               goto homogeneous;
    761                         else
    762                           if(ptr[offset7] < c_b)
    763                             if(ptr[offset4] < c_b)
    764                               if(ptr[offset6] < c_b)
    765                                 goto success_homogeneous;
    766                               else
    767                                 goto homogeneous;
    768                             else
    769                               goto homogeneous;
    770                           else
    771                             goto homogeneous;
    772                       else
    773                         goto homogeneous;
    774                     else
    775                       goto homogeneous;
    776             }
    777           }
    778             success_homogeneous:
    779             if(total == nExpectedCorners)
    780             {
    781                 if(nExpectedCorners == 0)
    782                 {
    783                     nExpectedCorners = 512;
    784                     keypoints.reserve(nExpectedCorners);
    785                 }
    786                 else
    787                 {
    788                     nExpectedCorners *= 2;
    789                     keypoints.reserve(nExpectedCorners);
    790                 }
    791             }
    792             keypoints.push_back(KeyPoint(Point2f((float)x, (float)y), 1.0f));
    793             total++;
    794             goto homogeneous;
    795             success_structured:
    796             if(total == nExpectedCorners)
    797             {
    798                 if(nExpectedCorners == 0)
    799                 {
    800                     nExpectedCorners = 512;
    801                     keypoints.reserve(nExpectedCorners);
    802                 }
    803                 else
    804                 {
    805                     nExpectedCorners *= 2;
    806                     keypoints.reserve(nExpectedCorners);
    807                 }
    808             }
    809             keypoints.push_back(KeyPoint(Point2f((float)x, (float)y), 1.0f));
    810             total++;
    811             goto structured;
    812         }
    813     }
    814 }
    815 
    816 static void AGAST_7_12d(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold)
    817 {
    818     cv::Mat img;
    819     if(!_img.getMat().isContinuous())
    820       img = _img.getMat().clone();
    821     else
    822       img = _img.getMat();
    823 
    824     size_t total = 0;
    825     int xsize = img.cols;
    826     int ysize = img.rows;
    827     size_t nExpectedCorners = keypoints.capacity();
    828     register int x, y;
    829     register int xsizeB = xsize - 4;
    830     register int ysizeB = ysize - 3;
    831     register int width;
    832 
    833     keypoints.resize(0);
    834 
    835     int pixel_7_12d_[16];
    836     makeAgastOffsets(pixel_7_12d_, (int)img.step, AgastFeatureDetector::AGAST_7_12d);
    837 
    838     register short offset0 = (short) pixel_7_12d_[0];
    839     register short offset1 = (short) pixel_7_12d_[1];
    840     register short offset2 = (short) pixel_7_12d_[2];
    841     register short offset3 = (short) pixel_7_12d_[3];
    842     register short offset4 = (short) pixel_7_12d_[4];
    843     register short offset5 = (short) pixel_7_12d_[5];
    844     register short offset6 = (short) pixel_7_12d_[6];
    845     register short offset7 = (short) pixel_7_12d_[7];
    846     register short offset8 = (short) pixel_7_12d_[8];
    847     register short offset9 = (short) pixel_7_12d_[9];
    848     register short offset10 = (short) pixel_7_12d_[10];
    849     register short offset11 = (short) pixel_7_12d_[11];
    850 
    851     width = xsize;
    852 
    853     for(y = 3; y < ysizeB; y++)
    854     {
    855         x = 2;
    856         while(true)
    857         {
    858           homogeneous:
    859           {
    860             x++;
    861             if(x > xsizeB)
    862                 break;
    863             else
    864             {
    865                 register const unsigned char* const ptr = img.ptr() + y*width + x;
    866                 register const int cb = *ptr + threshold;
    867                 register const int c_b = *ptr - threshold;
    868                 if(ptr[offset0] > cb)
    869                   if(ptr[offset5] > cb)
    870                     if(ptr[offset2] > cb)
    871                       if(ptr[offset9] > cb)
    872                         if(ptr[offset1] > cb)
    873                           if(ptr[offset6] > cb)
    874                             if(ptr[offset3] > cb)
    875                               if(ptr[offset4] > cb)
    876                                 goto success_homogeneous;
    877                               else
    878                                 if(ptr[offset10] > cb)
    879                                   if(ptr[offset11] > cb)
    880                                     goto success_structured;
    881                                   else
    882                                     goto homogeneous;
    883                                 else
    884                                   goto homogeneous;
    885                             else
    886                               if(ptr[offset8] > cb)
    887                                 if(ptr[offset10] > cb)
    888                                   if(ptr[offset11] > cb)
    889                                     goto success_structured;
    890                                   else
    891                                     if(ptr[offset4] > cb)
    892                                       if(ptr[offset7] > cb)
    893                                         goto success_structured;
    894                                       else
    895                                         goto structured;
    896                                     else
    897                                       goto homogeneous;
    898                                 else
    899                                   goto homogeneous;
    900                               else
    901                                 goto homogeneous;
    902                           else
    903                             if(ptr[offset11] > cb)
    904                               if(ptr[offset3] > cb)
    905                                 if(ptr[offset4] > cb)
    906                                   goto success_homogeneous;
    907                                 else
    908                                   if(ptr[offset10] > cb)
    909                                     goto success_homogeneous;
    910                                   else
    911                                     goto homogeneous;
    912                               else
    913                                 if(ptr[offset8] > cb)
    914                                   if(ptr[offset10] > cb)
    915                                     goto success_homogeneous;
    916                                   else
    917                                     goto homogeneous;
    918                                 else
    919                                   goto homogeneous;
    920                             else
    921                               goto homogeneous;
    922                         else
    923                           if(ptr[offset6] > cb)
    924                             if(ptr[offset7] > cb)
    925                               if(ptr[offset8] > cb)
    926                                 if(ptr[offset4] > cb)
    927                                   if(ptr[offset3] > cb)
    928                                     goto success_structured;
    929                                   else
    930                                     if(ptr[offset10] > cb)
    931                                       goto success_structured;
    932                                     else
    933                                       goto homogeneous;
    934                                 else
    935                                   if(ptr[offset10] > cb)
    936                                     if(ptr[offset11] > cb)
    937                                       goto success_structured;
    938                                     else
    939                                       goto homogeneous;
    940                                   else
    941                                     goto homogeneous;
    942                               else
    943                                 goto homogeneous;
    944                             else
    945                               goto homogeneous;
    946                           else
    947                             goto homogeneous;
    948                       else
    949                         if(ptr[offset3] > cb)
    950                           if(ptr[offset4] > cb)
    951                             if(ptr[offset1] > cb)
    952                               if(ptr[offset6] > cb)
    953                                 goto success_homogeneous;
    954                               else
    955                                 if(ptr[offset11] > cb)
    956                                   goto success_homogeneous;
    957                                 else
    958                                   goto homogeneous;
    959                             else
    960                               if(ptr[offset6] > cb)
    961                                 if(ptr[offset7] > cb)
    962                                   if(ptr[offset8] > cb)
    963                                     goto success_homogeneous;
    964                                   else
    965                                     goto homogeneous;
    966                                 else
    967                                   goto homogeneous;
    968                               else
    969                                 goto homogeneous;
    970                           else
    971                             goto homogeneous;
    972                         else
    973                           goto homogeneous;
    974                     else
    975                       if(ptr[offset9] > cb)
    976                         if(ptr[offset7] > cb)
    977                           if(ptr[offset8] > cb)
    978                             if(ptr[offset1] > cb)
    979                               if(ptr[offset10] > cb)
    980                                 if(ptr[offset11] > cb)
    981                                   goto success_homogeneous;
    982                                 else
    983                                   if(ptr[offset6] > cb)
    984                                     if(ptr[offset4] > cb)
    985                                       goto success_structured;
    986                                     else
    987                                       goto homogeneous;
    988                                   else
    989                                     goto homogeneous;
    990                               else
    991                                 if(ptr[offset6] > cb)
    992                                   if(ptr[offset3] > cb)
    993                                     if(ptr[offset4] > cb)
    994                                       goto success_structured;
    995                                     else
    996                                       goto homogeneous;
    997                                   else
    998                                     goto homogeneous;
    999                                 else
   1000                                   goto homogeneous;
   1001                             else
   1002                               if(ptr[offset6] > cb)
   1003                                 if(ptr[offset4] > cb)
   1004                                   if(ptr[offset3] > cb)
   1005                                     goto success_homogeneous;
   1006                                   else
   1007                                     if(ptr[offset10] > cb)
   1008                                       goto success_homogeneous;
   1009                                     else
   1010                                       goto homogeneous;
   1011                                 else
   1012                                   if(ptr[offset10] > cb)
   1013                                     if(ptr[offset11] > cb)
   1014                                       goto success_homogeneous;
   1015                                     else
   1016                                       goto homogeneous;
   1017                                   else
   1018                                     goto homogeneous;
   1019                               else
   1020                                 goto homogeneous;
   1021                           else
   1022                             goto homogeneous;
   1023                         else
   1024                           goto homogeneous;
   1025                       else
   1026                         goto homogeneous;
   1027                   else
   1028                     if(ptr[offset5] < c_b)
   1029                       if(ptr[offset9] > cb)
   1030                         if(ptr[offset3] < c_b)
   1031                           if(ptr[offset4] < c_b)
   1032                             if(ptr[offset11] > cb)
   1033                               if(ptr[offset1] > cb)
   1034                                 if(ptr[offset8] > cb)
   1035                                   if(ptr[offset10] > cb)
   1036                                     if(ptr[offset2] > cb)
   1037                                       goto success_structured;
   1038                                     else
   1039                                       if(ptr[offset7] > cb)
   1040                                         goto success_structured;
   1041                                       else
   1042                                         goto structured;
   1043                                   else
   1044                                     goto homogeneous;
   1045                                 else
   1046                                   if(ptr[offset6] < c_b)
   1047                                     if(ptr[offset2] < c_b)
   1048                                       if(ptr[offset7] < c_b)
   1049                                         if(ptr[offset8] < c_b)
   1050                                           goto success_structured;
   1051                                         else
   1052                                           goto structured;
   1053                                       else
   1054                                         goto structured;
   1055                                     else
   1056                                       goto homogeneous;
   1057                                   else
   1058                                     goto homogeneous;
   1059                               else
   1060                                 if(ptr[offset6] > cb)
   1061                                   if(ptr[offset7] > cb)
   1062                                     if(ptr[offset8] > cb)
   1063                                       if(ptr[offset10] > cb)
   1064                                         goto success_structured;
   1065                                       else
   1066                                         goto structured;
   1067                                     else
   1068                                       goto homogeneous;
   1069                                   else
   1070                                     goto homogeneous;
   1071                                 else
   1072                                   if(ptr[offset6] < c_b)
   1073                                     if(ptr[offset2] < c_b)
   1074                                       if(ptr[offset7] < c_b)
   1075                                         if(ptr[offset1] < c_b)
   1076                                           goto success_structured;
   1077                                         else
   1078                                           if(ptr[offset8] < c_b)
   1079                                             goto success_structured;
   1080                                           else
   1081                                             goto structured;
   1082                                       else
   1083                                         goto homogeneous;
   1084                                     else
   1085                                       goto homogeneous;
   1086                                   else
   1087                                     goto homogeneous;
   1088                             else
   1089                               if(ptr[offset2] < c_b)
   1090                                 if(ptr[offset7] < c_b)
   1091                                   if(ptr[offset1] < c_b)
   1092                                     if(ptr[offset6] < c_b)
   1093                                       goto success_structured;
   1094                                     else
   1095                                       goto homogeneous;
   1096                                   else
   1097                                     if(ptr[offset6] < c_b)
   1098                                       if(ptr[offset8] < c_b)
   1099                                         goto success_structured;
   1100                                       else
   1101                                         goto homogeneous;
   1102                                     else
   1103                                       goto homogeneous;
   1104                                 else
   1105                                   goto homogeneous;
   1106                               else
   1107                                 goto homogeneous;
   1108                           else
   1109                             if(ptr[offset11] > cb)
   1110                               if(ptr[offset8] > cb)
   1111                                 if(ptr[offset10] > cb)
   1112                                   if(ptr[offset1] > cb)
   1113                                     if(ptr[offset2] > cb)
   1114                                       goto success_structured;
   1115                                     else
   1116                                       if(ptr[offset7] > cb)
   1117                                         goto success_structured;
   1118                                       else
   1119                                         goto homogeneous;
   1120                                   else
   1121                                     if(ptr[offset6] > cb)
   1122                                       if(ptr[offset7] > cb)
   1123                                         goto success_structured;
   1124                                       else
   1125                                         goto homogeneous;
   1126                                     else
   1127                                       goto homogeneous;
   1128                                 else
   1129                                   goto homogeneous;
   1130                               else
   1131                                 goto homogeneous;
   1132                             else
   1133                               goto homogeneous;
   1134                         else
   1135                           if(ptr[offset11] > cb)
   1136                             if(ptr[offset10] > cb)
   1137                               if(ptr[offset3] > cb)
   1138                                 if(ptr[offset1] > cb)
   1139                                   if(ptr[offset2] > cb)
   1140                                     goto success_homogeneous;
   1141                                   else
   1142                                     if(ptr[offset7] > cb)
   1143                                       if(ptr[offset8] > cb)
   1144                                         goto success_structured;
   1145                                       else
   1146                                         goto homogeneous;
   1147                                     else
   1148                                       goto homogeneous;
   1149                                 else
   1150                                   if(ptr[offset6] > cb)
   1151                                     if(ptr[offset7] > cb)
   1152                                       if(ptr[offset8] > cb)
   1153                                         goto success_structured;
   1154                                       else
   1155                                         goto homogeneous;
   1156                                     else
   1157                                       goto homogeneous;
   1158                                   else
   1159                                     goto homogeneous;
   1160                               else
   1161                                 if(ptr[offset8] > cb)
   1162                                   if(ptr[offset1] > cb)
   1163                                     if(ptr[offset2] > cb)
   1164                                       goto success_homogeneous;
   1165                                     else
   1166                                       if(ptr[offset7] > cb)
   1167                                         goto success_homogeneous;
   1168                                       else
   1169                                         goto homogeneous;
   1170                                   else
   1171                                     if(ptr[offset6] > cb)
   1172                                       if(ptr[offset7] > cb)
   1173                                         goto success_homogeneous;
   1174                                       else
   1175                                         goto homogeneous;
   1176                                     else
   1177                                       goto homogeneous;
   1178                                 else
   1179                                   goto homogeneous;
   1180                             else
   1181                               goto homogeneous;
   1182                           else
   1183                             goto homogeneous;
   1184                       else
   1185                         if(ptr[offset9] < c_b)
   1186                           if(ptr[offset2] > cb)
   1187                             if(ptr[offset1] > cb)
   1188                               if(ptr[offset4] > cb)
   1189                                 if(ptr[offset10] > cb)
   1190                                   if(ptr[offset3] > cb)
   1191                                     if(ptr[offset11] > cb)
   1192                                       goto success_structured;
   1193                                     else
   1194                                       goto homogeneous;
   1195                                   else
   1196                                     goto homogeneous;
   1197                                 else
   1198                                   if(ptr[offset6] < c_b)
   1199                                     if(ptr[offset7] < c_b)
   1200                                       if(ptr[offset8] < c_b)
   1201                                         if(ptr[offset11] < c_b)
   1202                                           if(ptr[offset10] < c_b)
   1203                                             goto success_structured;
   1204                                           else
   1205                                             goto structured;
   1206                                         else
   1207                                           goto structured;
   1208                                       else
   1209                                         goto homogeneous;
   1210                                     else
   1211                                       goto homogeneous;
   1212                                   else
   1213                                     goto homogeneous;
   1214                               else
   1215                                 if(ptr[offset6] < c_b)
   1216                                   if(ptr[offset7] < c_b)
   1217                                     if(ptr[offset8] < c_b)
   1218                                       if(ptr[offset10] < c_b)
   1219                                         if(ptr[offset4] < c_b)
   1220                                           goto success_structured;
   1221                                         else
   1222                                           if(ptr[offset11] < c_b)
   1223                                             goto success_structured;
   1224                                           else
   1225                                             goto structured;
   1226                                       else
   1227                                         if(ptr[offset3] < c_b)
   1228                                           if(ptr[offset4] < c_b)
   1229                                             goto success_structured;
   1230                                           else
   1231                                             goto structured;
   1232                                         else
   1233                                           goto homogeneous;
   1234                                     else
   1235                                       goto homogeneous;
   1236                                   else
   1237                                     goto homogeneous;
   1238                                 else
   1239                                   goto homogeneous;
   1240                             else
   1241                               if(ptr[offset6] < c_b)
   1242                                 if(ptr[offset7] < c_b)
   1243                                   if(ptr[offset8] < c_b)
   1244                                     if(ptr[offset4] < c_b)
   1245                                       if(ptr[offset3] < c_b)
   1246                                         goto success_structured;
   1247                                       else
   1248                                         if(ptr[offset10] < c_b)
   1249                                           goto success_structured;
   1250                                         else
   1251                                           goto homogeneous;
   1252                                     else
   1253                                       if(ptr[offset10] < c_b)
   1254                                         if(ptr[offset11] < c_b)
   1255                                           goto success_structured;
   1256                                         else
   1257                                           goto homogeneous;
   1258                                       else
   1259                                         goto homogeneous;
   1260                                   else
   1261                                     goto homogeneous;
   1262                                 else
   1263                                   goto homogeneous;
   1264                               else
   1265                                 goto homogeneous;
   1266                           else
   1267                             if(ptr[offset6] < c_b)
   1268                               if(ptr[offset7] < c_b)
   1269                                 if(ptr[offset8] < c_b)
   1270                                   if(ptr[offset4] < c_b)
   1271                                     if(ptr[offset3] < c_b)
   1272                                       goto success_homogeneous;
   1273                                     else
   1274                                       if(ptr[offset10] < c_b)
   1275                                         goto success_homogeneous;
   1276                                       else
   1277                                         goto homogeneous;
   1278                                   else
   1279                                     if(ptr[offset10] < c_b)
   1280                                       if(ptr[offset11] < c_b)
   1281                                         goto success_homogeneous;
   1282                                       else
   1283                                         goto homogeneous;
   1284                                     else
   1285                                       goto homogeneous;
   1286                                 else
   1287                                   if(ptr[offset2] < c_b)
   1288                                     if(ptr[offset1] < c_b)
   1289                                       if(ptr[offset3] < c_b)
   1290                                         if(ptr[offset4] < c_b)
   1291                                           goto success_structured;
   1292                                         else
   1293                                           goto homogeneous;
   1294                                       else
   1295                                         goto homogeneous;
   1296                                     else
   1297                                       goto homogeneous;
   1298                                   else
   1299                                     goto homogeneous;
   1300                               else
   1301                                 goto homogeneous;
   1302                             else
   1303                               goto homogeneous;
   1304                         else
   1305                           if(ptr[offset2] > cb)
   1306                             if(ptr[offset1] > cb)
   1307                               if(ptr[offset3] > cb)
   1308                                 if(ptr[offset4] > cb)
   1309                                   if(ptr[offset10] > cb)
   1310                                     if(ptr[offset11] > cb)
   1311                                       goto success_homogeneous;
   1312                                     else
   1313                                       goto homogeneous;
   1314                                   else
   1315                                     goto homogeneous;
   1316                                 else
   1317                                   goto homogeneous;
   1318                               else
   1319                                 goto homogeneous;
   1320                             else
   1321                               goto homogeneous;
   1322                           else
   1323                             if(ptr[offset2] < c_b)
   1324                               if(ptr[offset3] < c_b)
   1325                                 if(ptr[offset4] < c_b)
   1326                                   if(ptr[offset7] < c_b)
   1327                                     if(ptr[offset1] < c_b)
   1328                                       if(ptr[offset6] < c_b)
   1329                                         goto success_homogeneous;
   1330                                       else
   1331                                         goto homogeneous;
   1332                                     else
   1333                                       if(ptr[offset6] < c_b)
   1334                                         if(ptr[offset8] < c_b)
   1335                                           goto success_homogeneous;
   1336                                         else
   1337                                           goto homogeneous;
   1338                                       else
   1339                                         goto homogeneous;
   1340                                   else
   1341                                     goto homogeneous;
   1342                                 else
   1343                                   goto homogeneous;
   1344                               else
   1345                                 goto homogeneous;
   1346                             else
   1347                               goto homogeneous;
   1348                     else
   1349                       if(ptr[offset2] > cb)
   1350                         if(ptr[offset10] > cb)
   1351                           if(ptr[offset11] > cb)
   1352                             if(ptr[offset9] > cb)
   1353                               if(ptr[offset1] > cb)
   1354                                 if(ptr[offset3] > cb)
   1355                                   goto success_homogeneous;
   1356                                 else
   1357                                   if(ptr[offset8] > cb)
   1358                                     goto success_homogeneous;
   1359                                   else
   1360                                     goto homogeneous;
   1361                               else
   1362                                 if(ptr[offset6] > cb)
   1363                                   if(ptr[offset7] > cb)
   1364                                     if(ptr[offset8] > cb)
   1365                                       goto success_homogeneous;
   1366                                     else
   1367                                       goto homogeneous;
   1368                                   else
   1369                                     goto homogeneous;
   1370                                 else
   1371                                   goto homogeneous;
   1372                             else
   1373                               if(ptr[offset1] > cb)
   1374                                 if(ptr[offset3] > cb)
   1375                                   if(ptr[offset4] > cb)
   1376                                     goto success_homogeneous;
   1377                                   else
   1378                                     goto homogeneous;
   1379                                 else
   1380                                   goto homogeneous;
   1381                               else
   1382                                 goto homogeneous;
   1383                           else
   1384                             goto homogeneous;
   1385                         else
   1386                           goto homogeneous;
   1387                       else
   1388                         if(ptr[offset9] > cb)
   1389                           if(ptr[offset7] > cb)
   1390                             if(ptr[offset8] > cb)
   1391                               if(ptr[offset10] > cb)
   1392                                 if(ptr[offset11] > cb)
   1393                                   if(ptr[offset1] > cb)
   1394                                     goto success_homogeneous;
   1395                                   else
   1396                                     if(ptr[offset6] > cb)
   1397                                       goto success_homogeneous;
   1398                                     else
   1399                                       goto homogeneous;
   1400                                 else
   1401                                   goto homogeneous;
   1402                               else
   1403                                 goto homogeneous;
   1404                             else
   1405                               goto homogeneous;
   1406                           else
   1407                             goto homogeneous;
   1408                         else
   1409                           goto homogeneous;
   1410                 else if(ptr[offset0] < c_b)
   1411                   if(ptr[offset2] > cb)
   1412                     if(ptr[offset5] > cb)
   1413                       if(ptr[offset7] > cb)
   1414                         if(ptr[offset6] > cb)
   1415                           if(ptr[offset4] > cb)
   1416                             if(ptr[offset3] > cb)
   1417                               if(ptr[offset1] > cb)
   1418                                 goto success_homogeneous;
   1419                               else
   1420                                 if(ptr[offset8] > cb)
   1421                                   goto success_homogeneous;
   1422                                 else
   1423                                   goto homogeneous;
   1424                             else
   1425                               if(ptr[offset9] > cb)
   1426                                 if(ptr[offset8] > cb)
   1427                                   if(ptr[offset10] > cb)
   1428                                     goto success_structured;
   1429                                   else
   1430                                     goto homogeneous;
   1431                                 else
   1432                                   goto homogeneous;
   1433                               else
   1434                                 goto homogeneous;
   1435                           else
   1436                             if(ptr[offset9] > cb)
   1437                               if(ptr[offset8] > cb)
   1438                                 if(ptr[offset10] > cb)
   1439                                   if(ptr[offset11] > cb)
   1440                                     goto success_structured;
   1441                                   else
   1442                                     goto homogeneous;
   1443                                 else
   1444                                   goto homogeneous;
   1445                               else
   1446                                 goto homogeneous;
   1447                             else
   1448                               goto homogeneous;
   1449                         else
   1450                           goto homogeneous;
   1451                       else
   1452                         if(ptr[offset9] < c_b)
   1453                           if(ptr[offset8] < c_b)
   1454                             if(ptr[offset10] < c_b)
   1455                               if(ptr[offset11] < c_b)
   1456                                 if(ptr[offset7] < c_b)
   1457                                   if(ptr[offset1] < c_b)
   1458                                     goto success_structured;
   1459                                   else
   1460                                     if(ptr[offset6] < c_b)
   1461                                       goto success_structured;
   1462                                     else
   1463                                       goto homogeneous;
   1464                                 else
   1465                                   goto homogeneous;
   1466                               else
   1467                                 goto homogeneous;
   1468                             else
   1469                               goto homogeneous;
   1470                           else
   1471                             goto homogeneous;
   1472                         else
   1473                           goto homogeneous;
   1474                     else
   1475                       if(ptr[offset9] < c_b)
   1476                         if(ptr[offset7] < c_b)
   1477                           if(ptr[offset8] < c_b)
   1478                             if(ptr[offset5] < c_b)
   1479                               if(ptr[offset1] < c_b)
   1480                                 if(ptr[offset10] < c_b)
   1481                                   if(ptr[offset11] < c_b)
   1482                                     goto success_structured;
   1483                                   else
   1484                                     if(ptr[offset6] < c_b)
   1485                                       if(ptr[offset4] < c_b)
   1486                                         goto success_structured;
   1487                                       else
   1488                                         goto structured;
   1489                                     else
   1490                                       goto homogeneous;
   1491                                 else
   1492                                   if(ptr[offset6] < c_b)
   1493                                     if(ptr[offset3] < c_b)
   1494                                       if(ptr[offset4] < c_b)
   1495                                         goto success_structured;
   1496                                       else
   1497                                         goto structured;
   1498                                     else
   1499                                       goto homogeneous;
   1500                                   else
   1501                                     goto homogeneous;
   1502                               else
   1503                                 if(ptr[offset6] < c_b)
   1504                                   if(ptr[offset4] < c_b)
   1505                                     if(ptr[offset3] < c_b)
   1506                                       goto success_structured;
   1507                                     else
   1508                                       if(ptr[offset10] < c_b)
   1509                                         goto success_structured;
   1510                                       else
   1511                                         goto homogeneous;
   1512                                   else
   1513                                     if(ptr[offset10] < c_b)
   1514                                       if(ptr[offset11] < c_b)
   1515                                         goto success_structured;
   1516                                       else
   1517                                         goto homogeneous;
   1518                                     else
   1519                                       goto homogeneous;
   1520                                 else
   1521                                   goto homogeneous;
   1522                             else
   1523                               if(ptr[offset10] < c_b)
   1524                                 if(ptr[offset11] < c_b)
   1525                                   if(ptr[offset1] < c_b)
   1526                                     goto success_homogeneous;
   1527                                   else
   1528                                     if(ptr[offset6] < c_b)
   1529                                       goto success_homogeneous;
   1530                                     else
   1531                                       goto homogeneous;
   1532                                 else
   1533                                   goto homogeneous;
   1534                               else
   1535                                 goto homogeneous;
   1536                           else
   1537                             goto homogeneous;
   1538                         else
   1539                           goto homogeneous;
   1540                       else
   1541                         goto homogeneous;
   1542                   else
   1543                     if(ptr[offset2] < c_b)
   1544                       if(ptr[offset9] > cb)
   1545                         if(ptr[offset5] > cb)
   1546                           if(ptr[offset1] < c_b)
   1547                             if(ptr[offset4] < c_b)
   1548                               if(ptr[offset10] < c_b)
   1549                                 if(ptr[offset3] < c_b)
   1550                                   if(ptr[offset11] < c_b)
   1551                                     goto success_structured;
   1552                                   else
   1553                                     goto homogeneous;
   1554                                 else
   1555                                   goto homogeneous;
   1556                               else
   1557                                 if(ptr[offset6] > cb)
   1558                                   if(ptr[offset7] > cb)
   1559                                     if(ptr[offset8] > cb)
   1560                                       if(ptr[offset11] > cb)
   1561                                         if(ptr[offset10] > cb)
   1562                                           goto success_structured;
   1563                                         else
   1564                                           goto structured;
   1565                                       else
   1566                                         goto structured;
   1567                                     else
   1568                                       goto homogeneous;
   1569                                   else
   1570                                     goto homogeneous;
   1571                                 else
   1572                                   goto homogeneous;
   1573                             else
   1574                               if(ptr[offset6] > cb)
   1575                                 if(ptr[offset7] > cb)
   1576                                   if(ptr[offset8] > cb)
   1577                                     if(ptr[offset10] > cb)
   1578                                       if(ptr[offset4] > cb)
   1579                                         goto success_structured;
   1580                                       else
   1581                                         if(ptr[offset11] > cb)
   1582                                           goto success_structured;
   1583                                         else
   1584                                           goto structured;
   1585                                     else
   1586                                       if(ptr[offset3] > cb)
   1587                                         if(ptr[offset4] > cb)
   1588                                           goto success_structured;
   1589                                         else
   1590                                           goto structured;
   1591                                       else
   1592                                         goto homogeneous;
   1593                                   else
   1594                                     goto homogeneous;
   1595                                 else
   1596                                   goto homogeneous;
   1597                               else
   1598                                 goto homogeneous;
   1599                           else
   1600                             if(ptr[offset6] > cb)
   1601                               if(ptr[offset7] > cb)
   1602                                 if(ptr[offset8] > cb)
   1603                                   if(ptr[offset4] > cb)
   1604                                     if(ptr[offset3] > cb)
   1605                                       goto success_structured;
   1606                                     else
   1607                                       if(ptr[offset10] > cb)
   1608                                         goto success_structured;
   1609                                       else
   1610                                         goto homogeneous;
   1611                                   else
   1612                                     if(ptr[offset10] > cb)
   1613                                       if(ptr[offset11] > cb)
   1614                                         goto success_structured;
   1615                                       else
   1616                                         goto homogeneous;
   1617                                     else
   1618                                       goto homogeneous;
   1619                                 else
   1620                                   goto homogeneous;
   1621                               else
   1622                                 goto homogeneous;
   1623                             else
   1624                               goto homogeneous;
   1625                         else
   1626                           if(ptr[offset3] < c_b)
   1627                             if(ptr[offset4] < c_b)
   1628                               if(ptr[offset5] < c_b)
   1629                                 if(ptr[offset1] < c_b)
   1630                                   if(ptr[offset6] < c_b)
   1631                                     goto success_homogeneous;
   1632                                   else
   1633                                     if(ptr[offset11] < c_b)
   1634                                       goto success_homogeneous;
   1635                                     else
   1636                                       goto homogeneous;
   1637                                 else
   1638                                   if(ptr[offset6] < c_b)
   1639                                     if(ptr[offset7] < c_b)
   1640                                       if(ptr[offset8] < c_b)
   1641                                         goto success_structured;
   1642                                       else
   1643                                         goto homogeneous;
   1644                                     else
   1645                                       goto homogeneous;
   1646                                   else
   1647                                     goto homogeneous;
   1648                               else
   1649                                 if(ptr[offset1] < c_b)
   1650                                   if(ptr[offset10] < c_b)
   1651                                     if(ptr[offset11] < c_b)
   1652                                       goto success_homogeneous;
   1653                                     else
   1654                                       goto homogeneous;
   1655                                   else
   1656                                     goto homogeneous;
   1657                                 else
   1658                                   goto homogeneous;
   1659                             else
   1660                               goto homogeneous;
   1661                           else
   1662                             goto homogeneous;
   1663                       else
   1664                         if(ptr[offset9] < c_b)
   1665                           if(ptr[offset5] < c_b)
   1666                             if(ptr[offset1] < c_b)
   1667                               if(ptr[offset6] < c_b)
   1668                                 if(ptr[offset3] < c_b)
   1669                                   if(ptr[offset4] < c_b)
   1670                                     goto success_homogeneous;
   1671                                   else
   1672                                     if(ptr[offset10] < c_b)
   1673                                       if(ptr[offset11] < c_b)
   1674                                         goto success_structured;
   1675                                       else
   1676                                         goto homogeneous;
   1677                                     else
   1678                                       goto homogeneous;
   1679                                 else
   1680                                   if(ptr[offset8] < c_b)
   1681                                     if(ptr[offset10] < c_b)
   1682                                       if(ptr[offset11] < c_b)
   1683                                         goto success_structured;
   1684                                       else
   1685                                         if(ptr[offset4] < c_b)
   1686                                           if(ptr[offset7] < c_b)
   1687                                             goto success_structured;
   1688                                           else
   1689                                             goto structured;
   1690                                         else
   1691                                           goto homogeneous;
   1692                                     else
   1693                                       goto homogeneous;
   1694                                   else
   1695                                     goto homogeneous;
   1696                               else
   1697                                 if(ptr[offset11] < c_b)
   1698                                   if(ptr[offset3] < c_b)
   1699                                     if(ptr[offset4] < c_b)
   1700                                       goto success_homogeneous;
   1701                                     else
   1702                                       if(ptr[offset10] < c_b)
   1703                                         goto success_homogeneous;
   1704                                       else
   1705                                         goto homogeneous;
   1706                                   else
   1707                                     if(ptr[offset8] < c_b)
   1708                                       if(ptr[offset10] < c_b)
   1709                                         goto success_homogeneous;
   1710                                       else
   1711                                         goto homogeneous;
   1712                                     else
   1713                                       goto homogeneous;
   1714                                 else
   1715                                   goto homogeneous;
   1716                             else
   1717                               if(ptr[offset6] < c_b)
   1718                                 if(ptr[offset7] < c_b)
   1719                                   if(ptr[offset8] < c_b)
   1720                                     if(ptr[offset4] < c_b)
   1721                                       if(ptr[offset3] < c_b)
   1722                                         goto success_structured;
   1723                                       else
   1724                                         if(ptr[offset10] < c_b)
   1725                                           goto success_structured;
   1726                                         else
   1727                                           goto homogeneous;
   1728                                     else
   1729                                       if(ptr[offset10] < c_b)
   1730                                         if(ptr[offset11] < c_b)
   1731                                           goto success_structured;
   1732                                         else
   1733                                           goto homogeneous;
   1734                                       else
   1735                                         goto homogeneous;
   1736                                   else
   1737                                     goto homogeneous;
   1738                                 else
   1739                                   goto homogeneous;
   1740                               else
   1741                                 goto homogeneous;
   1742                           else
   1743                             if(ptr[offset10] < c_b)
   1744                               if(ptr[offset11] < c_b)
   1745                                 if(ptr[offset1] < c_b)
   1746                                   if(ptr[offset3] < c_b)
   1747                                     goto success_homogeneous;
   1748                                   else
   1749                                     if(ptr[offset8] < c_b)
   1750                                       goto success_homogeneous;
   1751                                     else
   1752                                       goto homogeneous;
   1753                                 else
   1754                                   if(ptr[offset6] < c_b)
   1755                                     if(ptr[offset7] < c_b)
   1756                                       if(ptr[offset8] < c_b)
   1757                                         goto success_homogeneous;
   1758                                       else
   1759                                         goto homogeneous;
   1760                                     else
   1761                                       goto homogeneous;
   1762                                   else
   1763                                     goto homogeneous;
   1764                               else
   1765                                 goto homogeneous;
   1766                             else
   1767                               goto homogeneous;
   1768                         else
   1769                           if(ptr[offset3] < c_b)
   1770                             if(ptr[offset4] < c_b)
   1771                               if(ptr[offset5] < c_b)
   1772                                 if(ptr[offset1] < c_b)
   1773                                   if(ptr[offset6] < c_b)
   1774                                     goto success_homogeneous;
   1775                                   else
   1776                                     if(ptr[offset11] < c_b)
   1777                                       goto success_homogeneous;
   1778                                     else
   1779                                       goto homogeneous;
   1780                                 else
   1781                                   if(ptr[offset6] < c_b)
   1782                                     if(ptr[offset7] < c_b)
   1783                                       if(ptr[offset8] < c_b)
   1784                                         goto success_homogeneous;
   1785                                       else
   1786                                         goto homogeneous;
   1787                                     else
   1788                                       goto homogeneous;
   1789                                   else
   1790                                     goto homogeneous;
   1791                               else
   1792                                 if(ptr[offset1] < c_b)
   1793                                   if(ptr[offset10] < c_b)
   1794                                     if(ptr[offset11] < c_b)
   1795                                       goto success_homogeneous;
   1796                                     else
   1797                                       goto homogeneous;
   1798                                   else
   1799                                     goto homogeneous;
   1800                                 else
   1801                                   goto homogeneous;
   1802                             else
   1803                               goto homogeneous;
   1804                           else
   1805                             goto homogeneous;
   1806                     else
   1807                       if(ptr[offset9] < c_b)
   1808                         if(ptr[offset7] < c_b)
   1809                           if(ptr[offset8] < c_b)
   1810                             if(ptr[offset5] < c_b)
   1811                               if(ptr[offset1] < c_b)
   1812                                 if(ptr[offset10] < c_b)
   1813                                   if(ptr[offset11] < c_b)
   1814                                     goto success_homogeneous;
   1815                                   else
   1816                                     if(ptr[offset6] < c_b)
   1817                                       if(ptr[offset4] < c_b)
   1818                                         goto success_structured;
   1819                                       else
   1820                                         goto homogeneous;
   1821                                     else
   1822                                       goto homogeneous;
   1823                                 else
   1824                                   if(ptr[offset6] < c_b)
   1825                                     if(ptr[offset3] < c_b)
   1826                                       if(ptr[offset4] < c_b)
   1827                                         goto success_structured;
   1828                                       else
   1829                                         goto homogeneous;
   1830                                     else
   1831                                       goto homogeneous;
   1832                                   else
   1833                                     goto homogeneous;
   1834                               else
   1835                                 if(ptr[offset6] < c_b)
   1836                                   if(ptr[offset4] < c_b)
   1837                                     if(ptr[offset3] < c_b)
   1838                                       goto success_homogeneous;
   1839                                     else
   1840                                       if(ptr[offset10] < c_b)
   1841                                         goto success_homogeneous;
   1842                                       else
   1843                                         goto homogeneous;
   1844                                   else
   1845                                     if(ptr[offset10] < c_b)
   1846                                       if(ptr[offset11] < c_b)
   1847                                         goto success_homogeneous;
   1848                                       else
   1849                                         goto homogeneous;
   1850                                     else
   1851                                       goto homogeneous;
   1852                                 else
   1853                                   goto homogeneous;
   1854                             else
   1855                               if(ptr[offset10] < c_b)
   1856                                 if(ptr[offset11] < c_b)
   1857                                   if(ptr[offset1] < c_b)
   1858                                     goto success_homogeneous;
   1859                                   else
   1860                                     if(ptr[offset6] < c_b)
   1861                                       goto success_homogeneous;
   1862                                     else
   1863                                       goto homogeneous;
   1864                                 else
   1865                                   goto homogeneous;
   1866                               else
   1867                                 goto homogeneous;
   1868                           else
   1869                             goto homogeneous;
   1870                         else
   1871                           goto homogeneous;
   1872                       else
   1873                         if(ptr[offset5] > cb)
   1874                           if(ptr[offset9] > cb)
   1875                             if(ptr[offset6] > cb)
   1876                               if(ptr[offset7] > cb)
   1877                                 if(ptr[offset8] > cb)
   1878                                   if(ptr[offset4] > cb)
   1879                                     if(ptr[offset3] > cb)
   1880                                       goto success_homogeneous;
   1881                                     else
   1882                                       if(ptr[offset10] > cb)
   1883                                         goto success_homogeneous;
   1884                                       else
   1885                                         goto homogeneous;
   1886                                   else
   1887                                     if(ptr[offset10] > cb)
   1888                                       if(ptr[offset11] > cb)
   1889                                         goto success_homogeneous;
   1890                                       else
   1891                                         goto homogeneous;
   1892                                     else
   1893                                       goto homogeneous;
   1894                                 else
   1895                                   goto homogeneous;
   1896                               else
   1897                                 goto homogeneous;
   1898                             else
   1899                               goto homogeneous;
   1900                           else
   1901                             goto homogeneous;
   1902                         else
   1903                           goto homogeneous;
   1904                 else
   1905                   if(ptr[offset5] > cb)
   1906                     if(ptr[offset9] > cb)
   1907                       if(ptr[offset6] > cb)
   1908                         if(ptr[offset7] > cb)
   1909                           if(ptr[offset4] > cb)
   1910                             if(ptr[offset3] > cb)
   1911                               if(ptr[offset8] > cb)
   1912                                 goto success_homogeneous;
   1913                               else
   1914                                 if(ptr[offset1] > cb)
   1915                                   if(ptr[offset2] > cb)
   1916                                     goto success_homogeneous;
   1917                                   else
   1918                                     goto homogeneous;
   1919                                 else
   1920                                   goto homogeneous;
   1921                             else
   1922                               if(ptr[offset8] > cb)
   1923                                 if(ptr[offset10] > cb)
   1924                                   goto success_homogeneous;
   1925                                 else
   1926                                   goto homogeneous;
   1927                               else
   1928                                 goto homogeneous;
   1929                           else
   1930                             if(ptr[offset11] > cb)
   1931                               if(ptr[offset8] > cb)
   1932                                 if(ptr[offset10] > cb)
   1933                                   goto success_homogeneous;
   1934                                 else
   1935                                   goto homogeneous;
   1936                               else
   1937                                 goto homogeneous;
   1938                             else
   1939                               goto homogeneous;
   1940                         else
   1941                           goto homogeneous;
   1942                       else
   1943                         goto homogeneous;
   1944                     else
   1945                       if(ptr[offset2] > cb)
   1946                         if(ptr[offset3] > cb)
   1947                           if(ptr[offset4] > cb)
   1948                             if(ptr[offset7] > cb)
   1949                               if(ptr[offset1] > cb)
   1950                                 if(ptr[offset6] > cb)
   1951                                   goto success_homogeneous;
   1952                                 else
   1953                                   goto homogeneous;
   1954                               else
   1955                                 if(ptr[offset6] > cb)
   1956                                   if(ptr[offset8] > cb)
   1957                                     goto success_homogeneous;
   1958                                   else
   1959                                     goto homogeneous;
   1960                                 else
   1961                                   goto homogeneous;
   1962                             else
   1963                               goto homogeneous;
   1964                           else
   1965                             goto homogeneous;
   1966                         else
   1967                           goto homogeneous;
   1968                       else
   1969                         goto homogeneous;
   1970                   else
   1971                     if(ptr[offset5] < c_b)
   1972                       if(ptr[offset9] < c_b)
   1973                         if(ptr[offset6] < c_b)
   1974                           if(ptr[offset7] < c_b)
   1975                             if(ptr[offset4] < c_b)
   1976                               if(ptr[offset3] < c_b)
   1977                                 if(ptr[offset8] < c_b)
   1978                                   goto success_homogeneous;
   1979                                 else
   1980                                   if(ptr[offset1] < c_b)
   1981                                     if(ptr[offset2] < c_b)
   1982                                       goto success_homogeneous;
   1983                                     else
   1984                                       goto homogeneous;
   1985                                   else
   1986                                     goto homogeneous;
   1987                               else
   1988                                 if(ptr[offset8] < c_b)
   1989                                   if(ptr[offset10] < c_b)
   1990                                     goto success_homogeneous;
   1991                                   else
   1992                                     goto homogeneous;
   1993                                 else
   1994                                   goto homogeneous;
   1995                             else
   1996                               if(ptr[offset11] < c_b)
   1997                                 if(ptr[offset8] < c_b)
   1998                                   if(ptr[offset10] < c_b)
   1999                                     goto success_homogeneous;
   2000                                   else
   2001                                     goto homogeneous;
   2002                                 else
   2003                                   goto homogeneous;
   2004                               else
   2005                                 goto homogeneous;
   2006                           else
   2007                             goto homogeneous;
   2008                         else
   2009                           goto homogeneous;
   2010                       else
   2011                         if(ptr[offset2] < c_b)
   2012                           if(ptr[offset3] < c_b)
   2013                             if(ptr[offset4] < c_b)
   2014                               if(ptr[offset7] < c_b)
   2015                                 if(ptr[offset1] < c_b)
   2016                                   if(ptr[offset6] < c_b)
   2017                                     goto success_homogeneous;
   2018                                   else
   2019                                     goto homogeneous;
   2020                                 else
   2021                                   if(ptr[offset6] < c_b)
   2022                                     if(ptr[offset8] < c_b)
   2023                                       goto success_homogeneous;
   2024                                     else
   2025                                       goto homogeneous;
   2026                                   else
   2027                                     goto homogeneous;
   2028                               else
   2029                                 goto homogeneous;
   2030                             else
   2031                               goto homogeneous;
   2032                           else
   2033                             goto homogeneous;
   2034                         else
   2035                           goto homogeneous;
   2036                     else
   2037                       goto homogeneous;
   2038             }
   2039           }
   2040           structured:
   2041           {
   2042             x++;
   2043             if(x > xsizeB)
   2044                 break;
   2045             else
   2046             {
   2047                 register const unsigned char* const ptr = img.ptr() + y*width + x;
   2048                 register const int cb = *ptr + threshold;
   2049                 register const int c_b = *ptr - threshold;
   2050                 if(ptr[offset0] > cb)
   2051                   if(ptr[offset5] > cb)
   2052                     if(ptr[offset2] > cb)
   2053                       if(ptr[offset9] > cb)
   2054                         if(ptr[offset1] > cb)
   2055                           if(ptr[offset6] > cb)
   2056                             if(ptr[offset3] > cb)
   2057                               if(ptr[offset4] > cb)
   2058                                 goto success_structured;
   2059                               else
   2060                                 if(ptr[offset10] > cb)
   2061                                   if(ptr[offset11] > cb)
   2062                                     goto success_structured;
   2063                                   else
   2064                                     goto structured;
   2065                                 else
   2066                                   goto structured;
   2067                             else
   2068                               if(ptr[offset8] > cb)
   2069                                 if(ptr[offset10] > cb)
   2070                                   if(ptr[offset11] > cb)
   2071                                     goto success_structured;
   2072                                   else
   2073                                     if(ptr[offset4] > cb)
   2074                                       if(ptr[offset7] > cb)
   2075                                         goto success_structured;
   2076                                       else
   2077                                         goto structured;
   2078                                     else
   2079                                       goto structured;
   2080                                 else
   2081                                   goto structured;
   2082                               else
   2083                                 goto structured;
   2084                           else
   2085                             if(ptr[offset11] > cb)
   2086                               if(ptr[offset3] > cb)
   2087                                 if(ptr[offset4] > cb)
   2088                                   goto success_structured;
   2089                                 else
   2090                                   if(ptr[offset10] > cb)
   2091                                     goto success_structured;
   2092                                   else
   2093                                     goto structured;
   2094                               else
   2095                                 if(ptr[offset8] > cb)
   2096                                   if(ptr[offset10] > cb)
   2097                                     goto success_structured;
   2098                                   else
   2099                                     goto structured;
   2100                                 else
   2101                                   goto structured;
   2102                             else
   2103                               goto structured;
   2104                         else
   2105                           if(ptr[offset6] > cb)
   2106                             if(ptr[offset7] > cb)
   2107                               if(ptr[offset8] > cb)
   2108                                 if(ptr[offset4] > cb)
   2109                                   if(ptr[offset3] > cb)
   2110                                     goto success_structured;
   2111                                   else
   2112                                     if(ptr[offset10] > cb)
   2113                                       goto success_structured;
   2114                                     else
   2115                                       goto structured;
   2116                                 else
   2117                                   if(ptr[offset10] > cb)
   2118                                     if(ptr[offset11] > cb)
   2119                                       goto success_structured;
   2120                                     else
   2121                                       goto structured;
   2122                                   else
   2123                                     goto structured;
   2124                               else
   2125                                 goto structured;
   2126                             else
   2127                               goto structured;
   2128                           else
   2129                             goto structured;
   2130                       else
   2131                         if(ptr[offset3] > cb)
   2132                           if(ptr[offset4] > cb)
   2133                             if(ptr[offset1] > cb)
   2134                               if(ptr[offset6] > cb)
   2135                                 goto success_structured;
   2136                               else
   2137                                 if(ptr[offset11] > cb)
   2138                                   goto success_structured;
   2139                                 else
   2140                                   goto structured;
   2141                             else
   2142                               if(ptr[offset6] > cb)
   2143                                 if(ptr[offset7] > cb)
   2144                                   if(ptr[offset8] > cb)
   2145                                     goto success_structured;
   2146                                   else
   2147                                     goto structured;
   2148                                 else
   2149                                   goto structured;
   2150                               else
   2151                                 goto structured;
   2152                           else
   2153                             goto structured;
   2154                         else
   2155                           goto structured;
   2156                     else
   2157                       if(ptr[offset9] > cb)
   2158                         if(ptr[offset7] > cb)
   2159                           if(ptr[offset8] > cb)
   2160                             if(ptr[offset1] > cb)
   2161                               if(ptr[offset10] > cb)
   2162                                 if(ptr[offset11] > cb)
   2163                                   goto success_structured;
   2164                                 else
   2165                                   if(ptr[offset6] > cb)
   2166                                     if(ptr[offset4] > cb)
   2167                                       goto success_structured;
   2168                                     else
   2169                                       goto structured;
   2170                                   else
   2171                                     goto structured;
   2172                               else
   2173                                 if(ptr[offset6] > cb)
   2174                                   if(ptr[offset3] > cb)
   2175                                     if(ptr[offset4] > cb)
   2176                                       goto success_structured;
   2177                                     else
   2178                                       goto structured;
   2179                                   else
   2180                                     goto structured;
   2181                                 else
   2182                                   goto structured;
   2183                             else
   2184                               if(ptr[offset6] > cb)
   2185                                 if(ptr[offset4] > cb)
   2186                                   if(ptr[offset3] > cb)
   2187                                     goto success_structured;
   2188                                   else
   2189                                     if(ptr[offset10] > cb)
   2190                                       goto success_structured;
   2191                                     else
   2192                                       goto structured;
   2193                                 else
   2194                                   if(ptr[offset10] > cb)
   2195                                     if(ptr[offset11] > cb)
   2196                                       goto success_structured;
   2197                                     else
   2198                                       goto structured;
   2199                                   else
   2200                                     goto structured;
   2201                               else
   2202                                 goto structured;
   2203                           else
   2204                             goto structured;
   2205                         else
   2206                           goto structured;
   2207                       else
   2208                         goto structured;
   2209                   else
   2210                     if(ptr[offset5] < c_b)
   2211                       if(ptr[offset9] > cb)
   2212                         if(ptr[offset3] < c_b)
   2213                           if(ptr[offset4] < c_b)
   2214                             if(ptr[offset11] > cb)
   2215                               if(ptr[offset1] > cb)
   2216                                 if(ptr[offset8] > cb)
   2217                                   if(ptr[offset10] > cb)
   2218                                     if(ptr[offset2] > cb)
   2219                                       goto success_structured;
   2220                                     else
   2221                                       if(ptr[offset7] > cb)
   2222                                         goto success_structured;
   2223                                       else
   2224                                         goto structured;
   2225                                   else
   2226                                     goto structured;
   2227                                 else
   2228                                   if(ptr[offset6] < c_b)
   2229                                     if(ptr[offset2] < c_b)
   2230                                       if(ptr[offset7] < c_b)
   2231                                         if(ptr[offset8] < c_b)
   2232                                           goto success_structured;
   2233                                         else
   2234                                           goto structured;
   2235                                       else
   2236                                         goto structured;
   2237                                     else
   2238                                       goto structured;
   2239                                   else
   2240                                     goto structured;
   2241                               else
   2242                                 if(ptr[offset6] > cb)
   2243                                   if(ptr[offset7] > cb)
   2244                                     if(ptr[offset8] > cb)
   2245                                       if(ptr[offset10] > cb)
   2246                                         goto success_structured;
   2247                                       else
   2248                                         goto structured;
   2249                                     else
   2250                                       goto structured;
   2251                                   else
   2252                                     goto structured;
   2253                                 else
   2254                                   if(ptr[offset6] < c_b)
   2255                                     if(ptr[offset2] < c_b)
   2256                                       if(ptr[offset7] < c_b)
   2257                                         if(ptr[offset1] < c_b)
   2258                                           goto success_structured;
   2259                                         else
   2260                                           if(ptr[offset8] < c_b)
   2261                                             goto success_structured;
   2262                                           else
   2263                                             goto structured;
   2264                                       else
   2265                                         goto structured;
   2266                                     else
   2267                                       goto structured;
   2268                                   else
   2269                                     goto structured;
   2270                             else
   2271                               if(ptr[offset2] < c_b)
   2272                                 if(ptr[offset7] < c_b)
   2273                                   if(ptr[offset1] < c_b)
   2274                                     if(ptr[offset6] < c_b)
   2275                                       goto success_structured;
   2276                                     else
   2277                                       goto structured;
   2278                                   else
   2279                                     if(ptr[offset6] < c_b)
   2280                                       if(ptr[offset8] < c_b)
   2281                                         goto success_structured;
   2282                                       else
   2283                                         goto structured;
   2284                                     else
   2285                                       goto structured;
   2286                                 else
   2287                                   goto structured;
   2288                               else
   2289                                 goto structured;
   2290                           else
   2291                             if(ptr[offset11] > cb)
   2292                               if(ptr[offset8] > cb)
   2293                                 if(ptr[offset10] > cb)
   2294                                   if(ptr[offset1] > cb)
   2295                                     if(ptr[offset2] > cb)
   2296                                       goto success_structured;
   2297                                     else
   2298                                       if(ptr[offset7] > cb)
   2299                                         goto success_structured;
   2300                                       else
   2301                                         goto structured;
   2302                                   else
   2303                                     if(ptr[offset6] > cb)
   2304                                       if(ptr[offset7] > cb)
   2305                                         goto success_structured;
   2306                                       else
   2307                                         goto structured;
   2308                                     else
   2309                                       goto structured;
   2310                                 else
   2311                                   goto structured;
   2312                               else
   2313                                 goto structured;
   2314                             else
   2315                               goto structured;
   2316                         else
   2317                           if(ptr[offset11] > cb)
   2318                             if(ptr[offset10] > cb)
   2319                               if(ptr[offset3] > cb)
   2320                                 if(ptr[offset1] > cb)
   2321                                   if(ptr[offset2] > cb)
   2322                                     goto success_structured;
   2323                                   else
   2324                                     if(ptr[offset7] > cb)
   2325                                       if(ptr[offset8] > cb)
   2326                                         goto success_structured;
   2327                                       else
   2328                                         goto structured;
   2329                                     else
   2330                                       goto structured;
   2331                                 else
   2332                                   if(ptr[offset6] > cb)
   2333                                     if(ptr[offset7] > cb)
   2334                                       if(ptr[offset8] > cb)
   2335                                         goto success_structured;
   2336                                       else
   2337                                         goto structured;
   2338                                     else
   2339                                       goto structured;
   2340                                   else
   2341                                     goto structured;
   2342                               else
   2343                                 if(ptr[offset8] > cb)
   2344                                   if(ptr[offset1] > cb)
   2345                                     if(ptr[offset2] > cb)
   2346                                       goto success_structured;
   2347                                     else
   2348                                       if(ptr[offset7] > cb)
   2349                                         goto success_structured;
   2350                                       else
   2351                                         goto structured;
   2352                                   else
   2353                                     if(ptr[offset6] > cb)
   2354                                       if(ptr[offset7] > cb)
   2355                                         goto success_structured;
   2356                                       else
   2357                                         goto structured;
   2358                                     else
   2359                                       goto structured;
   2360                                 else
   2361                                   goto structured;
   2362                             else
   2363                               goto structured;
   2364                           else
   2365                             goto structured;
   2366                       else
   2367                         if(ptr[offset9] < c_b)
   2368                           if(ptr[offset2] > cb)
   2369                             if(ptr[offset1] > cb)
   2370                               if(ptr[offset4] > cb)
   2371                                 if(ptr[offset10] > cb)
   2372                                   if(ptr[offset3] > cb)
   2373                                     if(ptr[offset11] > cb)
   2374                                       goto success_structured;
   2375                                     else
   2376                                       goto structured;
   2377                                   else
   2378                                     goto structured;
   2379                                 else
   2380                                   if(ptr[offset6] < c_b)
   2381                                     if(ptr[offset7] < c_b)
   2382                                       if(ptr[offset8] < c_b)
   2383                                         if(ptr[offset11] < c_b)
   2384                                           if(ptr[offset10] < c_b)
   2385                                             goto success_structured;
   2386                                           else
   2387                                             goto structured;
   2388                                         else
   2389                                           goto structured;
   2390                                       else
   2391                                         goto structured;
   2392                                     else
   2393                                       goto structured;
   2394                                   else
   2395                                     goto structured;
   2396                               else
   2397                                 if(ptr[offset6] < c_b)
   2398                                   if(ptr[offset7] < c_b)
   2399                                     if(ptr[offset8] < c_b)
   2400                                       if(ptr[offset10] < c_b)
   2401                                         if(ptr[offset4] < c_b)
   2402                                           goto success_structured;
   2403                                         else
   2404                                           if(ptr[offset11] < c_b)
   2405                                             goto success_structured;
   2406                                           else
   2407                                             goto structured;
   2408                                       else
   2409                                         if(ptr[offset3] < c_b)
   2410                                           if(ptr[offset4] < c_b)
   2411                                             goto success_structured;
   2412                                           else
   2413                                             goto structured;
   2414                                         else
   2415                                           goto structured;
   2416                                     else
   2417                                       goto structured;
   2418                                   else
   2419                                     goto structured;
   2420                                 else
   2421                                   goto structured;
   2422                             else
   2423                               if(ptr[offset6] < c_b)
   2424                                 if(ptr[offset7] < c_b)
   2425                                   if(ptr[offset8] < c_b)
   2426                                     if(ptr[offset4] < c_b)
   2427                                       if(ptr[offset3] < c_b)
   2428                                         goto success_structured;
   2429                                       else
   2430                                         if(ptr[offset10] < c_b)
   2431                                           goto success_structured;
   2432                                         else
   2433                                           goto structured;
   2434                                     else
   2435                                       if(ptr[offset10] < c_b)
   2436                                         if(ptr[offset11] < c_b)
   2437                                           goto success_structured;
   2438                                         else
   2439                                           goto structured;
   2440                                       else
   2441                                         goto structured;
   2442                                   else
   2443                                     goto structured;
   2444                                 else
   2445                                   goto structured;
   2446                               else
   2447                                 goto structured;
   2448                           else
   2449                             if(ptr[offset6] < c_b)
   2450                               if(ptr[offset7] < c_b)
   2451                                 if(ptr[offset8] < c_b)
   2452                                   if(ptr[offset4] < c_b)
   2453                                     if(ptr[offset3] < c_b)
   2454                                       goto success_structured;
   2455                                     else
   2456                                       if(ptr[offset10] < c_b)
   2457                                         goto success_structured;
   2458                                       else
   2459                                         goto structured;
   2460                                   else
   2461                                     if(ptr[offset10] < c_b)
   2462                                       if(ptr[offset11] < c_b)
   2463                                         goto success_structured;
   2464                                       else
   2465                                         goto structured;
   2466                                     else
   2467                                       goto structured;
   2468                                 else
   2469                                   if(ptr[offset2] < c_b)
   2470                                     if(ptr[offset1] < c_b)
   2471                                       if(ptr[offset3] < c_b)
   2472                                         if(ptr[offset4] < c_b)
   2473                                           goto success_structured;
   2474                                         else
   2475                                           goto structured;
   2476                                       else
   2477                                         goto structured;
   2478                                     else
   2479                                       goto structured;
   2480                                   else
   2481                                     goto structured;
   2482                               else
   2483                                 goto structured;
   2484                             else
   2485                               goto structured;
   2486                         else
   2487                           if(ptr[offset2] > cb)
   2488                             if(ptr[offset1] > cb)
   2489                               if(ptr[offset3] > cb)
   2490                                 if(ptr[offset4] > cb)
   2491                                   if(ptr[offset10] > cb)
   2492                                     if(ptr[offset11] > cb)
   2493                                       goto success_structured;
   2494                                     else
   2495                                       goto structured;
   2496                                   else
   2497                                     goto structured;
   2498                                 else
   2499                                   goto structured;
   2500                               else
   2501                                 goto structured;
   2502                             else
   2503                               goto structured;
   2504                           else
   2505                             if(ptr[offset2] < c_b)
   2506                               if(ptr[offset3] < c_b)
   2507                                 if(ptr[offset4] < c_b)
   2508                                   if(ptr[offset7] < c_b)
   2509                                     if(ptr[offset1] < c_b)
   2510                                       if(ptr[offset6] < c_b)
   2511                                         goto success_structured;
   2512                                       else
   2513                                         goto structured;
   2514                                     else
   2515                                       if(ptr[offset6] < c_b)
   2516                                         if(ptr[offset8] < c_b)
   2517                                           goto success_structured;
   2518                                         else
   2519                                           goto structured;
   2520                                       else
   2521                                         goto structured;
   2522                                   else
   2523                                     goto structured;
   2524                                 else
   2525                                   goto structured;
   2526                               else
   2527                                 goto structured;
   2528                             else
   2529                               goto homogeneous;
   2530                     else
   2531                       if(ptr[offset2] > cb)
   2532                         if(ptr[offset10] > cb)
   2533                           if(ptr[offset11] > cb)
   2534                             if(ptr[offset9] > cb)
   2535                               if(ptr[offset1] > cb)
   2536                                 if(ptr[offset3] > cb)
   2537                                   goto success_structured;
   2538                                 else
   2539                                   if(ptr[offset8] > cb)
   2540                                     goto success_structured;
   2541                                   else
   2542                                     goto structured;
   2543                               else
   2544                                 if(ptr[offset6] > cb)
   2545                                   if(ptr[offset7] > cb)
   2546                                     if(ptr[offset8] > cb)
   2547                                       goto success_structured;
   2548                                     else
   2549                                       goto structured;
   2550                                   else
   2551                                     goto structured;
   2552                                 else
   2553                                   goto structured;
   2554                             else
   2555                               if(ptr[offset1] > cb)
   2556                                 if(ptr[offset3] > cb)
   2557                                   if(ptr[offset4] > cb)
   2558                                     goto success_structured;
   2559                                   else
   2560                                     goto structured;
   2561                                 else
   2562                                   goto structured;
   2563                               else
   2564                                 goto structured;
   2565                           else
   2566                             goto structured;
   2567                         else
   2568                           goto structured;
   2569                       else
   2570                         if(ptr[offset9] > cb)
   2571                           if(ptr[offset7] > cb)
   2572                             if(ptr[offset8] > cb)
   2573                               if(ptr[offset10] > cb)
   2574                                 if(ptr[offset11] > cb)
   2575                                   if(ptr[offset1] > cb)
   2576                                     goto success_structured;
   2577                                   else
   2578                                     if(ptr[offset6] > cb)
   2579                                       goto success_structured;
   2580                                     else
   2581                                       goto structured;
   2582                                 else
   2583                                   goto structured;
   2584                               else
   2585                                 goto structured;
   2586                             else
   2587                               goto structured;
   2588                           else
   2589                             goto structured;
   2590                         else
   2591                           goto structured;
   2592                 else if(ptr[offset0] < c_b)
   2593                   if(ptr[offset2] > cb)
   2594                     if(ptr[offset5] > cb)
   2595                       if(ptr[offset7] > cb)
   2596                         if(ptr[offset6] > cb)
   2597                           if(ptr[offset4] > cb)
   2598                             if(ptr[offset3] > cb)
   2599                               if(ptr[offset1] > cb)
   2600                                 goto success_structured;
   2601                               else
   2602                                 if(ptr[offset8] > cb)
   2603                                   goto success_structured;
   2604                                 else
   2605                                   goto structured;
   2606                             else
   2607                               if(ptr[offset9] > cb)
   2608                                 if(ptr[offset8] > cb)
   2609                                   if(ptr[offset10] > cb)
   2610                                     goto success_structured;
   2611                                   else
   2612                                     goto structured;
   2613                                 else
   2614                                   goto structured;
   2615                               else
   2616                                 goto structured;
   2617                           else
   2618                             if(ptr[offset9] > cb)
   2619                               if(ptr[offset8] > cb)
   2620                                 if(ptr[offset10] > cb)
   2621                                   if(ptr[offset11] > cb)
   2622                                     goto success_structured;
   2623                                   else
   2624                                     goto structured;
   2625                                 else
   2626                                   goto structured;
   2627                               else
   2628                                 goto structured;
   2629                             else
   2630                               goto structured;
   2631                         else
   2632                           goto structured;
   2633                       else
   2634                         if(ptr[offset9] < c_b)
   2635                           if(ptr[offset8] < c_b)
   2636                             if(ptr[offset10] < c_b)
   2637                               if(ptr[offset11] < c_b)
   2638                                 if(ptr[offset7] < c_b)
   2639                                   if(ptr[offset1] < c_b)
   2640                                     goto success_structured;
   2641                                   else
   2642                                     if(ptr[offset6] < c_b)
   2643                                       goto success_structured;
   2644                                     else
   2645                                       goto structured;
   2646                                 else
   2647                                   goto structured;
   2648                               else
   2649                                 goto structured;
   2650                             else
   2651                               goto structured;
   2652                           else
   2653                             goto structured;
   2654                         else
   2655                           goto structured;
   2656                     else
   2657                       if(ptr[offset9] < c_b)
   2658                         if(ptr[offset7] < c_b)
   2659                           if(ptr[offset8] < c_b)
   2660                             if(ptr[offset5] < c_b)
   2661                               if(ptr[offset1] < c_b)
   2662                                 if(ptr[offset10] < c_b)
   2663                                   if(ptr[offset11] < c_b)
   2664                                     goto success_structured;
   2665                                   else
   2666                                     if(ptr[offset6] < c_b)
   2667                                       if(ptr[offset4] < c_b)
   2668                                         goto success_structured;
   2669                                       else
   2670                                         goto structured;
   2671                                     else
   2672                                       goto structured;
   2673                                 else
   2674                                   if(ptr[offset6] < c_b)
   2675                                     if(ptr[offset3] < c_b)
   2676                                       if(ptr[offset4] < c_b)
   2677                                         goto success_structured;
   2678                                       else
   2679                                         goto structured;
   2680                                     else
   2681                                       goto structured;
   2682                                   else
   2683                                     goto structured;
   2684                               else
   2685                                 if(ptr[offset6] < c_b)
   2686                                   if(ptr[offset4] < c_b)
   2687                                     if(ptr[offset3] < c_b)
   2688                                       goto success_structured;
   2689                                     else
   2690                                       if(ptr[offset10] < c_b)
   2691                                         goto success_structured;
   2692                                       else
   2693                                         goto structured;
   2694                                   else
   2695                                     if(ptr[offset10] < c_b)
   2696                                       if(ptr[offset11] < c_b)
   2697                                         goto success_structured;
   2698                                       else
   2699                                         goto structured;
   2700                                     else
   2701                                       goto structured;
   2702                                 else
   2703                                   goto structured;
   2704                             else
   2705                               if(ptr[offset10] < c_b)
   2706                                 if(ptr[offset11] < c_b)
   2707                                   if(ptr[offset1] < c_b)
   2708                                     goto success_structured;
   2709                                   else
   2710                                     if(ptr[offset6] < c_b)
   2711                                       goto success_structured;
   2712                                     else
   2713                                       goto structured;
   2714                                 else
   2715                                   goto structured;
   2716                               else
   2717                                 goto structured;
   2718                           else
   2719                             goto structured;
   2720                         else
   2721                           goto structured;
   2722                       else
   2723                         goto structured;
   2724                   else
   2725                     if(ptr[offset2] < c_b)
   2726                       if(ptr[offset9] > cb)
   2727                         if(ptr[offset5] > cb)
   2728                           if(ptr[offset1] < c_b)
   2729                             if(ptr[offset4] < c_b)
   2730                               if(ptr[offset10] < c_b)
   2731                                 if(ptr[offset3] < c_b)
   2732                                   if(ptr[offset11] < c_b)
   2733                                     goto success_structured;
   2734                                   else
   2735                                     goto structured;
   2736                                 else
   2737                                   goto structured;
   2738                               else
   2739                                 if(ptr[offset6] > cb)
   2740                                   if(ptr[offset7] > cb)
   2741                                     if(ptr[offset8] > cb)
   2742                                       if(ptr[offset11] > cb)
   2743                                         if(ptr[offset10] > cb)
   2744                                           goto success_structured;
   2745                                         else
   2746                                           goto structured;
   2747                                       else
   2748                                         goto structured;
   2749                                     else
   2750                                       goto structured;
   2751                                   else
   2752                                     goto structured;
   2753                                 else
   2754                                   goto structured;
   2755                             else
   2756                               if(ptr[offset6] > cb)
   2757                                 if(ptr[offset7] > cb)
   2758                                   if(ptr[offset8] > cb)
   2759                                     if(ptr[offset10] > cb)
   2760                                       if(ptr[offset4] > cb)
   2761                                         goto success_structured;
   2762                                       else
   2763                                         if(ptr[offset11] > cb)
   2764                                           goto success_structured;
   2765                                         else
   2766                                           goto structured;
   2767                                     else
   2768                                       if(ptr[offset3] > cb)
   2769                                         if(ptr[offset4] > cb)
   2770                                           goto success_structured;
   2771                                         else
   2772                                           goto structured;
   2773                                       else
   2774                                         goto structured;
   2775                                   else
   2776                                     goto structured;
   2777                                 else
   2778                                   goto structured;
   2779                               else
   2780                                 goto structured;
   2781                           else
   2782                             if(ptr[offset6] > cb)
   2783                               if(ptr[offset7] > cb)
   2784                                 if(ptr[offset8] > cb)
   2785                                   if(ptr[offset4] > cb)
   2786                                     if(ptr[offset3] > cb)
   2787                                       goto success_structured;
   2788                                     else
   2789                                       if(ptr[offset10] > cb)
   2790                                         goto success_structured;
   2791                                       else
   2792                                         goto structured;
   2793                                   else
   2794                                     if(ptr[offset10] > cb)
   2795                                       if(ptr[offset11] > cb)
   2796                                         goto success_structured;
   2797                                       else
   2798                                         goto structured;
   2799                                     else
   2800                                       goto structured;
   2801                                 else
   2802                                   goto structured;
   2803                               else
   2804                                 goto structured;
   2805                             else
   2806                               goto structured;
   2807                         else
   2808                           if(ptr[offset3] < c_b)
   2809                             if(ptr[offset4] < c_b)
   2810                               if(ptr[offset5] < c_b)
   2811                                 if(ptr[offset1] < c_b)
   2812                                   if(ptr[offset6] < c_b)
   2813                                     goto success_structured;
   2814                                   else
   2815                                     if(ptr[offset11] < c_b)
   2816                                       goto success_structured;
   2817                                     else
   2818                                       goto structured;
   2819                                 else
   2820                                   if(ptr[offset6] < c_b)
   2821                                     if(ptr[offset7] < c_b)
   2822                                       if(ptr[offset8] < c_b)
   2823                                         goto success_structured;
   2824                                       else
   2825                                         goto structured;
   2826                                     else
   2827                                       goto structured;
   2828                                   else
   2829                                     goto structured;
   2830                               else
   2831                                 if(ptr[offset1] < c_b)
   2832                                   if(ptr[offset10] < c_b)
   2833                                     if(ptr[offset11] < c_b)
   2834                                       goto success_structured;
   2835                                     else
   2836                                       goto structured;
   2837                                   else
   2838                                     goto structured;
   2839                                 else
   2840                                   goto structured;
   2841                             else
   2842                               goto structured;
   2843                           else
   2844                             goto structured;
   2845                       else
   2846                         if(ptr[offset9] < c_b)
   2847                           if(ptr[offset5] < c_b)
   2848                             if(ptr[offset1] < c_b)
   2849                               if(ptr[offset6] < c_b)
   2850                                 if(ptr[offset3] < c_b)
   2851                                   if(ptr[offset4] < c_b)
   2852                                     goto success_structured;
   2853                                   else
   2854                                     if(ptr[offset10] < c_b)
   2855                                       if(ptr[offset11] < c_b)
   2856                                         goto success_structured;
   2857                                       else
   2858                                         goto structured;
   2859                                     else
   2860                                       goto structured;
   2861                                 else
   2862                                   if(ptr[offset8] < c_b)
   2863                                     if(ptr[offset10] < c_b)
   2864                                       if(ptr[offset11] < c_b)
   2865                                         goto success_structured;
   2866                                       else
   2867                                         if(ptr[offset4] < c_b)
   2868                                           if(ptr[offset7] < c_b)
   2869                                             goto success_structured;
   2870                                           else
   2871                                             goto structured;
   2872                                         else
   2873                                           goto structured;
   2874                                     else
   2875                                       goto structured;
   2876                                   else
   2877                                     goto structured;
   2878                               else
   2879                                 if(ptr[offset11] < c_b)
   2880                                   if(ptr[offset3] < c_b)
   2881                                     if(ptr[offset4] < c_b)
   2882                                       goto success_structured;
   2883                                     else
   2884                                       if(ptr[offset10] < c_b)
   2885                                         goto success_structured;
   2886                                       else
   2887                                         goto structured;
   2888                                   else
   2889                                     if(ptr[offset8] < c_b)
   2890                                       if(ptr[offset10] < c_b)
   2891                                         goto success_structured;
   2892                                       else
   2893                                         goto structured;
   2894                                     else
   2895                                       goto structured;
   2896                                 else
   2897                                   goto structured;
   2898                             else
   2899                               if(ptr[offset6] < c_b)
   2900                                 if(ptr[offset7] < c_b)
   2901                                   if(ptr[offset8] < c_b)
   2902                                     if(ptr[offset4] < c_b)
   2903                                       if(ptr[offset3] < c_b)
   2904                                         goto success_structured;
   2905                                       else
   2906                                         if(ptr[offset10] < c_b)
   2907                                           goto success_structured;
   2908                                         else
   2909                                           goto structured;
   2910                                     else
   2911                                       if(ptr[offset10] < c_b)
   2912                                         if(ptr[offset11] < c_b)
   2913                                           goto success_structured;
   2914                                         else
   2915                                           goto structured;
   2916                                       else
   2917                                         goto structured;
   2918                                   else
   2919                                     goto structured;
   2920                                 else
   2921                                   goto structured;
   2922                               else
   2923                                 goto structured;
   2924                           else
   2925                             if(ptr[offset10] < c_b)
   2926                               if(ptr[offset11] < c_b)
   2927                                 if(ptr[offset1] < c_b)
   2928                                   if(ptr[offset3] < c_b)
   2929                                     goto success_structured;
   2930                                   else
   2931                                     if(ptr[offset8] < c_b)
   2932                                       goto success_structured;
   2933                                     else
   2934                                       goto structured;
   2935                                 else
   2936                                   if(ptr[offset6] < c_b)
   2937                                     if(ptr[offset7] < c_b)
   2938                                       if(ptr[offset8] < c_b)
   2939                                         goto success_structured;
   2940                                       else
   2941                                         goto structured;
   2942                                     else
   2943                                       goto structured;
   2944                                   else
   2945                                     goto structured;
   2946                               else
   2947                                 goto structured;
   2948                             else
   2949                               goto structured;
   2950                         else
   2951                           if(ptr[offset3] < c_b)
   2952                             if(ptr[offset4] < c_b)
   2953                               if(ptr[offset5] < c_b)
   2954                                 if(ptr[offset1] < c_b)
   2955                                   if(ptr[offset6] < c_b)
   2956                                     goto success_structured;
   2957                                   else
   2958                                     if(ptr[offset11] < c_b)
   2959                                       goto success_structured;
   2960                                     else
   2961                                       goto structured;
   2962                                 else
   2963                                   if(ptr[offset6] < c_b)
   2964                                     if(ptr[offset7] < c_b)
   2965                                       if(ptr[offset8] < c_b)
   2966                                         goto success_structured;
   2967                                       else
   2968                                         goto structured;
   2969                                     else
   2970                                       goto structured;
   2971                                   else
   2972                                     goto structured;
   2973                               else
   2974                                 if(ptr[offset1] < c_b)
   2975                                   if(ptr[offset10] < c_b)
   2976                                     if(ptr[offset11] < c_b)
   2977                                       goto success_structured;
   2978                                     else
   2979                                       goto structured;
   2980                                   else
   2981                                     goto structured;
   2982                                 else
   2983                                   goto structured;
   2984                             else
   2985                               goto structured;
   2986                           else
   2987                             goto structured;
   2988                     else
   2989                       if(ptr[offset9] < c_b)
   2990                         if(ptr[offset7] < c_b)
   2991                           if(ptr[offset8] < c_b)
   2992                             if(ptr[offset5] < c_b)
   2993                               if(ptr[offset1] < c_b)
   2994                                 if(ptr[offset10] < c_b)
   2995                                   if(ptr[offset11] < c_b)
   2996                                     goto success_structured;
   2997                                   else
   2998                                     if(ptr[offset6] < c_b)
   2999                                       if(ptr[offset4] < c_b)
   3000                                         goto success_structured;
   3001                                       else
   3002                                         goto structured;
   3003                                     else
   3004                                       goto structured;
   3005                                 else
   3006                                   if(ptr[offset6] < c_b)
   3007                                     if(ptr[offset3] < c_b)
   3008                                       if(ptr[offset4] < c_b)
   3009                                         goto success_structured;
   3010                                       else
   3011                                         goto structured;
   3012                                     else
   3013                                       goto structured;
   3014                                   else
   3015                                     goto structured;
   3016                               else
   3017                                 if(ptr[offset6] < c_b)
   3018                                   if(ptr[offset4] < c_b)
   3019                                     if(ptr[offset3] < c_b)
   3020                                       goto success_structured;
   3021                                     else
   3022                                       if(ptr[offset10] < c_b)
   3023                                         goto success_structured;
   3024                                       else
   3025                                         goto structured;
   3026                                   else
   3027                                     if(ptr[offset10] < c_b)
   3028                                       if(ptr[offset11] < c_b)
   3029                                         goto success_structured;
   3030                                       else
   3031                                         goto structured;
   3032                                     else
   3033                                       goto structured;
   3034                                 else
   3035                                   goto structured;
   3036                             else
   3037                               if(ptr[offset10] < c_b)
   3038                                 if(ptr[offset11] < c_b)
   3039                                   if(ptr[offset1] < c_b)
   3040                                     goto success_structured;
   3041                                   else
   3042                                     if(ptr[offset6] < c_b)
   3043                                       goto success_structured;
   3044                                     else
   3045                                       goto structured;
   3046                                 else
   3047                                   goto structured;
   3048                               else
   3049                                 goto structured;
   3050                           else
   3051                             goto structured;
   3052                         else
   3053                           goto structured;
   3054                       else
   3055                         if(ptr[offset5] > cb)
   3056                           if(ptr[offset9] > cb)
   3057                             if(ptr[offset6] > cb)
   3058                               if(ptr[offset7] > cb)
   3059                                 if(ptr[offset8] > cb)
   3060                                   if(ptr[offset4] > cb)
   3061                                     if(ptr[offset3] > cb)
   3062                                       goto success_structured;
   3063                                     else
   3064                                       if(ptr[offset10] > cb)
   3065                                         goto success_structured;
   3066                                       else
   3067                                         goto structured;
   3068                                   else
   3069                                     if(ptr[offset10] > cb)
   3070                                       if(ptr[offset11] > cb)
   3071                                         goto success_structured;
   3072                                       else
   3073                                         goto structured;
   3074                                     else
   3075                                       goto structured;
   3076                                 else
   3077                                   goto structured;
   3078                               else
   3079                                 goto structured;
   3080                             else
   3081                               goto structured;
   3082                           else
   3083                             goto homogeneous;
   3084                         else
   3085                           goto structured;
   3086                 else
   3087                   if(ptr[offset5] > cb)
   3088                     if(ptr[offset9] > cb)
   3089                       if(ptr[offset6] > cb)
   3090                         if(ptr[offset7] > cb)
   3091                           if(ptr[offset4] > cb)
   3092                             if(ptr[offset3] > cb)
   3093                               if(ptr[offset8] > cb)
   3094                                 goto success_structured;
   3095                               else
   3096                                 if(ptr[offset1] > cb)
   3097                                   if(ptr[offset2] > cb)
   3098                                     goto success_structured;
   3099                                   else
   3100                                     goto structured;
   3101                                 else
   3102                                   goto structured;
   3103                             else
   3104                               if(ptr[offset8] > cb)
   3105                                 if(ptr[offset10] > cb)
   3106                                   goto success_structured;
   3107                                 else
   3108                                   goto structured;
   3109                               else
   3110                                 goto structured;
   3111                           else
   3112                             if(ptr[offset11] > cb)
   3113                               if(ptr[offset8] > cb)
   3114                                 if(ptr[offset10] > cb)
   3115                                   goto success_structured;
   3116                                 else
   3117                                   goto structured;
   3118                               else
   3119                                 goto structured;
   3120                             else
   3121                               goto structured;
   3122                         else
   3123                           goto structured;
   3124                       else
   3125                         goto structured;
   3126                     else
   3127                       if(ptr[offset2] > cb)
   3128                         if(ptr[offset3] > cb)
   3129                           if(ptr[offset4] > cb)
   3130                             if(ptr[offset7] > cb)
   3131                               if(ptr[offset1] > cb)
   3132                                 if(ptr[offset6] > cb)
   3133                                   goto success_structured;
   3134                                 else
   3135                                   goto structured;
   3136                               else
   3137                                 if(ptr[offset6] > cb)
   3138                                   if(ptr[offset8] > cb)
   3139                                     goto success_structured;
   3140                                   else
   3141                                     goto structured;
   3142                                 else
   3143                                   goto structured;
   3144                             else
   3145                               goto structured;
   3146                           else
   3147                             goto structured;
   3148                         else
   3149                           goto structured;
   3150                       else
   3151                         goto structured;
   3152                   else
   3153                     if(ptr[offset5] < c_b)
   3154                       if(ptr[offset9] < c_b)
   3155                         if(ptr[offset6] < c_b)
   3156                           if(ptr[offset7] < c_b)
   3157                             if(ptr[offset4] < c_b)
   3158                               if(ptr[offset3] < c_b)
   3159                                 if(ptr[offset8] < c_b)
   3160                                   goto success_structured;
   3161                                 else
   3162                                   if(ptr[offset1] < c_b)
   3163                                     if(ptr[offset2] < c_b)
   3164                                       goto success_structured;
   3165                                     else
   3166                                       goto structured;
   3167                                   else
   3168                                     goto structured;
   3169                               else
   3170                                 if(ptr[offset8] < c_b)
   3171                                   if(ptr[offset10] < c_b)
   3172                                     goto success_structured;
   3173                                   else
   3174                                     goto structured;
   3175                                 else
   3176                                   goto structured;
   3177                             else
   3178                               if(ptr[offset11] < c_b)
   3179                                 if(ptr[offset8] < c_b)
   3180                                   if(ptr[offset10] < c_b)
   3181                                     goto success_structured;
   3182                                   else
   3183                                     goto structured;
   3184                                 else
   3185                                   goto structured;
   3186                               else
   3187                                 goto structured;
   3188                           else
   3189                             goto structured;
   3190                         else
   3191                           goto structured;
   3192                       else
   3193                         if(ptr[offset2] < c_b)
   3194                           if(ptr[offset3] < c_b)
   3195                             if(ptr[offset4] < c_b)
   3196                               if(ptr[offset7] < c_b)
   3197                                 if(ptr[offset1] < c_b)
   3198                                   if(ptr[offset6] < c_b)
   3199                                     goto success_structured;
   3200                                   else
   3201                                     goto structured;
   3202                                 else
   3203                                   if(ptr[offset6] < c_b)
   3204                                     if(ptr[offset8] < c_b)
   3205                                       goto success_structured;
   3206                                     else
   3207                                       goto structured;
   3208                                   else
   3209                                     goto structured;
   3210                               else
   3211                                 goto structured;
   3212                             else
   3213                               goto structured;
   3214                           else
   3215                             goto structured;
   3216                         else
   3217                           goto structured;
   3218                     else
   3219                       goto homogeneous;
   3220             }
   3221           }
   3222           success_homogeneous:
   3223             if(total == nExpectedCorners)
   3224             {
   3225                 if(nExpectedCorners == 0)
   3226                 {
   3227                     nExpectedCorners = 512;
   3228                     keypoints.reserve(nExpectedCorners);
   3229                 }
   3230                 else
   3231                 {
   3232                     nExpectedCorners *= 2;
   3233                     keypoints.reserve(nExpectedCorners);
   3234                 }
   3235             }
   3236             keypoints.push_back(KeyPoint(Point2f((float)x, (float)y), 1.0f));
   3237             total++;
   3238             goto homogeneous;
   3239           success_structured:
   3240             if(total == nExpectedCorners)
   3241             {
   3242                 if(nExpectedCorners == 0)
   3243                 {
   3244                     nExpectedCorners = 512;
   3245                     keypoints.reserve(nExpectedCorners);
   3246                 }
   3247                 else
   3248                 {
   3249                     nExpectedCorners *= 2;
   3250                     keypoints.reserve(nExpectedCorners);
   3251                 }
   3252             }
   3253             keypoints.push_back(KeyPoint(Point2f((float)x, (float)y), 1.0f));
   3254             total++;
   3255             goto structured;
   3256         }
   3257     }
   3258 }
   3259 
   3260 static void AGAST_7_12s(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold)
   3261 {
   3262     cv::Mat img;
   3263     if(!_img.getMat().isContinuous())
   3264       img = _img.getMat().clone();
   3265     else
   3266       img = _img.getMat();
   3267 
   3268     size_t total = 0;
   3269     int xsize = img.cols;
   3270     int ysize = img.rows;
   3271     size_t nExpectedCorners = keypoints.capacity();
   3272     register int x, y;
   3273     register int xsizeB=xsize - 3; //2, +1 due to faster test x>xsizeB
   3274     register int ysizeB=ysize - 2;
   3275     register int width;
   3276 
   3277     keypoints.resize(0);
   3278 
   3279     int pixel_7_12s_[16];
   3280     makeAgastOffsets(pixel_7_12s_, (int)img.step, AgastFeatureDetector::AGAST_7_12s);
   3281 
   3282     register short offset0 = (short) pixel_7_12s_[0];
   3283     register short offset1 = (short) pixel_7_12s_[1];
   3284     register short offset2 = (short) pixel_7_12s_[2];
   3285     register short offset3 = (short) pixel_7_12s_[3];
   3286     register short offset4 = (short) pixel_7_12s_[4];
   3287     register short offset5 = (short) pixel_7_12s_[5];
   3288     register short offset6 = (short) pixel_7_12s_[6];
   3289     register short offset7 = (short) pixel_7_12s_[7];
   3290     register short offset8 = (short) pixel_7_12s_[8];
   3291     register short offset9 = (short) pixel_7_12s_[9];
   3292     register short offset10 = (short) pixel_7_12s_[10];
   3293     register short offset11 = (short) pixel_7_12s_[11];
   3294 
   3295     width = xsize;
   3296 
   3297     for(y = 2; y < ysizeB; y++)
   3298     {
   3299         x = 1;
   3300         while(true)
   3301         {
   3302           homogeneous:
   3303           {
   3304             x++;
   3305             if(x > xsizeB)
   3306                 break;
   3307             else
   3308             {
   3309                 register const unsigned char* const ptr = img.ptr() + y*width + x;
   3310                 register const int cb = *ptr + threshold;
   3311                 register const int c_b = *ptr - threshold;
   3312                 if(ptr[offset0] > cb)
   3313                   if(ptr[offset2] > cb)
   3314                     if(ptr[offset5] > cb)
   3315                       if(ptr[offset9] > cb)
   3316                         if(ptr[offset7] > cb)
   3317                           if(ptr[offset1] > cb)
   3318                             if(ptr[offset6] > cb)
   3319                               if(ptr[offset3] > cb)
   3320                                 if(ptr[offset4] > cb)
   3321                                   goto success_structured;
   3322                                 else
   3323                                   if(ptr[offset10] > cb)
   3324                                     if(ptr[offset11] > cb)
   3325                                       goto success_structured;
   3326                                     else
   3327                                       goto structured;
   3328                                   else
   3329                                     goto homogeneous;
   3330                               else
   3331                                 if(ptr[offset8] > cb)
   3332                                   if(ptr[offset10] > cb)
   3333                                     if(ptr[offset4] > cb)
   3334                                       goto success_structured;
   3335                                     else
   3336                                       if(ptr[offset11] > cb)
   3337                                         goto success_structured;
   3338                                       else
   3339                                         goto structured;
   3340                                   else
   3341                                     goto homogeneous;
   3342                                 else
   3343                                   goto homogeneous;
   3344                             else
   3345                               if(ptr[offset11] > cb)
   3346                                 if(ptr[offset3] > cb)
   3347                                   if(ptr[offset4] > cb)
   3348                                     goto success_structured;
   3349                                   else
   3350                                     if(ptr[offset10] > cb)
   3351                                       goto success_structured;
   3352                                     else
   3353                                       goto homogeneous;
   3354                                 else
   3355                                   if(ptr[offset8] > cb)
   3356                                     if(ptr[offset10] > cb)
   3357                                       goto success_structured;
   3358                                     else
   3359                                       goto homogeneous;
   3360                                   else
   3361                                     goto homogeneous;
   3362                               else
   3363                                 goto homogeneous;
   3364                           else
   3365                             if(ptr[offset6] > cb)
   3366                               if(ptr[offset8] > cb)
   3367                                 if(ptr[offset4] > cb)
   3368                                   if(ptr[offset3] > cb)
   3369                                     goto success_structured;
   3370                                   else
   3371                                     if(ptr[offset10] > cb)
   3372                                       goto success_structured;
   3373                                     else
   3374                                       goto homogeneous;
   3375                                 else
   3376                                   if(ptr[offset10] > cb)
   3377                                     if(ptr[offset11] > cb)
   3378                                       goto success_structured;
   3379                                     else
   3380                                       goto homogeneous;
   3381                                   else
   3382                                     goto homogeneous;
   3383                               else
   3384                                 goto homogeneous;
   3385                             else
   3386                               goto homogeneous;
   3387                         else
   3388                           if(ptr[offset1] > cb)
   3389                             if(ptr[offset11] > cb)
   3390                               if(ptr[offset3] > cb)
   3391                                 if(ptr[offset4] > cb)
   3392                                   goto success_homogeneous;
   3393                                 else
   3394                                   if(ptr[offset10] > cb)
   3395                                     goto success_homogeneous;
   3396                                   else
   3397                                     goto homogeneous;
   3398                               else
   3399                                 if(ptr[offset8] > cb)
   3400                                   if(ptr[offset10] > cb)
   3401                                     goto success_homogeneous;
   3402                                   else
   3403                                     goto homogeneous;
   3404                                 else
   3405                                   goto homogeneous;
   3406                             else
   3407                               if(ptr[offset6] > cb)
   3408                                 if(ptr[offset3] > cb)
   3409                                   if(ptr[offset4] > cb)
   3410                                     goto success_homogeneous;
   3411                                   else
   3412                                     goto homogeneous;
   3413                                 else
   3414                                   goto homogeneous;
   3415                               else
   3416                                 goto homogeneous;
   3417                           else
   3418                             goto homogeneous;
   3419                       else
   3420                         if(ptr[offset3] > cb)
   3421                           if(ptr[offset4] > cb)
   3422                             if(ptr[offset7] > cb)
   3423                               if(ptr[offset1] > cb)
   3424                                 if(ptr[offset6] > cb)
   3425                                   goto success_homogeneous;
   3426                                 else
   3427                                   if(ptr[offset11] > cb)
   3428                                     goto success_homogeneous;
   3429                                   else
   3430                                     goto homogeneous;
   3431                               else
   3432                                 if(ptr[offset6] > cb)
   3433                                   if(ptr[offset8] > cb)
   3434                                     goto success_homogeneous;
   3435                                   else
   3436                                     goto homogeneous;
   3437                                 else
   3438                                   goto homogeneous;
   3439                             else
   3440                               if(ptr[offset1] > cb)
   3441                                 if(ptr[offset6] > cb)
   3442                                   goto success_homogeneous;
   3443                                 else
   3444                                   if(ptr[offset11] > cb)
   3445                                     goto success_homogeneous;
   3446                                   else
   3447                                     goto homogeneous;
   3448                               else
   3449                                 goto homogeneous;
   3450                           else
   3451                             goto homogeneous;
   3452                         else
   3453                           goto homogeneous;
   3454                     else
   3455                       if(ptr[offset9] < c_b)
   3456                         if(ptr[offset7] < c_b)
   3457                           if(ptr[offset5] < c_b)
   3458                             if(ptr[offset1] > cb)
   3459                               if(ptr[offset4] > cb)
   3460                                 if(ptr[offset10] > cb)
   3461                                   if(ptr[offset3] > cb)
   3462                                     if(ptr[offset11] > cb)
   3463                                       goto success_structured;
   3464                                     else
   3465                                       goto structured;
   3466                                   else
   3467                                     goto homogeneous;
   3468                                 else
   3469                                   if(ptr[offset6] < c_b)
   3470                                     if(ptr[offset8] < c_b)
   3471                                       if(ptr[offset11] < c_b)
   3472                                         if(ptr[offset10] < c_b)
   3473                                           goto success_structured;
   3474                                         else
   3475                                           goto structured;
   3476                                       else
   3477                                         goto structured;
   3478                                     else
   3479                                       goto homogeneous;
   3480                                   else
   3481                                     goto homogeneous;
   3482                               else
   3483                                 if(ptr[offset6] < c_b)
   3484                                   if(ptr[offset8] < c_b)
   3485                                     if(ptr[offset10] < c_b)
   3486                                       if(ptr[offset4] < c_b)
   3487                                         goto success_structured;
   3488                                       else
   3489                                         if(ptr[offset11] < c_b)
   3490                                           goto success_structured;
   3491                                         else
   3492                                           goto structured;
   3493                                     else
   3494                                       if(ptr[offset3] < c_b)
   3495                                         if(ptr[offset4] < c_b)
   3496                                           goto success_structured;
   3497                                         else
   3498                                           goto structured;
   3499                                       else
   3500                                         goto homogeneous;
   3501                                   else
   3502                                     goto homogeneous;
   3503                                 else
   3504                                   goto homogeneous;
   3505                             else
   3506                               if(ptr[offset6] < c_b)
   3507                                 if(ptr[offset8] < c_b)
   3508                                   if(ptr[offset4] < c_b)
   3509                                     if(ptr[offset3] < c_b)
   3510                                       goto success_structured;
   3511                                     else
   3512                                       if(ptr[offset10] < c_b)
   3513                                         goto success_structured;
   3514                                       else
   3515                                         goto homogeneous;
   3516                                   else
   3517                                     if(ptr[offset10] < c_b)
   3518                                       if(ptr[offset11] < c_b)
   3519                                         goto success_structured;
   3520                                       else
   3521                                         goto homogeneous;
   3522                                     else
   3523                                       goto homogeneous;
   3524                                 else
   3525                                   goto homogeneous;
   3526                               else
   3527                                 goto homogeneous;
   3528                           else
   3529                             if(ptr[offset1] > cb)
   3530                               if(ptr[offset3] > cb)
   3531                                 if(ptr[offset4] > cb)
   3532                                   if(ptr[offset10] > cb)
   3533                                     if(ptr[offset11] > cb)
   3534                                       goto success_structured;
   3535                                     else
   3536                                       goto homogeneous;
   3537                                   else
   3538                                     goto homogeneous;
   3539                                 else
   3540                                   goto homogeneous;
   3541                               else
   3542                                 goto homogeneous;
   3543                             else
   3544                               goto homogeneous;
   3545                         else
   3546                           if(ptr[offset1] > cb)
   3547                             if(ptr[offset3] > cb)
   3548                               if(ptr[offset4] > cb)
   3549                                 if(ptr[offset10] > cb)
   3550                                   if(ptr[offset11] > cb)
   3551                                     goto success_homogeneous;
   3552                                   else
   3553                                     goto homogeneous;
   3554                                 else
   3555                                   goto homogeneous;
   3556                               else
   3557                                 goto homogeneous;
   3558                             else
   3559                               goto homogeneous;
   3560                           else
   3561                             goto homogeneous;
   3562                       else
   3563                         if(ptr[offset10] > cb)
   3564                           if(ptr[offset11] > cb)
   3565                             if(ptr[offset9] > cb)
   3566                               if(ptr[offset7] > cb)
   3567                                 if(ptr[offset1] > cb)
   3568                                   if(ptr[offset3] > cb)
   3569                                     goto success_homogeneous;
   3570                                   else
   3571                                     if(ptr[offset8] > cb)
   3572                                       goto success_homogeneous;
   3573                                     else
   3574                                       goto homogeneous;
   3575                                 else
   3576                                   if(ptr[offset6] > cb)
   3577                                     if(ptr[offset8] > cb)
   3578                                       goto success_homogeneous;
   3579                                     else
   3580                                       goto homogeneous;
   3581                                   else
   3582                                     goto homogeneous;
   3583                               else
   3584                                 if(ptr[offset1] > cb)
   3585                                   if(ptr[offset3] > cb)
   3586                                     goto success_homogeneous;
   3587                                   else
   3588                                     if(ptr[offset8] > cb)
   3589                                       goto success_homogeneous;
   3590                                     else
   3591                                       goto homogeneous;
   3592                                 else
   3593                                   goto homogeneous;
   3594                             else
   3595                               if(ptr[offset1] > cb)
   3596                                 if(ptr[offset3] > cb)
   3597                                   if(ptr[offset4] > cb)
   3598                                     goto success_homogeneous;
   3599                                   else
   3600                                     goto homogeneous;
   3601                                 else
   3602                                   goto homogeneous;
   3603                               else
   3604                                 goto homogeneous;
   3605                           else
   3606                             goto homogeneous;
   3607                         else
   3608                           goto homogeneous;
   3609                   else
   3610                     if(ptr[offset7] > cb)
   3611                       if(ptr[offset9] > cb)
   3612                         if(ptr[offset8] > cb)
   3613                           if(ptr[offset5] > cb)
   3614                             if(ptr[offset1] > cb)
   3615                               if(ptr[offset10] > cb)
   3616                                 if(ptr[offset11] > cb)
   3617                                   goto success_homogeneous;
   3618                                 else
   3619                                   if(ptr[offset6] > cb)
   3620                                     if(ptr[offset4] > cb)
   3621                                       goto success_structured;
   3622                                     else
   3623                                       goto homogeneous;
   3624                                   else
   3625                                     goto homogeneous;
   3626                               else
   3627                                 if(ptr[offset6] > cb)
   3628                                   if(ptr[offset3] > cb)
   3629                                     if(ptr[offset4] > cb)
   3630                                       goto success_structured;
   3631                                     else
   3632                                       goto homogeneous;
   3633                                   else
   3634                                     goto homogeneous;
   3635                                 else
   3636                                   goto homogeneous;
   3637                             else
   3638                               if(ptr[offset6] > cb)
   3639                                 if(ptr[offset4] > cb)
   3640                                   if(ptr[offset3] > cb)
   3641                                     goto success_homogeneous;
   3642                                   else
   3643                                     if(ptr[offset10] > cb)
   3644                                       goto success_homogeneous;
   3645                                     else
   3646                                       goto homogeneous;
   3647                                 else
   3648                                   if(ptr[offset10] > cb)
   3649                                     if(ptr[offset11] > cb)
   3650                                       goto success_homogeneous;
   3651                                     else
   3652                                       goto homogeneous;
   3653                                   else
   3654                                     goto homogeneous;
   3655                               else
   3656                                 goto homogeneous;
   3657                           else
   3658                             if(ptr[offset10] > cb)
   3659                               if(ptr[offset11] > cb)
   3660                                 if(ptr[offset1] > cb)
   3661                                   goto success_homogeneous;
   3662                                 else
   3663                                   if(ptr[offset6] > cb)
   3664                                     goto success_homogeneous;
   3665                                   else
   3666                                     goto homogeneous;
   3667                               else
   3668                                 goto homogeneous;
   3669                             else
   3670                               goto homogeneous;
   3671                         else
   3672                           goto homogeneous;
   3673                       else
   3674                         goto homogeneous;
   3675                     else
   3676                       if(ptr[offset7] < c_b)
   3677                         if(ptr[offset5] < c_b)
   3678                           if(ptr[offset2] < c_b)
   3679                             if(ptr[offset6] < c_b)
   3680                               if(ptr[offset4] < c_b)
   3681                                 if(ptr[offset3] < c_b)
   3682                                   if(ptr[offset1] < c_b)
   3683                                     goto success_homogeneous;
   3684                                   else
   3685                                     if(ptr[offset8] < c_b)
   3686                                       goto success_homogeneous;
   3687                                     else
   3688                                       goto homogeneous;
   3689                                 else
   3690                                   if(ptr[offset9] < c_b)
   3691                                     if(ptr[offset8] < c_b)
   3692                                       if(ptr[offset10] < c_b)
   3693                                         goto success_structured;
   3694                                       else
   3695                                         goto homogeneous;
   3696                                     else
   3697                                       goto homogeneous;
   3698                                   else
   3699                                     goto homogeneous;
   3700                               else
   3701                                 if(ptr[offset9] < c_b)
   3702                                   if(ptr[offset8] < c_b)
   3703                                     if(ptr[offset10] < c_b)
   3704                                       if(ptr[offset11] < c_b)
   3705                                         goto success_structured;
   3706                                       else
   3707                                         goto homogeneous;
   3708                                     else
   3709                                       goto homogeneous;
   3710                                   else
   3711                                     goto homogeneous;
   3712                                 else
   3713                                   goto homogeneous;
   3714                             else
   3715                               goto homogeneous;
   3716                           else
   3717                             if(ptr[offset9] < c_b)
   3718                               if(ptr[offset6] < c_b)
   3719                                 if(ptr[offset8] < c_b)
   3720                                   if(ptr[offset4] < c_b)
   3721                                     if(ptr[offset3] < c_b)
   3722                                       goto success_homogeneous;
   3723                                     else
   3724                                       if(ptr[offset10] < c_b)
   3725                                         goto success_homogeneous;
   3726                                       else
   3727                                         goto homogeneous;
   3728                                   else
   3729                                     if(ptr[offset10] < c_b)
   3730                                       if(ptr[offset11] < c_b)
   3731                                         goto success_homogeneous;
   3732                                       else
   3733                                         goto homogeneous;
   3734                                     else
   3735                                       goto homogeneous;
   3736                                 else
   3737                                   goto homogeneous;
   3738                               else
   3739                                 goto homogeneous;
   3740                             else
   3741                               goto homogeneous;
   3742                         else
   3743                           goto homogeneous;
   3744                       else
   3745                         goto homogeneous;
   3746                 else if(ptr[offset0] < c_b)
   3747                   if(ptr[offset2] < c_b)
   3748                     if(ptr[offset9] < c_b)
   3749                       if(ptr[offset5] < c_b)
   3750                         if(ptr[offset7] < c_b)
   3751                           if(ptr[offset1] < c_b)
   3752                             if(ptr[offset6] < c_b)
   3753                               if(ptr[offset3] < c_b)
   3754                                 if(ptr[offset4] < c_b)
   3755                                   goto success_structured;
   3756                                 else
   3757                                   if(ptr[offset10] < c_b)
   3758                                     if(ptr[offset11] < c_b)
   3759                                       goto success_structured;
   3760                                     else
   3761                                       goto structured;
   3762                                   else
   3763                                     goto homogeneous;
   3764                               else
   3765                                 if(ptr[offset8] < c_b)
   3766                                   if(ptr[offset10] < c_b)
   3767                                     if(ptr[offset4] < c_b)
   3768                                       goto success_structured;
   3769                                     else
   3770                                       if(ptr[offset11] < c_b)
   3771                                         goto success_structured;
   3772                                       else
   3773                                         goto structured;
   3774                                   else
   3775                                     goto homogeneous;
   3776                                 else
   3777                                   goto homogeneous;
   3778                             else
   3779                               if(ptr[offset11] < c_b)
   3780                                 if(ptr[offset3] < c_b)
   3781                                   if(ptr[offset4] < c_b)
   3782                                     goto success_structured;
   3783                                   else
   3784                                     if(ptr[offset10] < c_b)
   3785                                       goto success_structured;
   3786                                     else
   3787                                       goto homogeneous;
   3788                                 else
   3789                                   if(ptr[offset8] < c_b)
   3790                                     if(ptr[offset10] < c_b)
   3791                                       goto success_structured;
   3792                                     else
   3793                                       goto homogeneous;
   3794                                   else
   3795                                     goto homogeneous;
   3796                               else
   3797                                 goto homogeneous;
   3798                           else
   3799                             if(ptr[offset6] < c_b)
   3800                               if(ptr[offset8] < c_b)
   3801                                 if(ptr[offset4] < c_b)
   3802                                   if(ptr[offset3] < c_b)
   3803                                     goto success_structured;
   3804                                   else
   3805                                     if(ptr[offset10] < c_b)
   3806                                       goto success_structured;
   3807                                     else
   3808                                       goto homogeneous;
   3809                                 else
   3810                                   if(ptr[offset10] < c_b)
   3811                                     if(ptr[offset11] < c_b)
   3812                                       goto success_structured;
   3813                                     else
   3814                                       goto homogeneous;
   3815                                   else
   3816                                     goto homogeneous;
   3817                               else
   3818                                 goto homogeneous;
   3819                             else
   3820                               goto homogeneous;
   3821                         else
   3822                           if(ptr[offset1] < c_b)
   3823                             if(ptr[offset11] < c_b)
   3824                               if(ptr[offset3] < c_b)
   3825                                 if(ptr[offset4] < c_b)
   3826                                   goto success_homogeneous;
   3827                                 else
   3828                                   if(ptr[offset10] < c_b)
   3829                                     goto success_homogeneous;
   3830                                   else
   3831                                     goto homogeneous;
   3832                               else
   3833                                 if(ptr[offset8] < c_b)
   3834                                   if(ptr[offset10] < c_b)
   3835                                     goto success_homogeneous;
   3836                                   else
   3837                                     goto homogeneous;
   3838                                 else
   3839                                   goto homogeneous;
   3840                             else
   3841                               if(ptr[offset6] < c_b)
   3842                                 if(ptr[offset3] < c_b)
   3843                                   if(ptr[offset4] < c_b)
   3844                                     goto success_homogeneous;
   3845                                   else
   3846                                     goto homogeneous;
   3847                                 else
   3848                                   goto homogeneous;
   3849                               else
   3850                                 goto homogeneous;
   3851                           else
   3852                             goto homogeneous;
   3853                       else
   3854                         if(ptr[offset10] < c_b)
   3855                           if(ptr[offset11] < c_b)
   3856                             if(ptr[offset7] < c_b)
   3857                               if(ptr[offset1] < c_b)
   3858                                 if(ptr[offset3] < c_b)
   3859                                   goto success_homogeneous;
   3860                                 else
   3861                                   if(ptr[offset8] < c_b)
   3862                                     goto success_homogeneous;
   3863                                   else
   3864                                     goto homogeneous;
   3865                               else
   3866                                 if(ptr[offset6] < c_b)
   3867                                   if(ptr[offset8] < c_b)
   3868                                     goto success_homogeneous;
   3869                                   else
   3870                                     goto homogeneous;
   3871                                 else
   3872                                   goto homogeneous;
   3873                             else
   3874                               if(ptr[offset1] < c_b)
   3875                                 if(ptr[offset3] < c_b)
   3876                                   goto success_homogeneous;
   3877                                 else
   3878                                   if(ptr[offset8] < c_b)
   3879                                     goto success_homogeneous;
   3880                                   else
   3881                                     goto homogeneous;
   3882                               else
   3883                                 goto homogeneous;
   3884                           else
   3885                             goto homogeneous;
   3886                         else
   3887                           goto homogeneous;
   3888                     else
   3889                       if(ptr[offset9] > cb)
   3890                         if(ptr[offset5] > cb)
   3891                           if(ptr[offset7] > cb)
   3892                             if(ptr[offset1] < c_b)
   3893                               if(ptr[offset4] < c_b)
   3894                                 if(ptr[offset10] < c_b)
   3895                                   if(ptr[offset3] < c_b)
   3896                                     if(ptr[offset11] < c_b)
   3897                                       goto success_structured;
   3898                                     else
   3899                                       goto structured;
   3900                                   else
   3901                                     goto homogeneous;
   3902                                 else
   3903                                   if(ptr[offset6] > cb)
   3904                                     if(ptr[offset8] > cb)
   3905                                       if(ptr[offset11] > cb)
   3906                                         if(ptr[offset10] > cb)
   3907                                           goto success_structured;
   3908                                         else
   3909                                           goto structured;
   3910                                       else
   3911                                         goto structured;
   3912                                     else
   3913                                       goto homogeneous;
   3914                                   else
   3915                                     goto homogeneous;
   3916                               else
   3917                                 if(ptr[offset6] > cb)
   3918                                   if(ptr[offset8] > cb)
   3919                                     if(ptr[offset10] > cb)
   3920                                       if(ptr[offset4] > cb)
   3921                                         goto success_structured;
   3922                                       else
   3923                                         if(ptr[offset11] > cb)
   3924                                           goto success_structured;
   3925                                         else
   3926                                           goto structured;
   3927                                     else
   3928                                       if(ptr[offset3] > cb)
   3929                                         if(ptr[offset4] > cb)
   3930                                           goto success_structured;
   3931                                         else
   3932                                           goto structured;
   3933                                       else
   3934                                         goto homogeneous;
   3935                                   else
   3936                                     goto homogeneous;
   3937                                 else
   3938                                   goto homogeneous;
   3939                             else
   3940                               if(ptr[offset6] > cb)
   3941                                 if(ptr[offset8] > cb)
   3942                                   if(ptr[offset4] > cb)
   3943                                     if(ptr[offset3] > cb)
   3944                                       goto success_structured;
   3945                                     else
   3946                                       if(ptr[offset10] > cb)
   3947                                         goto success_structured;
   3948                                       else
   3949                                         goto homogeneous;
   3950                                   else
   3951                                     if(ptr[offset10] > cb)
   3952                                       if(ptr[offset11] > cb)
   3953                                         goto success_structured;
   3954                                       else
   3955                                         goto homogeneous;
   3956                                     else
   3957                                       goto homogeneous;
   3958                                 else
   3959                                   goto homogeneous;
   3960                               else
   3961                                 goto homogeneous;
   3962                           else
   3963                             if(ptr[offset1] < c_b)
   3964                               if(ptr[offset3] < c_b)
   3965                                 if(ptr[offset4] < c_b)
   3966                                   if(ptr[offset10] < c_b)
   3967                                     if(ptr[offset11] < c_b)
   3968                                       goto success_structured;
   3969                                     else
   3970                                       goto homogeneous;
   3971                                   else
   3972                                     goto homogeneous;
   3973                                 else
   3974                                   goto homogeneous;
   3975                               else
   3976                                 goto homogeneous;
   3977                             else
   3978                               goto homogeneous;
   3979                         else
   3980                           if(ptr[offset3] < c_b)
   3981                             if(ptr[offset4] < c_b)
   3982                               if(ptr[offset5] < c_b)
   3983                                 if(ptr[offset7] < c_b)
   3984                                   if(ptr[offset1] < c_b)
   3985                                     if(ptr[offset6] < c_b)
   3986                                       goto success_structured;
   3987                                     else
   3988                                       if(ptr[offset11] < c_b)
   3989                                         goto success_structured;
   3990                                       else
   3991                                         goto homogeneous;
   3992                                   else
   3993                                     if(ptr[offset6] < c_b)
   3994                                       if(ptr[offset8] < c_b)
   3995                                         goto success_structured;
   3996                                       else
   3997                                         goto homogeneous;
   3998                                     else
   3999                                       goto homogeneous;
   4000                                 else
   4001                                   if(ptr[offset1] < c_b)
   4002                                     if(ptr[offset6] < c_b)
   4003                                       goto success_homogeneous;
   4004                                     else
   4005                                       if(ptr[offset11] < c_b)
   4006                                         goto success_homogeneous;
   4007                                       else
   4008                                         goto homogeneous;
   4009                                   else
   4010                                     goto homogeneous;
   4011                               else
   4012                                 if(ptr[offset1] < c_b)
   4013                                   if(ptr[offset10] < c_b)
   4014                                     if(ptr[offset11] < c_b)
   4015                                       goto success_homogeneous;
   4016                                     else
   4017                                       goto homogeneous;
   4018                                   else
   4019                                     goto homogeneous;
   4020                                 else
   4021                                   goto homogeneous;
   4022                             else
   4023                               goto homogeneous;
   4024                           else
   4025                             goto homogeneous;
   4026                       else
   4027                         if(ptr[offset3] < c_b)
   4028                           if(ptr[offset4] < c_b)
   4029                             if(ptr[offset5] < c_b)
   4030                               if(ptr[offset7] < c_b)
   4031                                 if(ptr[offset1] < c_b)
   4032                                   if(ptr[offset6] < c_b)
   4033                                     goto success_homogeneous;
   4034                                   else
   4035                                     if(ptr[offset11] < c_b)
   4036                                       goto success_homogeneous;
   4037                                     else
   4038                                       goto homogeneous;
   4039                                 else
   4040                                   if(ptr[offset6] < c_b)
   4041                                     if(ptr[offset8] < c_b)
   4042                                       goto success_homogeneous;
   4043                                     else
   4044                                       goto homogeneous;
   4045                                   else
   4046                                     goto homogeneous;
   4047                               else
   4048                                 if(ptr[offset1] < c_b)
   4049                                   if(ptr[offset6] < c_b)
   4050                                     goto success_homogeneous;
   4051                                   else
   4052                                     if(ptr[offset11] < c_b)
   4053                                       goto success_homogeneous;
   4054                                     else
   4055                                       goto homogeneous;
   4056                                 else
   4057                                   goto homogeneous;
   4058                             else
   4059                               if(ptr[offset1] < c_b)
   4060                                 if(ptr[offset10] < c_b)
   4061                                   if(ptr[offset11] < c_b)
   4062                                     goto success_homogeneous;
   4063                                   else
   4064                                     goto homogeneous;
   4065                                 else
   4066                                   goto homogeneous;
   4067                               else
   4068                                 goto homogeneous;
   4069                           else
   4070                             goto homogeneous;
   4071                         else
   4072                           goto homogeneous;
   4073                   else
   4074                     if(ptr[offset7] > cb)
   4075                       if(ptr[offset5] > cb)
   4076                         if(ptr[offset2] > cb)
   4077                           if(ptr[offset6] > cb)
   4078                             if(ptr[offset4] > cb)
   4079                               if(ptr[offset3] > cb)
   4080                                 if(ptr[offset1] > cb)
   4081                                   goto success_homogeneous;
   4082                                 else
   4083                                   if(ptr[offset8] > cb)
   4084                                     goto success_homogeneous;
   4085                                   else
   4086                                     goto homogeneous;
   4087                               else
   4088                                 if(ptr[offset9] > cb)
   4089                                   if(ptr[offset8] > cb)
   4090                                     if(ptr[offset10] > cb)
   4091                                       goto success_structured;
   4092                                     else
   4093                                       goto homogeneous;
   4094                                   else
   4095                                     goto homogeneous;
   4096                                 else
   4097                                   goto homogeneous;
   4098                             else
   4099                               if(ptr[offset9] > cb)
   4100                                 if(ptr[offset8] > cb)
   4101                                   if(ptr[offset10] > cb)
   4102                                     if(ptr[offset11] > cb)
   4103                                       goto success_structured;
   4104                                     else
   4105                                       goto homogeneous;
   4106                                   else
   4107                                     goto homogeneous;
   4108                                 else
   4109                                   goto homogeneous;
   4110                               else
   4111                                 goto homogeneous;
   4112                           else
   4113                             goto homogeneous;
   4114                         else
   4115                           if(ptr[offset9] > cb)
   4116                             if(ptr[offset6] > cb)
   4117                               if(ptr[offset8] > cb)
   4118                                 if(ptr[offset4] > cb)
   4119                                   if(ptr[offset3] > cb)
   4120                                     goto success_homogeneous;
   4121                                   else
   4122                                     if(ptr[offset10] > cb)
   4123                                       goto success_homogeneous;
   4124                                     else
   4125                                       goto homogeneous;
   4126                                 else
   4127                                   if(ptr[offset10] > cb)
   4128                                     if(ptr[offset11] > cb)
   4129                                       goto success_homogeneous;
   4130                                     else
   4131                                       goto homogeneous;
   4132                                   else
   4133                                     goto homogeneous;
   4134                               else
   4135                                 goto homogeneous;
   4136                             else
   4137                               goto homogeneous;
   4138                           else
   4139                             goto homogeneous;
   4140                       else
   4141                         goto homogeneous;
   4142                     else
   4143                       if(ptr[offset7] < c_b)
   4144                         if(ptr[offset9] < c_b)
   4145                           if(ptr[offset8] < c_b)
   4146                             if(ptr[offset5] < c_b)
   4147                               if(ptr[offset1] < c_b)
   4148                                 if(ptr[offset10] < c_b)
   4149                                   if(ptr[offset11] < c_b)
   4150                                     goto success_homogeneous;
   4151                                   else
   4152                                     if(ptr[offset6] < c_b)
   4153                                       if(ptr[offset4] < c_b)
   4154                                         goto success_structured;
   4155                                       else
   4156                                         goto homogeneous;
   4157                                     else
   4158                                       goto homogeneous;
   4159                                 else
   4160                                   if(ptr[offset6] < c_b)
   4161                                     if(ptr[offset3] < c_b)
   4162                                       if(ptr[offset4] < c_b)
   4163                                         goto success_structured;
   4164                                       else
   4165                                         goto homogeneous;
   4166                                     else
   4167                                       goto homogeneous;
   4168                                   else
   4169                                     goto homogeneous;
   4170                               else
   4171                                 if(ptr[offset6] < c_b)
   4172                                   if(ptr[offset4] < c_b)
   4173                                     if(ptr[offset3] < c_b)
   4174                                       goto success_homogeneous;
   4175                                     else
   4176                                       if(ptr[offset10] < c_b)
   4177                                         goto success_homogeneous;
   4178                                       else
   4179                                         goto homogeneous;
   4180                                   else
   4181                                     if(ptr[offset10] < c_b)
   4182                                       if(ptr[offset11] < c_b)
   4183                                         goto success_homogeneous;
   4184                                       else
   4185                                         goto homogeneous;
   4186                                     else
   4187                                       goto homogeneous;
   4188                                 else
   4189                                   goto homogeneous;
   4190                             else
   4191                               if(ptr[offset10] < c_b)
   4192                                 if(ptr[offset11] < c_b)
   4193                                   if(ptr[offset1] < c_b)
   4194                                     goto success_homogeneous;
   4195                                   else
   4196                                     if(ptr[offset6] < c_b)
   4197                                       goto success_homogeneous;
   4198                                     else
   4199                                       goto homogeneous;
   4200                                 else
   4201                                   goto homogeneous;
   4202                               else
   4203                                 goto homogeneous;
   4204                           else
   4205                             goto homogeneous;
   4206                         else
   4207                           goto homogeneous;
   4208                       else
   4209                         goto homogeneous;
   4210                 else
   4211                   if(ptr[offset5] > cb)
   4212                     if(ptr[offset7] > cb)
   4213                       if(ptr[offset9] > cb)
   4214                         if(ptr[offset6] > cb)
   4215                           if(ptr[offset4] > cb)
   4216                             if(ptr[offset3] > cb)
   4217                               if(ptr[offset8] > cb)
   4218                                 goto success_homogeneous;
   4219                               else
   4220                                 if(ptr[offset1] > cb)
   4221                                   if(ptr[offset2] > cb)
   4222                                     goto success_homogeneous;
   4223                                   else
   4224                                     goto homogeneous;
   4225                                 else
   4226                                   goto homogeneous;
   4227                             else
   4228                               if(ptr[offset8] > cb)
   4229                                 if(ptr[offset10] > cb)
   4230                                   goto success_homogeneous;
   4231                                 else
   4232                                   goto homogeneous;
   4233                               else
   4234                                 goto homogeneous;
   4235                           else
   4236                             if(ptr[offset11] > cb)
   4237                               if(ptr[offset8] > cb)
   4238                                 if(ptr[offset10] > cb)
   4239                                   goto success_homogeneous;
   4240                                 else
   4241                                   goto homogeneous;
   4242                               else
   4243                                 goto homogeneous;
   4244                             else
   4245                               goto homogeneous;
   4246                         else
   4247                           goto homogeneous;
   4248                       else
   4249                         if(ptr[offset2] > cb)
   4250                           if(ptr[offset3] > cb)
   4251                             if(ptr[offset4] > cb)
   4252                               if(ptr[offset1] > cb)
   4253                                 if(ptr[offset6] > cb)
   4254                                   goto success_homogeneous;
   4255                                 else
   4256                                   goto homogeneous;
   4257                               else
   4258                                 if(ptr[offset6] > cb)
   4259                                   if(ptr[offset8] > cb)
   4260                                     goto success_homogeneous;
   4261                                   else
   4262                                     goto homogeneous;
   4263                                 else
   4264                                   goto homogeneous;
   4265                             else
   4266                               goto homogeneous;
   4267                           else
   4268                             goto homogeneous;
   4269                         else
   4270                           goto homogeneous;
   4271                     else
   4272                       goto homogeneous;
   4273                   else
   4274                     if(ptr[offset5] < c_b)
   4275                       if(ptr[offset7] < c_b)
   4276                         if(ptr[offset9] < c_b)
   4277                           if(ptr[offset6] < c_b)
   4278                             if(ptr[offset4] < c_b)
   4279                               if(ptr[offset3] < c_b)
   4280                                 if(ptr[offset8] < c_b)
   4281                                   goto success_homogeneous;
   4282                                 else
   4283                                   if(ptr[offset1] < c_b)
   4284                                     if(ptr[offset2] < c_b)
   4285                                       goto success_homogeneous;
   4286                                     else
   4287                                       goto homogeneous;
   4288                                   else
   4289                                     goto homogeneous;
   4290                               else
   4291                                 if(ptr[offset8] < c_b)
   4292                                   if(ptr[offset10] < c_b)
   4293                                     goto success_homogeneous;
   4294                                   else
   4295                                     goto homogeneous;
   4296                                 else
   4297                                   goto homogeneous;
   4298                             else
   4299                               if(ptr[offset11] < c_b)
   4300                                 if(ptr[offset8] < c_b)
   4301                                   if(ptr[offset10] < c_b)
   4302                                     goto success_homogeneous;
   4303                                   else
   4304                                     goto homogeneous;
   4305                                 else
   4306                                   goto homogeneous;
   4307                               else
   4308                                 goto homogeneous;
   4309                           else
   4310                             goto homogeneous;
   4311                         else
   4312                           if(ptr[offset2] < c_b)
   4313                             if(ptr[offset3] < c_b)
   4314                               if(ptr[offset4] < c_b)
   4315                                 if(ptr[offset1] < c_b)
   4316                                   if(ptr[offset6] < c_b)
   4317                                     goto success_homogeneous;
   4318                                   else
   4319                                     goto homogeneous;
   4320                                 else
   4321                                   if(ptr[offset6] < c_b)
   4322                                     if(ptr[offset8] < c_b)
   4323                                       goto success_homogeneous;
   4324                                     else
   4325                                       goto homogeneous;
   4326                                   else
   4327                                     goto homogeneous;
   4328                               else
   4329                                 goto homogeneous;
   4330                             else
   4331                               goto homogeneous;
   4332                           else
   4333                             goto homogeneous;
   4334                       else
   4335                         goto homogeneous;
   4336                     else
   4337                       goto homogeneous;
   4338             }
   4339           }
   4340           structured:
   4341           {
   4342             x++;
   4343             if(x > xsizeB)
   4344                 break;
   4345             else
   4346             {
   4347                 register const unsigned char* const ptr = img.ptr() + y*width + x;
   4348                 register const int cb = *ptr + threshold;
   4349                 register const int c_b = *ptr - threshold;
   4350                 if(ptr[offset0] > cb)
   4351                   if(ptr[offset2] > cb)
   4352                     if(ptr[offset5] > cb)
   4353                       if(ptr[offset9] > cb)
   4354                         if(ptr[offset7] > cb)
   4355                           if(ptr[offset1] > cb)
   4356                             if(ptr[offset6] > cb)
   4357                               if(ptr[offset3] > cb)
   4358                                 if(ptr[offset4] > cb)
   4359                                   goto success_structured;
   4360                                 else
   4361                                   if(ptr[offset10] > cb)
   4362                                     if(ptr[offset11] > cb)
   4363                                       goto success_structured;
   4364                                     else
   4365                                       goto structured;
   4366                                   else
   4367                                     goto structured;
   4368                               else
   4369                                 if(ptr[offset8] > cb)
   4370                                   if(ptr[offset10] > cb)
   4371                                     if(ptr[offset4] > cb)
   4372                                       goto success_structured;
   4373                                     else
   4374                                       if(ptr[offset11] > cb)
   4375                                         goto success_structured;
   4376                                       else
   4377                                         goto structured;
   4378                                   else
   4379                                     goto structured;
   4380                                 else
   4381                                   goto structured;
   4382                             else
   4383                               if(ptr[offset11] > cb)
   4384                                 if(ptr[offset3] > cb)
   4385                                   if(ptr[offset4] > cb)
   4386                                     goto success_structured;
   4387                                   else
   4388                                     if(ptr[offset10] > cb)
   4389                                       goto success_structured;
   4390                                     else
   4391                                       goto structured;
   4392                                 else
   4393                                   if(ptr[offset8] > cb)
   4394                                     if(ptr[offset10] > cb)
   4395                                       goto success_structured;
   4396                                     else
   4397                                       goto structured;
   4398                                   else
   4399                                     goto structured;
   4400                               else
   4401                                 goto structured;
   4402                           else
   4403                             if(ptr[offset6] > cb)
   4404                               if(ptr[offset8] > cb)
   4405                                 if(ptr[offset4] > cb)
   4406                                   if(ptr[offset3] > cb)
   4407                                     goto success_structured;
   4408                                   else
   4409                                     if(ptr[offset10] > cb)
   4410                                       goto success_structured;
   4411                                     else
   4412                                       goto structured;
   4413                                 else
   4414                                   if(ptr[offset10] > cb)
   4415                                     if(ptr[offset11] > cb)
   4416                                       goto success_structured;
   4417                                     else
   4418                                       goto structured;
   4419                                   else
   4420                                     goto structured;
   4421                               else
   4422                                 goto structured;
   4423                             else
   4424                               goto structured;
   4425                         else
   4426                           if(ptr[offset1] > cb)
   4427                             if(ptr[offset11] > cb)
   4428                               if(ptr[offset3] > cb)
   4429                                 if(ptr[offset4] > cb)
   4430                                   goto success_structured;
   4431                                 else
   4432                                   if(ptr[offset10] > cb)
   4433                                     goto success_structured;
   4434                                   else
   4435                                     goto structured;
   4436                               else
   4437                                 if(ptr[offset8] > cb)
   4438                                   if(ptr[offset10] > cb)
   4439                                     goto success_structured;
   4440                                   else
   4441                                     goto structured;
   4442                                 else
   4443                                   goto structured;
   4444                             else
   4445                               if(ptr[offset6] > cb)
   4446                                 if(ptr[offset3] > cb)
   4447                                   if(ptr[offset4] > cb)
   4448                                     goto success_structured;
   4449                                   else
   4450                                     goto structured;
   4451                                 else
   4452                                   goto structured;
   4453                               else
   4454                                 goto structured;
   4455                           else
   4456                             goto structured;
   4457                       else
   4458                         if(ptr[offset3] > cb)
   4459                           if(ptr[offset4] > cb)
   4460                             if(ptr[offset7] > cb)
   4461                               if(ptr[offset1] > cb)
   4462                                 if(ptr[offset6] > cb)
   4463                                   goto success_structured;
   4464                                 else
   4465                                   if(ptr[offset11] > cb)
   4466                                     goto success_structured;
   4467                                   else
   4468                                     goto structured;
   4469                               else
   4470                                 if(ptr[offset6] > cb)
   4471                                   if(ptr[offset8] > cb)
   4472                                     goto success_structured;
   4473                                   else
   4474                                     goto structured;
   4475                                 else
   4476                                   goto structured;
   4477                             else
   4478                               if(ptr[offset1] > cb)
   4479                                 if(ptr[offset6] > cb)
   4480                                   goto success_structured;
   4481                                 else
   4482                                   if(ptr[offset11] > cb)
   4483                                     goto success_structured;
   4484                                   else
   4485                                     goto structured;
   4486                               else
   4487                                 goto structured;
   4488                           else
   4489                             goto structured;
   4490                         else
   4491                           goto structured;
   4492                     else
   4493                       if(ptr[offset7] < c_b)
   4494                         if(ptr[offset9] < c_b)
   4495                           if(ptr[offset5] < c_b)
   4496                             if(ptr[offset1] > cb)
   4497                               if(ptr[offset4] > cb)
   4498                                 if(ptr[offset10] > cb)
   4499                                   if(ptr[offset3] > cb)
   4500                                     if(ptr[offset11] > cb)
   4501                                       goto success_structured;
   4502                                     else
   4503                                       goto structured;
   4504                                   else
   4505                                     goto structured;
   4506                                 else
   4507                                   if(ptr[offset6] < c_b)
   4508                                     if(ptr[offset8] < c_b)
   4509                                       if(ptr[offset11] < c_b)
   4510                                         if(ptr[offset10] < c_b)
   4511                                           goto success_structured;
   4512                                         else
   4513                                           goto structured;
   4514                                       else
   4515                                         goto structured;
   4516                                     else
   4517                                       goto structured;
   4518                                   else
   4519                                     goto structured;
   4520                               else
   4521                                 if(ptr[offset6] < c_b)
   4522                                   if(ptr[offset8] < c_b)
   4523                                     if(ptr[offset10] < c_b)
   4524                                       if(ptr[offset4] < c_b)
   4525                                         goto success_structured;
   4526                                       else
   4527                                         if(ptr[offset11] < c_b)
   4528                                           goto success_structured;
   4529                                         else
   4530                                           goto structured;
   4531                                     else
   4532                                       if(ptr[offset3] < c_b)
   4533                                         if(ptr[offset4] < c_b)
   4534                                           goto success_structured;
   4535                                         else
   4536                                           goto structured;
   4537                                       else
   4538                                         goto structured;
   4539                                   else
   4540                                     goto structured;
   4541                                 else
   4542                                   goto structured;
   4543                             else
   4544                               if(ptr[offset6] < c_b)
   4545                                 if(ptr[offset8] < c_b)
   4546                                   if(ptr[offset4] < c_b)
   4547                                     if(ptr[offset3] < c_b)
   4548                                       goto success_structured;
   4549                                     else
   4550                                       if(ptr[offset10] < c_b)
   4551                                         goto success_structured;
   4552                                       else
   4553                                         goto structured;
   4554                                   else
   4555                                     if(ptr[offset10] < c_b)
   4556                                       if(ptr[offset11] < c_b)
   4557                                         goto success_structured;
   4558                                       else
   4559                                         goto structured;
   4560                                     else
   4561                                       goto structured;
   4562                                 else
   4563                                   goto structured;
   4564                               else
   4565                                 goto structured;
   4566                           else
   4567                             if(ptr[offset1] > cb)
   4568                               if(ptr[offset3] > cb)
   4569                                 if(ptr[offset4] > cb)
   4570                                   if(ptr[offset10] > cb)
   4571                                     if(ptr[offset11] > cb)
   4572                                       goto success_structured;
   4573                                     else
   4574                                       goto structured;
   4575                                   else
   4576                                     goto structured;
   4577                                 else
   4578                                   goto structured;
   4579                               else
   4580                                 goto structured;
   4581                             else
   4582                               goto structured;
   4583                         else
   4584                           if(ptr[offset10] > cb)
   4585                             if(ptr[offset11] > cb)
   4586                               if(ptr[offset9] > cb)
   4587                                 if(ptr[offset1] > cb)
   4588                                   if(ptr[offset3] > cb)
   4589                                     goto success_structured;
   4590                                   else
   4591                                     if(ptr[offset8] > cb)
   4592                                       goto success_structured;
   4593                                     else
   4594                                       goto structured;
   4595                                 else
   4596                                   goto structured;
   4597                               else
   4598                                 if(ptr[offset1] > cb)
   4599                                   if(ptr[offset3] > cb)
   4600                                     if(ptr[offset4] > cb)
   4601                                       goto success_structured;
   4602                                     else
   4603                                       goto structured;
   4604                                   else
   4605                                     goto structured;
   4606                                 else
   4607                                   goto structured;
   4608                             else
   4609                               goto structured;
   4610                           else
   4611                             goto structured;
   4612                       else
   4613                         if(ptr[offset10] > cb)
   4614                           if(ptr[offset11] > cb)
   4615                             if(ptr[offset9] > cb)
   4616                               if(ptr[offset1] > cb)
   4617                                 if(ptr[offset3] > cb)
   4618                                   goto success_structured;
   4619                                 else
   4620                                   if(ptr[offset8] > cb)
   4621                                     goto success_structured;
   4622                                   else
   4623                                     goto structured;
   4624                               else
   4625                                 if(ptr[offset6] > cb)
   4626                                   if(ptr[offset8] > cb)
   4627                                     if(ptr[offset7] > cb)
   4628                                       goto success_structured;
   4629                                     else
   4630                                       goto structured;
   4631                                   else
   4632                                     goto structured;
   4633                                 else
   4634                                   goto structured;
   4635                             else
   4636                               if(ptr[offset1] > cb)
   4637                                 if(ptr[offset3] > cb)
   4638                                   if(ptr[offset4] > cb)
   4639                                     goto success_structured;
   4640                                   else
   4641                                     goto structured;
   4642                                 else
   4643                                   goto structured;
   4644                               else
   4645                                 goto structured;
   4646                           else
   4647                             goto structured;
   4648                         else
   4649                           goto structured;
   4650                   else
   4651                     if(ptr[offset7] > cb)
   4652                       if(ptr[offset9] > cb)
   4653                         if(ptr[offset8] > cb)
   4654                           if(ptr[offset5] > cb)
   4655                             if(ptr[offset1] > cb)
   4656                               if(ptr[offset10] > cb)
   4657                                 if(ptr[offset11] > cb)
   4658                                   goto success_structured;
   4659                                 else
   4660                                   if(ptr[offset6] > cb)
   4661                                     if(ptr[offset4] > cb)
   4662                                       goto success_structured;
   4663                                     else
   4664                                       goto structured;
   4665                                   else
   4666                                     goto structured;
   4667                               else
   4668                                 if(ptr[offset6] > cb)
   4669                                   if(ptr[offset3] > cb)
   4670                                     if(ptr[offset4] > cb)
   4671                                       goto success_structured;
   4672                                     else
   4673                                       goto structured;
   4674                                   else
   4675                                     goto structured;
   4676                                 else
   4677                                   goto structured;
   4678                             else
   4679                               if(ptr[offset6] > cb)
   4680                                 if(ptr[offset4] > cb)
   4681                                   if(ptr[offset3] > cb)
   4682                                     goto success_structured;
   4683                                   else
   4684                                     if(ptr[offset10] > cb)
   4685                                       goto success_structured;
   4686                                     else
   4687                                       goto structured;
   4688                                 else
   4689                                   if(ptr[offset10] > cb)
   4690                                     if(ptr[offset11] > cb)
   4691                                       goto success_structured;
   4692                                     else
   4693                                       goto structured;
   4694                                   else
   4695                                     goto structured;
   4696                               else
   4697                                 goto structured;
   4698                           else
   4699                             if(ptr[offset10] > cb)
   4700                               if(ptr[offset11] > cb)
   4701                                 if(ptr[offset1] > cb)
   4702                                   goto success_structured;
   4703                                 else
   4704                                   if(ptr[offset6] > cb)
   4705                                     goto success_structured;
   4706                                   else
   4707                                     goto structured;
   4708                               else
   4709                                 goto structured;
   4710                             else
   4711                               goto structured;
   4712                         else
   4713                           goto structured;
   4714                       else
   4715                         goto structured;
   4716                     else
   4717                       if(ptr[offset7] < c_b)
   4718                         if(ptr[offset5] < c_b)
   4719                           if(ptr[offset2] < c_b)
   4720                             if(ptr[offset6] < c_b)
   4721                               if(ptr[offset4] < c_b)
   4722                                 if(ptr[offset3] < c_b)
   4723                                   if(ptr[offset1] < c_b)
   4724                                     goto success_structured;
   4725                                   else
   4726                                     if(ptr[offset8] < c_b)
   4727                                       goto success_structured;
   4728                                     else
   4729                                       goto structured;
   4730                                 else
   4731                                   if(ptr[offset9] < c_b)
   4732                                     if(ptr[offset8] < c_b)
   4733                                       if(ptr[offset10] < c_b)
   4734                                         goto success_structured;
   4735                                       else
   4736                                         goto structured;
   4737                                     else
   4738                                       goto structured;
   4739                                   else
   4740                                     goto structured;
   4741                               else
   4742                                 if(ptr[offset9] < c_b)
   4743                                   if(ptr[offset8] < c_b)
   4744                                     if(ptr[offset10] < c_b)
   4745                                       if(ptr[offset11] < c_b)
   4746                                         goto success_structured;
   4747                                       else
   4748                                         goto structured;
   4749                                     else
   4750                                       goto structured;
   4751                                   else
   4752                                     goto structured;
   4753                                 else
   4754                                   goto structured;
   4755                             else
   4756                               goto structured;
   4757                           else
   4758                             if(ptr[offset9] < c_b)
   4759                               if(ptr[offset6] < c_b)
   4760                                 if(ptr[offset8] < c_b)
   4761                                   if(ptr[offset4] < c_b)
   4762                                     if(ptr[offset3] < c_b)
   4763                                       goto success_structured;
   4764                                     else
   4765                                       if(ptr[offset10] < c_b)
   4766                                         goto success_structured;
   4767                                       else
   4768                                         goto structured;
   4769                                   else
   4770                                     if(ptr[offset10] < c_b)
   4771                                       if(ptr[offset11] < c_b)
   4772                                         goto success_structured;
   4773                                       else
   4774                                         goto structured;
   4775                                     else
   4776                                       goto structured;
   4777                                 else
   4778                                   goto structured;
   4779                               else
   4780                                 goto structured;
   4781                             else
   4782                               goto structured;
   4783                         else
   4784                           goto structured;
   4785                       else
   4786                         goto structured;
   4787                 else if(ptr[offset0] < c_b)
   4788                   if(ptr[offset2] < c_b)
   4789                     if(ptr[offset11] < c_b)
   4790                       if(ptr[offset3] < c_b)
   4791                         if(ptr[offset5] < c_b)
   4792                           if(ptr[offset9] < c_b)
   4793                             if(ptr[offset7] < c_b)
   4794                               if(ptr[offset1] < c_b)
   4795                                 if(ptr[offset4] < c_b)
   4796                                   goto success_structured;
   4797                                 else
   4798                                   if(ptr[offset10] < c_b)
   4799                                     goto success_structured;
   4800                                   else
   4801                                     goto structured;
   4802                               else
   4803                                 if(ptr[offset6] < c_b)
   4804                                   if(ptr[offset8] < c_b)
   4805                                     if(ptr[offset4] < c_b)
   4806                                       goto success_structured;
   4807                                     else
   4808                                       if(ptr[offset10] < c_b)
   4809                                         goto success_structured;
   4810                                       else
   4811                                         goto structured;
   4812                                   else
   4813                                     goto structured;
   4814                                 else
   4815                                   goto structured;
   4816                             else
   4817                               if(ptr[offset1] < c_b)
   4818                                 if(ptr[offset4] < c_b)
   4819                                   goto success_structured;
   4820                                 else
   4821                                   if(ptr[offset10] < c_b)
   4822                                     goto success_structured;
   4823                                   else
   4824                                     goto structured;
   4825                               else
   4826                                 goto structured;
   4827                           else
   4828                             if(ptr[offset4] < c_b)
   4829                               if(ptr[offset7] < c_b)
   4830                                 if(ptr[offset1] < c_b)
   4831                                   goto success_structured;
   4832                                 else
   4833                                   if(ptr[offset6] < c_b)
   4834                                     if(ptr[offset8] < c_b)
   4835                                       goto success_structured;
   4836                                     else
   4837                                       goto structured;
   4838                                   else
   4839                                     goto structured;
   4840                               else
   4841                                 if(ptr[offset1] < c_b)
   4842                                   goto success_structured;
   4843                                 else
   4844                                   goto structured;
   4845                             else
   4846                               goto structured;
   4847                         else
   4848                           if(ptr[offset10] < c_b)
   4849                             if(ptr[offset9] < c_b)
   4850                               if(ptr[offset7] < c_b)
   4851                                 if(ptr[offset1] < c_b)
   4852                                   goto success_structured;
   4853                                 else
   4854                                   if(ptr[offset6] < c_b)
   4855                                     if(ptr[offset8] < c_b)
   4856                                       goto success_structured;
   4857                                     else
   4858                                       goto structured;
   4859                                   else
   4860                                     goto structured;
   4861                               else
   4862                                 if(ptr[offset1] < c_b)
   4863                                   goto success_structured;
   4864                                 else
   4865                                   goto structured;
   4866                             else
   4867                               if(ptr[offset1] < c_b)
   4868                                 if(ptr[offset4] < c_b)
   4869                                   goto success_structured;
   4870                                 else
   4871                                   goto structured;
   4872                               else
   4873                                 goto structured;
   4874                           else
   4875                             if(ptr[offset7] > cb)
   4876                               if(ptr[offset9] > cb)
   4877                                 if(ptr[offset5] > cb)
   4878                                   if(ptr[offset4] > cb)
   4879                                     if(ptr[offset6] > cb)
   4880                                       if(ptr[offset8] > cb)
   4881                                         if(ptr[offset10] > cb)
   4882                                           goto success_structured;
   4883                                         else
   4884                                           goto structured;
   4885                                       else
   4886                                         goto structured;
   4887                                     else
   4888                                       goto structured;
   4889                                   else
   4890                                     goto structured;
   4891                                 else
   4892                                   goto structured;
   4893                               else
   4894                                 goto structured;
   4895                             else
   4896                               goto structured;
   4897                       else
   4898                         if(ptr[offset9] < c_b)
   4899                           if(ptr[offset8] < c_b)
   4900                             if(ptr[offset10] < c_b)
   4901                               if(ptr[offset7] < c_b)
   4902                                 if(ptr[offset1] < c_b)
   4903                                   goto success_structured;
   4904                                 else
   4905                                   if(ptr[offset6] < c_b)
   4906                                     goto success_structured;
   4907                                   else
   4908                                     goto structured;
   4909                               else
   4910                                 if(ptr[offset1] < c_b)
   4911                                   goto success_structured;
   4912                                 else
   4913                                   goto structured;
   4914                             else
   4915                               goto structured;
   4916                           else
   4917                             goto structured;
   4918                         else
   4919                           if(ptr[offset5] > cb)
   4920                             if(ptr[offset7] > cb)
   4921                               if(ptr[offset9] > cb)
   4922                                 if(ptr[offset4] > cb)
   4923                                   if(ptr[offset6] > cb)
   4924                                     if(ptr[offset8] > cb)
   4925                                       if(ptr[offset3] > cb)
   4926                                         goto success_structured;
   4927                                       else
   4928                                         if(ptr[offset10] > cb)
   4929                                           goto success_structured;
   4930                                         else
   4931                                           goto structured;
   4932                                     else
   4933                                       goto structured;
   4934                                   else
   4935                                     goto structured;
   4936                                 else
   4937                                   goto structured;
   4938                               else
   4939                                 goto structured;
   4940                             else
   4941                               goto structured;
   4942                           else
   4943                             goto structured;
   4944                     else
   4945                       if(ptr[offset4] < c_b)
   4946                         if(ptr[offset5] < c_b)
   4947                           if(ptr[offset7] < c_b)
   4948                             if(ptr[offset6] < c_b)
   4949                               if(ptr[offset3] < c_b)
   4950                                 if(ptr[offset1] < c_b)
   4951                                   goto success_structured;
   4952                                 else
   4953                                   if(ptr[offset8] < c_b)
   4954                                     goto success_structured;
   4955                                   else
   4956                                     goto structured;
   4957                               else
   4958                                 if(ptr[offset9] < c_b)
   4959                                   if(ptr[offset8] < c_b)
   4960                                     if(ptr[offset10] < c_b)
   4961                                       goto success_structured;
   4962                                     else
   4963                                       goto structured;
   4964                                   else
   4965                                     goto structured;
   4966                                 else
   4967                                   goto structured;
   4968                             else
   4969                               goto structured;
   4970                           else
   4971                             if(ptr[offset1] < c_b)
   4972                               if(ptr[offset6] < c_b)
   4973                                 if(ptr[offset3] < c_b)
   4974                                   goto success_structured;
   4975                                 else
   4976                                   goto structured;
   4977                               else
   4978                                 goto structured;
   4979                             else
   4980                               goto structured;
   4981                         else
   4982                           if(ptr[offset7] > cb)
   4983                             if(ptr[offset9] > cb)
   4984                               if(ptr[offset5] > cb)
   4985                                 if(ptr[offset6] > cb)
   4986                                   if(ptr[offset8] > cb)
   4987                                     if(ptr[offset10] > cb)
   4988                                       if(ptr[offset11] > cb)
   4989                                         goto success_structured;
   4990                                       else
   4991                                         goto structured;
   4992                                     else
   4993                                       goto structured;
   4994                                   else
   4995                                     goto structured;
   4996                                 else
   4997                                   goto structured;
   4998                               else
   4999                                 goto structured;
   5000                             else
   5001                               goto structured;
   5002                           else
   5003                             goto structured;
   5004                       else
   5005                         if(ptr[offset5] > cb)
   5006                           if(ptr[offset7] > cb)
   5007                             if(ptr[offset9] > cb)
   5008                               if(ptr[offset6] > cb)
   5009                                 if(ptr[offset8] > cb)
   5010                                   if(ptr[offset10] > cb)
   5011                                     if(ptr[offset4] > cb)
   5012                                       goto success_structured;
   5013                                     else
   5014                                       if(ptr[offset11] > cb)
   5015                                         goto success_structured;
   5016                                       else
   5017                                         goto homogeneous;
   5018                                   else
   5019                                     if(ptr[offset3] > cb)
   5020                                       if(ptr[offset4] > cb)
   5021                                         goto success_structured;
   5022                                       else
   5023                                         goto structured;
   5024                                     else
   5025                                       goto structured;
   5026                                 else
   5027                                   goto structured;
   5028                               else
   5029                                 goto structured;
   5030                             else
   5031                               goto structured;
   5032                           else
   5033                             goto structured;
   5034                         else
   5035                           goto structured;
   5036                   else
   5037                     if(ptr[offset7] > cb)
   5038                       if(ptr[offset5] > cb)
   5039                         if(ptr[offset2] > cb)
   5040                           if(ptr[offset6] > cb)
   5041                             if(ptr[offset4] > cb)
   5042                               if(ptr[offset3] > cb)
   5043                                 if(ptr[offset1] > cb)
   5044                                   goto success_structured;
   5045                                 else
   5046                                   if(ptr[offset8] > cb)
   5047                                     goto success_structured;
   5048                                   else
   5049                                     goto structured;
   5050                               else
   5051                                 if(ptr[offset9] > cb)
   5052                                   if(ptr[offset8] > cb)
   5053                                     if(ptr[offset10] > cb)
   5054                                       goto success_structured;
   5055                                     else
   5056                                       goto structured;
   5057                                   else
   5058                                     goto structured;
   5059                                 else
   5060                                   goto structured;
   5061                             else
   5062                               if(ptr[offset9] > cb)
   5063                                 if(ptr[offset8] > cb)
   5064                                   if(ptr[offset10] > cb)
   5065                                     if(ptr[offset11] > cb)
   5066                                       goto success_structured;
   5067                                     else
   5068                                       goto structured;
   5069                                   else
   5070                                     goto structured;
   5071                                 else
   5072                                   goto structured;
   5073                               else
   5074                                 goto structured;
   5075                           else
   5076                             goto structured;
   5077                         else
   5078                           if(ptr[offset9] > cb)
   5079                             if(ptr[offset6] > cb)
   5080                               if(ptr[offset8] > cb)
   5081                                 if(ptr[offset4] > cb)
   5082                                   if(ptr[offset3] > cb)
   5083                                     goto success_structured;
   5084                                   else
   5085                                     if(ptr[offset10] > cb)
   5086                                       goto success_structured;
   5087                                     else
   5088                                       goto structured;
   5089                                 else
   5090                                   if(ptr[offset10] > cb)
   5091                                     if(ptr[offset11] > cb)
   5092                                       goto success_structured;
   5093                                     else
   5094                                       goto structured;
   5095                                   else
   5096                                     goto structured;
   5097                               else
   5098                                 goto structured;
   5099                             else
   5100                               goto structured;
   5101                           else
   5102                             goto structured;
   5103                       else
   5104                         goto structured;
   5105                     else
   5106                       if(ptr[offset7] < c_b)
   5107                         if(ptr[offset9] < c_b)
   5108                           if(ptr[offset8] < c_b)
   5109                             if(ptr[offset5] < c_b)
   5110                               if(ptr[offset1] < c_b)
   5111                                 if(ptr[offset10] < c_b)
   5112                                   if(ptr[offset11] < c_b)
   5113                                     goto success_structured;
   5114                                   else
   5115                                     if(ptr[offset6] < c_b)
   5116                                       if(ptr[offset4] < c_b)
   5117                                         goto success_structured;
   5118                                       else
   5119                                         goto structured;
   5120                                     else
   5121                                       goto structured;
   5122                                 else
   5123                                   if(ptr[offset6] < c_b)
   5124                                     if(ptr[offset3] < c_b)
   5125                                       if(ptr[offset4] < c_b)
   5126                                         goto success_structured;
   5127                                       else
   5128                                         goto structured;
   5129                                     else
   5130                                       goto structured;
   5131                                   else
   5132                                     goto structured;
   5133                               else
   5134                                 if(ptr[offset6] < c_b)
   5135                                   if(ptr[offset4] < c_b)
   5136                                     if(ptr[offset3] < c_b)
   5137                                       goto success_structured;
   5138                                     else
   5139                                       if(ptr[offset10] < c_b)
   5140                                         goto success_structured;
   5141                                       else
   5142                                         goto structured;
   5143                                   else
   5144                                     if(ptr[offset10] < c_b)
   5145                                       if(ptr[offset11] < c_b)
   5146                                         goto success_structured;
   5147                                       else
   5148                                         goto structured;
   5149                                     else
   5150                                       goto structured;
   5151                                 else
   5152                                   goto structured;
   5153                             else
   5154                               if(ptr[offset10] < c_b)
   5155                                 if(ptr[offset11] < c_b)
   5156                                   if(ptr[offset1] < c_b)
   5157                                     goto success_structured;
   5158                                   else
   5159                                     if(ptr[offset6] < c_b)
   5160                                       goto success_structured;
   5161                                     else
   5162                                       goto structured;
   5163                                 else
   5164                                   goto structured;
   5165                               else
   5166                                 goto structured;
   5167                           else
   5168                             goto structured;
   5169                         else
   5170                           goto structured;
   5171                       else
   5172                         goto structured;
   5173                 else
   5174                   if(ptr[offset5] > cb)
   5175                     if(ptr[offset7] > cb)
   5176                       if(ptr[offset9] > cb)
   5177                         if(ptr[offset6] > cb)
   5178                           if(ptr[offset4] > cb)
   5179                             if(ptr[offset3] > cb)
   5180                               if(ptr[offset8] > cb)
   5181                                 goto success_structured;
   5182                               else
   5183                                 if(ptr[offset1] > cb)
   5184                                   if(ptr[offset2] > cb)
   5185                                     goto success_structured;
   5186                                   else
   5187                                     goto structured;
   5188                                 else
   5189                                   goto structured;
   5190                             else
   5191                               if(ptr[offset8] > cb)
   5192                                 if(ptr[offset10] > cb)
   5193                                   goto success_structured;
   5194                                 else
   5195                                   goto structured;
   5196                               else
   5197                                 goto structured;
   5198                           else
   5199                             if(ptr[offset11] > cb)
   5200                               if(ptr[offset8] > cb)
   5201                                 if(ptr[offset10] > cb)
   5202                                   goto success_structured;
   5203                                 else
   5204                                   goto structured;
   5205                               else
   5206                                 goto structured;
   5207                             else
   5208                               goto structured;
   5209                         else
   5210                           goto structured;
   5211                       else
   5212                         if(ptr[offset2] > cb)
   5213                           if(ptr[offset3] > cb)
   5214                             if(ptr[offset4] > cb)
   5215                               if(ptr[offset1] > cb)
   5216                                 if(ptr[offset6] > cb)
   5217                                   goto success_structured;
   5218                                 else
   5219                                   goto structured;
   5220                               else
   5221                                 if(ptr[offset6] > cb)
   5222                                   if(ptr[offset8] > cb)
   5223                                     goto success_structured;
   5224                                   else
   5225                                     goto structured;
   5226                                 else
   5227                                   goto structured;
   5228                             else
   5229                               goto structured;
   5230                           else
   5231                             goto structured;
   5232                         else
   5233                           goto structured;
   5234                     else
   5235                       goto structured;
   5236                   else
   5237                     if(ptr[offset5] < c_b)
   5238                       if(ptr[offset7] < c_b)
   5239                         if(ptr[offset9] < c_b)
   5240                           if(ptr[offset6] < c_b)
   5241                             if(ptr[offset4] < c_b)
   5242                               if(ptr[offset3] < c_b)
   5243                                 if(ptr[offset8] < c_b)
   5244                                   goto success_structured;
   5245                                 else
   5246                                   if(ptr[offset1] < c_b)
   5247                                     if(ptr[offset2] < c_b)
   5248                                       goto success_structured;
   5249                                     else
   5250                                       goto structured;
   5251                                   else
   5252                                     goto structured;
   5253                               else
   5254                                 if(ptr[offset8] < c_b)
   5255                                   if(ptr[offset10] < c_b)
   5256                                     goto success_structured;
   5257                                   else
   5258                                     goto structured;
   5259                                 else
   5260                                   goto structured;
   5261                             else
   5262                               if(ptr[offset11] < c_b)
   5263                                 if(ptr[offset8] < c_b)
   5264                                   if(ptr[offset10] < c_b)
   5265                                     goto success_structured;
   5266                                   else
   5267                                     goto structured;
   5268                                 else
   5269                                   goto structured;
   5270                               else
   5271                                 goto structured;
   5272                           else
   5273                             goto structured;
   5274                         else
   5275                           if(ptr[offset2] < c_b)
   5276                             if(ptr[offset3] < c_b)
   5277                               if(ptr[offset4] < c_b)
   5278                                 if(ptr[offset1] < c_b)
   5279                                   if(ptr[offset6] < c_b)
   5280                                     goto success_structured;
   5281                                   else
   5282                                     goto structured;
   5283                                 else
   5284                                   if(ptr[offset6] < c_b)
   5285                                     if(ptr[offset8] < c_b)
   5286                                       goto success_structured;
   5287                                     else
   5288                                       goto structured;
   5289                                   else
   5290                                     goto structured;
   5291                               else
   5292                                 goto structured;
   5293                             else
   5294                               goto structured;
   5295                           else
   5296                             goto structured;
   5297                       else
   5298                         goto structured;
   5299                     else
   5300                       goto homogeneous;
   5301             }
   5302           }
   5303           success_homogeneous:
   5304             if(total == nExpectedCorners)
   5305             {
   5306                 if(nExpectedCorners == 0)
   5307                 {
   5308                     nExpectedCorners = 512;
   5309                     keypoints.reserve(nExpectedCorners);
   5310                 }
   5311                 else
   5312                 {
   5313                     nExpectedCorners *= 2;
   5314                     keypoints.reserve(nExpectedCorners);
   5315                 }
   5316             }
   5317             keypoints.push_back(KeyPoint(Point2f((float)x, (float)y), 1.0f));
   5318             total++;
   5319             goto homogeneous;
   5320           success_structured:
   5321             if(total == nExpectedCorners)
   5322             {
   5323                 if(nExpectedCorners == 0)
   5324                 {
   5325                     nExpectedCorners = 512;
   5326                     keypoints.reserve(nExpectedCorners);
   5327                 }
   5328                 else
   5329                 {
   5330                     nExpectedCorners *= 2;
   5331                     keypoints.reserve(nExpectedCorners);
   5332                 }
   5333             }
   5334             keypoints.push_back(KeyPoint(Point2f((float)x, (float)y), 1.0f));
   5335             total++;
   5336             goto structured;
   5337         }
   5338     }
   5339 }
   5340 
   5341 static void OAST_9_16(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold)
   5342 {
   5343     cv::Mat img;
   5344     if(!_img.getMat().isContinuous())
   5345       img = _img.getMat().clone();
   5346     else
   5347       img = _img.getMat();
   5348 
   5349     size_t total = 0;
   5350     int xsize = img.cols;
   5351     int ysize = img.rows;
   5352     size_t nExpectedCorners = keypoints.capacity();
   5353     register int x, y;
   5354     register int xsizeB=xsize - 4;
   5355     register int ysizeB=ysize - 3;
   5356     register int width;
   5357 
   5358     keypoints.resize(0);
   5359 
   5360     int pixel_9_16_[16];
   5361     makeAgastOffsets(pixel_9_16_, (int)img.step, AgastFeatureDetector::OAST_9_16);
   5362 
   5363     register short offset0 = (short) pixel_9_16_[0];
   5364     register short offset1 = (short) pixel_9_16_[1];
   5365     register short offset2 = (short) pixel_9_16_[2];
   5366     register short offset3 = (short) pixel_9_16_[3];
   5367     register short offset4 = (short) pixel_9_16_[4];
   5368     register short offset5 = (short) pixel_9_16_[5];
   5369     register short offset6 = (short) pixel_9_16_[6];
   5370     register short offset7 = (short) pixel_9_16_[7];
   5371     register short offset8 = (short) pixel_9_16_[8];
   5372     register short offset9 = (short) pixel_9_16_[9];
   5373     register short offset10 = (short) pixel_9_16_[10];
   5374     register short offset11 = (short) pixel_9_16_[11];
   5375     register short offset12 = (short) pixel_9_16_[12];
   5376     register short offset13 = (short) pixel_9_16_[13];
   5377     register short offset14 = (short) pixel_9_16_[14];
   5378     register short offset15 = (short) pixel_9_16_[15];
   5379 
   5380     width = xsize;
   5381 
   5382     for(y = 3; y < ysizeB; y++)
   5383     {
   5384         x = 2;
   5385         while(true)
   5386         {
   5387             x++;
   5388             if(x > xsizeB)
   5389                 break;
   5390             else
   5391             {
   5392                 register const unsigned char* const ptr = img.ptr() + y*width + x;
   5393                 register const int cb = *ptr + threshold;
   5394                 register const int c_b = *ptr - threshold;
   5395                 if(ptr[offset0] > cb)
   5396                   if(ptr[offset2] > cb)
   5397                     if(ptr[offset4] > cb)
   5398                       if(ptr[offset5] > cb)
   5399                         if(ptr[offset7] > cb)
   5400                           if(ptr[offset3] > cb)
   5401                             if(ptr[offset1] > cb)
   5402                               if(ptr[offset6] > cb)
   5403                                 if(ptr[offset8] > cb)
   5404                                   {}
   5405                                 else
   5406                                   if(ptr[offset15] > cb)
   5407                                     {}
   5408                                   else
   5409                                     continue;
   5410                               else
   5411                                 if(ptr[offset13] > cb)
   5412                                   if(ptr[offset14] > cb)
   5413                                     if(ptr[offset15] > cb)
   5414                                       {}
   5415                                     else
   5416                                       continue;
   5417                                   else
   5418                                     continue;
   5419                                 else
   5420                                   continue;
   5421                             else
   5422                               if(ptr[offset8] > cb)
   5423                                 if(ptr[offset9] > cb)
   5424                                   if(ptr[offset10] > cb)
   5425                                     if(ptr[offset6] > cb)
   5426                                       {}
   5427                                     else
   5428                                       if(ptr[offset11] > cb)
   5429                                         if(ptr[offset12] > cb)
   5430                                           if(ptr[offset13] > cb)
   5431                                             if(ptr[offset14] > cb)
   5432                                               if(ptr[offset15] > cb)
   5433                                                 {}
   5434                                               else
   5435                                                 continue;
   5436                                             else
   5437                                               continue;
   5438                                           else
   5439                                             continue;
   5440                                         else
   5441                                           continue;
   5442                                       else
   5443                                         continue;
   5444                                   else
   5445                                     continue;
   5446                                 else
   5447                                   continue;
   5448                               else
   5449                                 continue;
   5450                           else
   5451                             if(ptr[offset10] > cb)
   5452                               if(ptr[offset11] > cb)
   5453                                 if(ptr[offset12] > cb)
   5454                                   if(ptr[offset8] > cb)
   5455                                     if(ptr[offset9] > cb)
   5456                                       if(ptr[offset6] > cb)
   5457                                         {}
   5458                                       else
   5459                                         if(ptr[offset13] > cb)
   5460                                           if(ptr[offset14] > cb)
   5461                                             if(ptr[offset15] > cb)
   5462                                               {}
   5463                                             else
   5464                                               continue;
   5465                                           else
   5466                                             continue;
   5467                                         else
   5468                                           continue;
   5469                                     else
   5470                                       if(ptr[offset1] > cb)
   5471                                         if(ptr[offset13] > cb)
   5472                                           if(ptr[offset14] > cb)
   5473                                             if(ptr[offset15] > cb)
   5474                                               {}
   5475                                             else
   5476                                               continue;
   5477                                           else
   5478                                             continue;
   5479                                         else
   5480                                           continue;
   5481                                       else
   5482                                         continue;
   5483                                   else
   5484                                     if(ptr[offset1] > cb)
   5485                                       if(ptr[offset13] > cb)
   5486                                         if(ptr[offset14] > cb)
   5487                                           if(ptr[offset15] > cb)
   5488                                             {}
   5489                                           else
   5490                                             continue;
   5491                                         else
   5492                                           continue;
   5493                                       else
   5494                                         continue;
   5495                                     else
   5496                                       continue;
   5497                                 else
   5498                                   continue;
   5499                               else
   5500                                 continue;
   5501                             else
   5502                               continue;
   5503                         else if(ptr[offset7] < c_b)
   5504                           if(ptr[offset14] > cb)
   5505                             if(ptr[offset15] > cb)
   5506                               if(ptr[offset1] > cb)
   5507                                 if(ptr[offset3] > cb)
   5508                                   if(ptr[offset6] > cb)
   5509                                     {}
   5510                                   else
   5511                                     if(ptr[offset13] > cb)
   5512                                       {}
   5513                                     else
   5514                                       continue;
   5515                                 else
   5516                                   if(ptr[offset10] > cb)
   5517                                     if(ptr[offset11] > cb)
   5518                                       if(ptr[offset12] > cb)
   5519                                         if(ptr[offset13] > cb)
   5520                                           {}
   5521                                         else
   5522                                           continue;
   5523                                       else
   5524                                         continue;
   5525                                     else
   5526                                       continue;
   5527                                   else
   5528                                     continue;
   5529                               else
   5530                                 if(ptr[offset8] > cb)
   5531                                   if(ptr[offset9] > cb)
   5532                                     if(ptr[offset10] > cb)
   5533                                       if(ptr[offset11] > cb)
   5534                                         if(ptr[offset12] > cb)
   5535                                           if(ptr[offset13] > cb)
   5536                                             {}
   5537                                           else
   5538                                             continue;
   5539                                         else
   5540                                           continue;
   5541                                       else
   5542                                         continue;
   5543                                     else
   5544                                       continue;
   5545                                   else
   5546                                     continue;
   5547                                 else
   5548                                   continue;
   5549                             else
   5550                               continue;
   5551                           else if(ptr[offset14] < c_b)
   5552                             if(ptr[offset8] < c_b)
   5553                               if(ptr[offset9] < c_b)
   5554                                 if(ptr[offset10] < c_b)
   5555                                   if(ptr[offset11] < c_b)
   5556                                     if(ptr[offset12] < c_b)
   5557                                       if(ptr[offset13] < c_b)
   5558                                         if(ptr[offset6] < c_b)
   5559                                           {}
   5560                                         else
   5561                                           if(ptr[offset15] < c_b)
   5562                                             {}
   5563                                           else
   5564                                             continue;
   5565                                       else
   5566                                         continue;
   5567                                     else
   5568                                       continue;
   5569                                   else
   5570                                     continue;
   5571                                 else
   5572                                   continue;
   5573                               else
   5574                                 continue;
   5575                             else
   5576                               continue;
   5577                           else
   5578                             continue;
   5579                         else
   5580                           if(ptr[offset14] > cb)
   5581                             if(ptr[offset15] > cb)
   5582                               if(ptr[offset1] > cb)
   5583                                 if(ptr[offset3] > cb)
   5584                                   if(ptr[offset6] > cb)
   5585                                     {}
   5586                                   else
   5587                                     if(ptr[offset13] > cb)
   5588                                       {}
   5589                                     else
   5590                                       continue;
   5591                                 else
   5592                                   if(ptr[offset10] > cb)
   5593                                     if(ptr[offset11] > cb)
   5594                                       if(ptr[offset12] > cb)
   5595                                         if(ptr[offset13] > cb)
   5596                                           {}
   5597                                         else
   5598                                           continue;
   5599                                       else
   5600                                         continue;
   5601                                     else
   5602                                       continue;
   5603                                   else
   5604                                     continue;
   5605                               else
   5606                                 if(ptr[offset8] > cb)
   5607                                   if(ptr[offset9] > cb)
   5608                                     if(ptr[offset10] > cb)
   5609                                       if(ptr[offset11] > cb)
   5610                                         if(ptr[offset12] > cb)
   5611                                           if(ptr[offset13] > cb)
   5612                                             {}
   5613                                           else
   5614                                             continue;
   5615                                         else
   5616                                           continue;
   5617                                       else
   5618                                         continue;
   5619                                     else
   5620                                       continue;
   5621                                   else
   5622                                     continue;
   5623                                 else
   5624                                   continue;
   5625                             else
   5626                               continue;
   5627                           else
   5628                             continue;
   5629                       else if(ptr[offset5] < c_b)
   5630                         if(ptr[offset12] > cb)
   5631                           if(ptr[offset13] > cb)
   5632                             if(ptr[offset14] > cb)
   5633                               if(ptr[offset15] > cb)
   5634                                 if(ptr[offset1] > cb)
   5635                                   if(ptr[offset3] > cb)
   5636                                     {}
   5637                                   else
   5638                                     if(ptr[offset10] > cb)
   5639                                       if(ptr[offset11] > cb)
   5640                                         {}
   5641                                       else
   5642                                         continue;
   5643                                     else
   5644                                       continue;
   5645                                 else
   5646                                   if(ptr[offset8] > cb)
   5647                                     if(ptr[offset9] > cb)
   5648                                       if(ptr[offset10] > cb)
   5649                                         if(ptr[offset11] > cb)
   5650                                           {}
   5651                                         else
   5652                                           continue;
   5653                                       else
   5654                                         continue;
   5655                                     else
   5656                                       continue;
   5657                                   else
   5658                                     continue;
   5659                               else
   5660                                 if(ptr[offset6] > cb)
   5661                                   if(ptr[offset7] > cb)
   5662                                     if(ptr[offset8] > cb)
   5663                                       if(ptr[offset9] > cb)
   5664                                         if(ptr[offset10] > cb)
   5665                                           if(ptr[offset11] > cb)
   5666                                             {}
   5667                                           else
   5668                                             continue;
   5669                                         else
   5670                                           continue;
   5671                                       else
   5672                                         continue;
   5673                                     else
   5674                                       continue;
   5675                                   else
   5676                                     continue;
   5677                                 else
   5678                                   continue;
   5679                             else
   5680                               continue;
   5681                           else
   5682                             continue;
   5683                         else if(ptr[offset12] < c_b)
   5684                           if(ptr[offset7] < c_b)
   5685                             if(ptr[offset8] < c_b)
   5686                               if(ptr[offset9] < c_b)
   5687                                 if(ptr[offset10] < c_b)
   5688                                   if(ptr[offset11] < c_b)
   5689                                     if(ptr[offset13] < c_b)
   5690                                       if(ptr[offset6] < c_b)
   5691                                         {}
   5692                                       else
   5693                                         if(ptr[offset14] < c_b)
   5694                                           if(ptr[offset15] < c_b)
   5695                                             {}
   5696                                           else
   5697                                             continue;
   5698                                         else
   5699                                           continue;
   5700                                     else
   5701                                       continue;
   5702                                   else
   5703                                     continue;
   5704                                 else
   5705                                   continue;
   5706                               else
   5707                                 continue;
   5708                             else
   5709                               continue;
   5710                           else
   5711                             continue;
   5712                         else
   5713                           continue;
   5714                       else
   5715                         if(ptr[offset12] > cb)
   5716                           if(ptr[offset13] > cb)
   5717                             if(ptr[offset14] > cb)
   5718                               if(ptr[offset15] > cb)
   5719                                 if(ptr[offset1] > cb)
   5720                                   if(ptr[offset3] > cb)
   5721                                     {}
   5722                                   else
   5723                                     if(ptr[offset10] > cb)
   5724                                       if(ptr[offset11] > cb)
   5725                                         {}
   5726                                       else
   5727                                         continue;
   5728                                     else
   5729                                       continue;
   5730                                 else
   5731                                   if(ptr[offset8] > cb)
   5732                                     if(ptr[offset9] > cb)
   5733                                       if(ptr[offset10] > cb)
   5734                                         if(ptr[offset11] > cb)
   5735                                           {}
   5736                                         else
   5737                                           continue;
   5738                                       else
   5739                                         continue;
   5740                                     else
   5741                                       continue;
   5742                                   else
   5743                                     continue;
   5744                               else
   5745                                 if(ptr[offset6] > cb)
   5746                                   if(ptr[offset7] > cb)
   5747                                     if(ptr[offset8] > cb)
   5748                                       if(ptr[offset9] > cb)
   5749                                         if(ptr[offset10] > cb)
   5750                                           if(ptr[offset11] > cb)
   5751                                             {}
   5752                                           else
   5753                                             continue;
   5754                                         else
   5755                                           continue;
   5756                                       else
   5757                                         continue;
   5758                                     else
   5759                                       continue;
   5760                                   else
   5761                                     continue;
   5762                                 else
   5763                                   continue;
   5764                             else
   5765                               continue;
   5766                           else
   5767                             continue;
   5768                         else if(ptr[offset12] < c_b)
   5769                           if(ptr[offset7] < c_b)
   5770                             if(ptr[offset8] < c_b)
   5771                               if(ptr[offset9] < c_b)
   5772                                 if(ptr[offset10] < c_b)
   5773                                   if(ptr[offset11] < c_b)
   5774                                     if(ptr[offset13] < c_b)
   5775                                       if(ptr[offset14] < c_b)
   5776                                         if(ptr[offset6] < c_b)
   5777                                           {}
   5778                                         else
   5779                                           if(ptr[offset15] < c_b)
   5780                                             {}
   5781                                           else
   5782                                             continue;
   5783                                       else
   5784                                         continue;
   5785                                     else
   5786                                       continue;
   5787                                   else
   5788                                     continue;
   5789                                 else
   5790                                   continue;
   5791                               else
   5792                                 continue;
   5793                             else
   5794                               continue;
   5795                           else
   5796                             continue;
   5797                         else
   5798                           continue;
   5799                     else if(ptr[offset4] < c_b)
   5800                       if(ptr[offset11] > cb)
   5801                         if(ptr[offset12] > cb)
   5802                           if(ptr[offset13] > cb)
   5803                             if(ptr[offset10] > cb)
   5804                               if(ptr[offset14] > cb)
   5805                                 if(ptr[offset15] > cb)
   5806                                   if(ptr[offset1] > cb)
   5807                                     {}
   5808                                   else
   5809                                     if(ptr[offset8] > cb)
   5810                                       if(ptr[offset9] > cb)
   5811                                         {}
   5812                                       else
   5813                                         continue;
   5814                                     else
   5815                                       continue;
   5816                                 else
   5817                                   if(ptr[offset6] > cb)
   5818                                     if(ptr[offset7] > cb)
   5819                                       if(ptr[offset8] > cb)
   5820                                         if(ptr[offset9] > cb)
   5821                                           {}
   5822                                         else
   5823                                           continue;
   5824                                       else
   5825                                         continue;
   5826                                     else
   5827                                       continue;
   5828                                   else
   5829                                     continue;
   5830                               else
   5831                                 if(ptr[offset5] > cb)
   5832                                   if(ptr[offset6] > cb)
   5833                                     if(ptr[offset7] > cb)
   5834                                       if(ptr[offset8] > cb)
   5835                                         if(ptr[offset9] > cb)
   5836                                           {}
   5837                                         else
   5838                                           continue;
   5839                                       else
   5840                                         continue;
   5841                                     else
   5842                                       continue;
   5843                                   else
   5844                                     continue;
   5845                                 else
   5846                                   continue;
   5847                             else
   5848                               if(ptr[offset1] > cb)
   5849                                 if(ptr[offset3] > cb)
   5850                                   if(ptr[offset14] > cb)
   5851                                     if(ptr[offset15] > cb)
   5852                                       {}
   5853                                     else
   5854                                       continue;
   5855                                   else
   5856                                     continue;
   5857                                 else
   5858                                   continue;
   5859                               else
   5860                                 continue;
   5861                           else
   5862                             continue;
   5863                         else
   5864                           continue;
   5865                       else if(ptr[offset11] < c_b)
   5866                         if(ptr[offset7] < c_b)
   5867                           if(ptr[offset8] < c_b)
   5868                             if(ptr[offset9] < c_b)
   5869                               if(ptr[offset10] < c_b)
   5870                                 if(ptr[offset6] < c_b)
   5871                                   if(ptr[offset5] < c_b)
   5872                                     if(ptr[offset3] < c_b)
   5873                                       {}
   5874                                     else
   5875                                       if(ptr[offset12] < c_b)
   5876                                         {}
   5877                                       else
   5878                                         continue;
   5879                                   else
   5880                                     if(ptr[offset12] < c_b)
   5881                                       if(ptr[offset13] < c_b)
   5882                                         if(ptr[offset14] < c_b)
   5883                                           {}
   5884                                         else
   5885                                           continue;
   5886                                       else
   5887                                         continue;
   5888                                     else
   5889                                       continue;
   5890                                 else
   5891                                   if(ptr[offset12] < c_b)
   5892                                     if(ptr[offset13] < c_b)
   5893                                       if(ptr[offset14] < c_b)
   5894                                         if(ptr[offset15] < c_b)
   5895                                           {}
   5896                                         else
   5897                                           continue;
   5898                                       else
   5899                                         continue;
   5900                                     else
   5901                                       continue;
   5902                                   else
   5903                                     continue;
   5904                               else
   5905                                 continue;
   5906                             else
   5907                               continue;
   5908                           else
   5909                             continue;
   5910                         else
   5911                           continue;
   5912                       else
   5913                         continue;
   5914                     else
   5915                       if(ptr[offset11] > cb)
   5916                         if(ptr[offset12] > cb)
   5917                           if(ptr[offset13] > cb)
   5918                             if(ptr[offset10] > cb)
   5919                               if(ptr[offset14] > cb)
   5920                                 if(ptr[offset15] > cb)
   5921                                   if(ptr[offset1] > cb)
   5922                                     {}
   5923                                   else
   5924                                     if(ptr[offset8] > cb)
   5925                                       if(ptr[offset9] > cb)
   5926                                         {}
   5927                                       else
   5928                                         continue;
   5929                                     else
   5930                                       continue;
   5931                                 else
   5932                                   if(ptr[offset6] > cb)
   5933                                     if(ptr[offset7] > cb)
   5934                                       if(ptr[offset8] > cb)
   5935                                         if(ptr[offset9] > cb)
   5936                                           {}
   5937                                         else
   5938                                           continue;
   5939                                       else
   5940                                         continue;
   5941                                     else
   5942                                       continue;
   5943                                   else
   5944                                     continue;
   5945                               else
   5946                                 if(ptr[offset5] > cb)
   5947                                   if(ptr[offset6] > cb)
   5948                                     if(ptr[offset7] > cb)
   5949                                       if(ptr[offset8] > cb)
   5950                                         if(ptr[offset9] > cb)
   5951                                           {}
   5952                                         else
   5953                                           continue;
   5954                                       else
   5955                                         continue;
   5956                                     else
   5957                                       continue;
   5958                                   else
   5959                                     continue;
   5960                                 else
   5961                                   continue;
   5962                             else
   5963                               if(ptr[offset1] > cb)
   5964                                 if(ptr[offset3] > cb)
   5965                                   if(ptr[offset14] > cb)
   5966                                     if(ptr[offset15] > cb)
   5967                                       {}
   5968                                     else
   5969                                       continue;
   5970                                   else
   5971                                     continue;
   5972                                 else
   5973                                   continue;
   5974                               else
   5975                                 continue;
   5976                           else
   5977                             continue;
   5978                         else
   5979                           continue;
   5980                       else if(ptr[offset11] < c_b)
   5981                         if(ptr[offset7] < c_b)
   5982                           if(ptr[offset8] < c_b)
   5983                             if(ptr[offset9] < c_b)
   5984                               if(ptr[offset10] < c_b)
   5985                                 if(ptr[offset12] < c_b)
   5986                                   if(ptr[offset13] < c_b)
   5987                                     if(ptr[offset6] < c_b)
   5988                                       if(ptr[offset5] < c_b)
   5989                                         {}
   5990                                       else
   5991                                         if(ptr[offset14] < c_b)
   5992                                           {}
   5993                                         else
   5994                                           continue;
   5995                                     else
   5996                                       if(ptr[offset14] < c_b)
   5997                                         if(ptr[offset15] < c_b)
   5998                                           {}
   5999                                         else
   6000                                           continue;
   6001                                       else
   6002                                         continue;
   6003                                   else
   6004                                     continue;
   6005                                 else
   6006                                   continue;
   6007                               else
   6008                                 continue;
   6009                             else
   6010                               continue;
   6011                           else
   6012                             continue;
   6013                         else
   6014                           continue;
   6015                       else
   6016                         continue;
   6017                   else if(ptr[offset2] < c_b)
   6018                     if(ptr[offset9] > cb)
   6019                       if(ptr[offset10] > cb)
   6020                         if(ptr[offset11] > cb)
   6021                           if(ptr[offset8] > cb)
   6022                             if(ptr[offset12] > cb)
   6023                               if(ptr[offset13] > cb)
   6024                                 if(ptr[offset14] > cb)
   6025                                   if(ptr[offset15] > cb)
   6026                                     {}
   6027                                   else
   6028                                     if(ptr[offset6] > cb)
   6029                                       if(ptr[offset7] > cb)
   6030                                         {}
   6031                                       else
   6032                                         continue;
   6033                                     else
   6034                                       continue;
   6035                                 else
   6036                                   if(ptr[offset5] > cb)
   6037                                     if(ptr[offset6] > cb)
   6038                                       if(ptr[offset7] > cb)
   6039                                         {}
   6040                                       else
   6041                                         continue;
   6042                                     else
   6043                                       continue;
   6044                                   else
   6045                                     continue;
   6046                               else
   6047                                 if(ptr[offset4] > cb)
   6048                                   if(ptr[offset5] > cb)
   6049                                     if(ptr[offset6] > cb)
   6050                                       if(ptr[offset7] > cb)
   6051                                         {}
   6052                                       else
   6053                                         continue;
   6054                                     else
   6055                                       continue;
   6056                                   else
   6057                                     continue;
   6058                                 else
   6059                                   continue;
   6060                             else
   6061                               if(ptr[offset3] > cb)
   6062                                 if(ptr[offset4] > cb)
   6063                                   if(ptr[offset5] > cb)
   6064                                     if(ptr[offset6] > cb)
   6065                                       if(ptr[offset7] > cb)
   6066                                         {}
   6067                                       else
   6068                                         continue;
   6069                                     else
   6070                                       continue;
   6071                                   else
   6072                                     continue;
   6073                                 else
   6074                                   continue;
   6075                               else
   6076                                 continue;
   6077                           else
   6078                             if(ptr[offset1] > cb)
   6079                               if(ptr[offset12] > cb)
   6080                                 if(ptr[offset13] > cb)
   6081                                   if(ptr[offset14] > cb)
   6082                                     if(ptr[offset15] > cb)
   6083                                       {}
   6084                                     else
   6085                                       continue;
   6086                                   else
   6087                                     continue;
   6088                                 else
   6089                                   continue;
   6090                               else
   6091                                 continue;
   6092                             else
   6093                               continue;
   6094                         else
   6095                           continue;
   6096                       else
   6097                         continue;
   6098                     else if(ptr[offset9] < c_b)
   6099                       if(ptr[offset7] < c_b)
   6100                         if(ptr[offset8] < c_b)
   6101                           if(ptr[offset6] < c_b)
   6102                             if(ptr[offset5] < c_b)
   6103                               if(ptr[offset4] < c_b)
   6104                                 if(ptr[offset3] < c_b)
   6105                                   if(ptr[offset1] < c_b)
   6106                                     {}
   6107                                   else
   6108                                     if(ptr[offset10] < c_b)
   6109                                       {}
   6110                                     else
   6111                                       continue;
   6112                                 else
   6113                                   if(ptr[offset10] < c_b)
   6114                                     if(ptr[offset11] < c_b)
   6115                                       if(ptr[offset12] < c_b)
   6116                                         {}
   6117                                       else
   6118                                         continue;
   6119                                     else
   6120                                       continue;
   6121                                   else
   6122                                     continue;
   6123                               else
   6124                                 if(ptr[offset10] < c_b)
   6125                                   if(ptr[offset11] < c_b)
   6126                                     if(ptr[offset12] < c_b)
   6127                                       if(ptr[offset13] < c_b)
   6128                                         {}
   6129                                       else
   6130                                         continue;
   6131                                     else
   6132                                       continue;
   6133                                   else
   6134                                     continue;
   6135                                 else
   6136                                   continue;
   6137                             else
   6138                               if(ptr[offset10] < c_b)
   6139                                 if(ptr[offset11] < c_b)
   6140                                   if(ptr[offset12] < c_b)
   6141                                     if(ptr[offset13] < c_b)
   6142                                       if(ptr[offset14] < c_b)
   6143                                         {}
   6144                                       else
   6145                                         continue;
   6146                                     else
   6147                                       continue;
   6148                                   else
   6149                                     continue;
   6150                                 else
   6151                                   continue;
   6152                               else
   6153                                 continue;
   6154                           else
   6155                             if(ptr[offset10] < c_b)
   6156                               if(ptr[offset11] < c_b)
   6157                                 if(ptr[offset12] < c_b)
   6158                                   if(ptr[offset13] < c_b)
   6159                                     if(ptr[offset14] < c_b)
   6160                                       if(ptr[offset15] < c_b)
   6161                                         {}
   6162                                       else
   6163                                         continue;
   6164                                     else
   6165                                       continue;
   6166                                   else
   6167                                     continue;
   6168                                 else
   6169                                   continue;
   6170                               else
   6171                                 continue;
   6172                             else
   6173                               continue;
   6174                         else
   6175                           continue;
   6176                       else
   6177                         continue;
   6178                     else
   6179                       continue;
   6180                   else
   6181                     if(ptr[offset9] > cb)
   6182                       if(ptr[offset10] > cb)
   6183                         if(ptr[offset11] > cb)
   6184                           if(ptr[offset8] > cb)
   6185                             if(ptr[offset12] > cb)
   6186                               if(ptr[offset13] > cb)
   6187                                 if(ptr[offset14] > cb)
   6188                                   if(ptr[offset15] > cb)
   6189                                     {}
   6190                                   else
   6191                                     if(ptr[offset6] > cb)
   6192                                       if(ptr[offset7] > cb)
   6193                                         {}
   6194                                       else
   6195                                         continue;
   6196                                     else
   6197                                       continue;
   6198                                 else
   6199                                   if(ptr[offset5] > cb)
   6200                                     if(ptr[offset6] > cb)
   6201                                       if(ptr[offset7] > cb)
   6202                                         {}
   6203                                       else
   6204                                         continue;
   6205                                     else
   6206                                       continue;
   6207                                   else
   6208                                     continue;
   6209                               else
   6210                                 if(ptr[offset4] > cb)
   6211                                   if(ptr[offset5] > cb)
   6212                                     if(ptr[offset6] > cb)
   6213                                       if(ptr[offset7] > cb)
   6214                                         {}
   6215                                       else
   6216                                         continue;
   6217                                     else
   6218                                       continue;
   6219                                   else
   6220                                     continue;
   6221                                 else
   6222                                   continue;
   6223                             else
   6224                               if(ptr[offset3] > cb)
   6225                                 if(ptr[offset4] > cb)
   6226                                   if(ptr[offset5] > cb)
   6227                                     if(ptr[offset6] > cb)
   6228                                       if(ptr[offset7] > cb)
   6229                                         {}
   6230                                       else
   6231                                         continue;
   6232                                     else
   6233                                       continue;
   6234                                   else
   6235                                     continue;
   6236                                 else
   6237                                   continue;
   6238                               else
   6239                                 continue;
   6240                           else
   6241                             if(ptr[offset1] > cb)
   6242                               if(ptr[offset12] > cb)
   6243                                 if(ptr[offset13] > cb)
   6244                                   if(ptr[offset14] > cb)
   6245                                     if(ptr[offset15] > cb)
   6246                                       {}
   6247                                     else
   6248                                       continue;
   6249                                   else
   6250                                     continue;
   6251                                 else
   6252                                   continue;
   6253                               else
   6254                                 continue;
   6255                             else
   6256                               continue;
   6257                         else
   6258                           continue;
   6259                       else
   6260                         continue;
   6261                     else if(ptr[offset9] < c_b)
   6262                       if(ptr[offset7] < c_b)
   6263                         if(ptr[offset8] < c_b)
   6264                           if(ptr[offset10] < c_b)
   6265                             if(ptr[offset11] < c_b)
   6266                               if(ptr[offset6] < c_b)
   6267                                 if(ptr[offset5] < c_b)
   6268                                   if(ptr[offset4] < c_b)
   6269                                     if(ptr[offset3] < c_b)
   6270                                       {}
   6271                                     else
   6272                                       if(ptr[offset12] < c_b)
   6273                                         {}
   6274                                       else
   6275                                         continue;
   6276                                   else
   6277                                     if(ptr[offset12] < c_b)
   6278                                       if(ptr[offset13] < c_b)
   6279                                         {}
   6280                                       else
   6281                                         continue;
   6282                                     else
   6283                                       continue;
   6284                                 else
   6285                                   if(ptr[offset12] < c_b)
   6286                                     if(ptr[offset13] < c_b)
   6287                                       if(ptr[offset14] < c_b)
   6288                                         {}
   6289                                       else
   6290                                         continue;
   6291                                     else
   6292                                       continue;
   6293                                   else
   6294                                     continue;
   6295                               else
   6296                                 if(ptr[offset12] < c_b)
   6297                                   if(ptr[offset13] < c_b)
   6298                                     if(ptr[offset14] < c_b)
   6299                                       if(ptr[offset15] < c_b)
   6300                                         {}
   6301                                       else
   6302                                         continue;
   6303                                     else
   6304                                       continue;
   6305                                   else
   6306                                     continue;
   6307                                 else
   6308                                   continue;
   6309                             else
   6310                               continue;
   6311                           else
   6312                             continue;
   6313                         else
   6314                           continue;
   6315                       else
   6316                         continue;
   6317                     else
   6318                       continue;
   6319                 else if(ptr[offset0] < c_b)
   6320                   if(ptr[offset2] > cb)
   6321                     if(ptr[offset9] > cb)
   6322                       if(ptr[offset7] > cb)
   6323                         if(ptr[offset8] > cb)
   6324                           if(ptr[offset6] > cb)
   6325                             if(ptr[offset5] > cb)
   6326                               if(ptr[offset4] > cb)
   6327                                 if(ptr[offset3] > cb)
   6328                                   if(ptr[offset1] > cb)
   6329                                     {}
   6330                                   else
   6331                                     if(ptr[offset10] > cb)
   6332                                       {}
   6333                                     else
   6334                                       continue;
   6335                                 else
   6336                                   if(ptr[offset10] > cb)
   6337                                     if(ptr[offset11] > cb)
   6338                                       if(ptr[offset12] > cb)
   6339                                         {}
   6340                                       else
   6341                                         continue;
   6342                                     else
   6343                                       continue;
   6344                                   else
   6345                                     continue;
   6346                               else
   6347                                 if(ptr[offset10] > cb)
   6348                                   if(ptr[offset11] > cb)
   6349                                     if(ptr[offset12] > cb)
   6350                                       if(ptr[offset13] > cb)
   6351                                         {}
   6352                                       else
   6353                                         continue;
   6354                                     else
   6355                                       continue;
   6356                                   else
   6357                                     continue;
   6358                                 else
   6359                                   continue;
   6360                             else
   6361                               if(ptr[offset10] > cb)
   6362                                 if(ptr[offset11] > cb)
   6363                                   if(ptr[offset12] > cb)
   6364                                     if(ptr[offset13] > cb)
   6365                                       if(ptr[offset14] > cb)
   6366                                         {}
   6367                                       else
   6368                                         continue;
   6369                                     else
   6370                                       continue;
   6371                                   else
   6372                                     continue;
   6373                                 else
   6374                                   continue;
   6375                               else
   6376                                 continue;
   6377                           else
   6378                             if(ptr[offset10] > cb)
   6379                               if(ptr[offset11] > cb)
   6380                                 if(ptr[offset12] > cb)
   6381                                   if(ptr[offset13] > cb)
   6382                                     if(ptr[offset14] > cb)
   6383                                       if(ptr[offset15] > cb)
   6384                                         {}
   6385                                       else
   6386                                         continue;
   6387                                     else
   6388                                       continue;
   6389                                   else
   6390                                     continue;
   6391                                 else
   6392                                   continue;
   6393                               else
   6394                                 continue;
   6395                             else
   6396                               continue;
   6397                         else
   6398                           continue;
   6399                       else
   6400                         continue;
   6401                     else if(ptr[offset9] < c_b)
   6402                       if(ptr[offset10] < c_b)
   6403                         if(ptr[offset11] < c_b)
   6404                           if(ptr[offset8] < c_b)
   6405                             if(ptr[offset12] < c_b)
   6406                               if(ptr[offset13] < c_b)
   6407                                 if(ptr[offset14] < c_b)
   6408                                   if(ptr[offset15] < c_b)
   6409                                     {}
   6410                                   else
   6411                                     if(ptr[offset6] < c_b)
   6412                                       if(ptr[offset7] < c_b)
   6413                                         {}
   6414                                       else
   6415                                         continue;
   6416                                     else
   6417                                       continue;
   6418                                 else
   6419                                   if(ptr[offset5] < c_b)
   6420                                     if(ptr[offset6] < c_b)
   6421                                       if(ptr[offset7] < c_b)
   6422                                         {}
   6423                                       else
   6424                                         continue;
   6425                                     else
   6426                                       continue;
   6427                                   else
   6428                                     continue;
   6429                               else
   6430                                 if(ptr[offset4] < c_b)
   6431                                   if(ptr[offset5] < c_b)
   6432                                     if(ptr[offset6] < c_b)
   6433                                       if(ptr[offset7] < c_b)
   6434                                         {}
   6435                                       else
   6436                                         continue;
   6437                                     else
   6438                                       continue;
   6439                                   else
   6440                                     continue;
   6441                                 else
   6442                                   continue;
   6443                             else
   6444                               if(ptr[offset3] < c_b)
   6445                                 if(ptr[offset4] < c_b)
   6446                                   if(ptr[offset5] < c_b)
   6447                                     if(ptr[offset6] < c_b)
   6448                                       if(ptr[offset7] < c_b)
   6449                                         {}
   6450                                       else
   6451                                         continue;
   6452                                     else
   6453                                       continue;
   6454                                   else
   6455                                     continue;
   6456                                 else
   6457                                   continue;
   6458                               else
   6459                                 continue;
   6460                           else
   6461                             if(ptr[offset1] < c_b)
   6462                               if(ptr[offset12] < c_b)
   6463                                 if(ptr[offset13] < c_b)
   6464                                   if(ptr[offset14] < c_b)
   6465                                     if(ptr[offset15] < c_b)
   6466                                       {}
   6467                                     else
   6468                                       continue;
   6469                                   else
   6470                                     continue;
   6471                                 else
   6472                                   continue;
   6473                               else
   6474                                 continue;
   6475                             else
   6476                               continue;
   6477                         else
   6478                           continue;
   6479                       else
   6480                         continue;
   6481                     else
   6482                       continue;
   6483                   else if(ptr[offset2] < c_b)
   6484                     if(ptr[offset4] > cb)
   6485                       if(ptr[offset11] > cb)
   6486                         if(ptr[offset7] > cb)
   6487                           if(ptr[offset8] > cb)
   6488                             if(ptr[offset9] > cb)
   6489                               if(ptr[offset10] > cb)
   6490                                 if(ptr[offset6] > cb)
   6491                                   if(ptr[offset5] > cb)
   6492                                     if(ptr[offset3] > cb)
   6493                                       {}
   6494                                     else
   6495                                       if(ptr[offset12] > cb)
   6496                                         {}
   6497                                       else
   6498                                         continue;
   6499                                   else
   6500                                     if(ptr[offset12] > cb)
   6501                                       if(ptr[offset13] > cb)
   6502                                         if(ptr[offset14] > cb)
   6503                                           {}
   6504                                         else
   6505                                           continue;
   6506                                       else
   6507                                         continue;
   6508                                     else
   6509                                       continue;
   6510                                 else
   6511                                   if(ptr[offset12] > cb)
   6512                                     if(ptr[offset13] > cb)
   6513                                       if(ptr[offset14] > cb)
   6514                                         if(ptr[offset15] > cb)
   6515                                           {}
   6516                                         else
   6517                                           continue;
   6518                                       else
   6519                                         continue;
   6520                                     else
   6521                                       continue;
   6522                                   else
   6523                                     continue;
   6524                               else
   6525                                 continue;
   6526                             else
   6527                               continue;
   6528                           else
   6529                             continue;
   6530                         else
   6531                           continue;
   6532                       else if(ptr[offset11] < c_b)
   6533                         if(ptr[offset12] < c_b)
   6534                           if(ptr[offset13] < c_b)
   6535                             if(ptr[offset10] < c_b)
   6536                               if(ptr[offset14] < c_b)
   6537                                 if(ptr[offset15] < c_b)
   6538                                   if(ptr[offset1] < c_b)
   6539                                     {}
   6540                                   else
   6541                                     if(ptr[offset8] < c_b)
   6542                                       if(ptr[offset9] < c_b)
   6543                                         {}
   6544                                       else
   6545                                         continue;
   6546                                     else
   6547                                       continue;
   6548                                 else
   6549                                   if(ptr[offset6] < c_b)
   6550                                     if(ptr[offset7] < c_b)
   6551                                       if(ptr[offset8] < c_b)
   6552                                         if(ptr[offset9] < c_b)
   6553                                           {}
   6554                                         else
   6555                                           continue;
   6556                                       else
   6557                                         continue;
   6558                                     else
   6559                                       continue;
   6560                                   else
   6561                                     continue;
   6562                               else
   6563                                 if(ptr[offset5] < c_b)
   6564                                   if(ptr[offset6] < c_b)
   6565                                     if(ptr[offset7] < c_b)
   6566                                       if(ptr[offset8] < c_b)
   6567                                         if(ptr[offset9] < c_b)
   6568                                           {}
   6569                                         else
   6570                                           continue;
   6571                                       else
   6572                                         continue;
   6573                                     else
   6574                                       continue;
   6575                                   else
   6576                                     continue;
   6577                                 else
   6578                                   continue;
   6579                             else
   6580                               if(ptr[offset1] < c_b)
   6581                                 if(ptr[offset3] < c_b)
   6582                                   if(ptr[offset14] < c_b)
   6583                                     if(ptr[offset15] < c_b)
   6584                                       {}
   6585                                     else
   6586                                       continue;
   6587                                   else
   6588                                     continue;
   6589                                 else
   6590                                   continue;
   6591                               else
   6592                                 continue;
   6593                           else
   6594                             continue;
   6595                         else
   6596                           continue;
   6597                       else
   6598                         continue;
   6599                     else if(ptr[offset4] < c_b)
   6600                       if(ptr[offset5] > cb)
   6601                         if(ptr[offset12] > cb)
   6602                           if(ptr[offset7] > cb)
   6603                             if(ptr[offset8] > cb)
   6604                               if(ptr[offset9] > cb)
   6605                                 if(ptr[offset10] > cb)
   6606                                   if(ptr[offset11] > cb)
   6607                                     if(ptr[offset13] > cb)
   6608                                       if(ptr[offset6] > cb)
   6609                                         {}
   6610                                       else
   6611                                         if(ptr[offset14] > cb)
   6612                                           if(ptr[offset15] > cb)
   6613                                             {}
   6614                                           else
   6615                                             continue;
   6616                                         else
   6617                                           continue;
   6618                                     else
   6619                                       continue;
   6620                                   else
   6621                                     continue;
   6622                                 else
   6623                                   continue;
   6624                               else
   6625                                 continue;
   6626                             else
   6627                               continue;
   6628                           else
   6629                             continue;
   6630                         else if(ptr[offset12] < c_b)
   6631                           if(ptr[offset13] < c_b)
   6632                             if(ptr[offset14] < c_b)
   6633                               if(ptr[offset15] < c_b)
   6634                                 if(ptr[offset1] < c_b)
   6635                                   if(ptr[offset3] < c_b)
   6636                                     {}
   6637                                   else
   6638                                     if(ptr[offset10] < c_b)
   6639                                       if(ptr[offset11] < c_b)
   6640                                         {}
   6641                                       else
   6642                                         continue;
   6643                                     else
   6644                                       continue;
   6645                                 else
   6646                                   if(ptr[offset8] < c_b)
   6647                                     if(ptr[offset9] < c_b)
   6648                                       if(ptr[offset10] < c_b)
   6649                                         if(ptr[offset11] < c_b)
   6650                                           {}
   6651                                         else
   6652                                           continue;
   6653                                       else
   6654                                         continue;
   6655                                     else
   6656                                       continue;
   6657                                   else
   6658                                     continue;
   6659                               else
   6660                                 if(ptr[offset6] < c_b)
   6661                                   if(ptr[offset7] < c_b)
   6662                                     if(ptr[offset8] < c_b)
   6663                                       if(ptr[offset9] < c_b)
   6664                                         if(ptr[offset10] < c_b)
   6665                                           if(ptr[offset11] < c_b)
   6666                                             {}
   6667                                           else
   6668                                             continue;
   6669                                         else
   6670                                           continue;
   6671                                       else
   6672                                         continue;
   6673                                     else
   6674                                       continue;
   6675                                   else
   6676                                     continue;
   6677                                 else
   6678                                   continue;
   6679                             else
   6680                               continue;
   6681                           else
   6682                             continue;
   6683                         else
   6684                           continue;
   6685                       else if(ptr[offset5] < c_b)
   6686                         if(ptr[offset7] > cb)
   6687                           if(ptr[offset14] > cb)
   6688                             if(ptr[offset8] > cb)
   6689                               if(ptr[offset9] > cb)
   6690                                 if(ptr[offset10] > cb)
   6691                                   if(ptr[offset11] > cb)
   6692                                     if(ptr[offset12] > cb)
   6693                                       if(ptr[offset13] > cb)
   6694                                         if(ptr[offset6] > cb)
   6695                                           {}
   6696                                         else
   6697                                           if(ptr[offset15] > cb)
   6698                                             {}
   6699                                           else
   6700                                             continue;
   6701                                       else
   6702                                         continue;
   6703                                     else
   6704                                       continue;
   6705                                   else
   6706                                     continue;
   6707                                 else
   6708                                   continue;
   6709                               else
   6710                                 continue;
   6711                             else
   6712                               continue;
   6713                           else if(ptr[offset14] < c_b)
   6714                             if(ptr[offset15] < c_b)
   6715                               if(ptr[offset1] < c_b)
   6716                                 if(ptr[offset3] < c_b)
   6717                                   if(ptr[offset6] < c_b)
   6718                                     {}
   6719                                   else
   6720                                     if(ptr[offset13] < c_b)
   6721                                       {}
   6722                                     else
   6723                                       continue;
   6724                                 else
   6725                                   if(ptr[offset10] < c_b)
   6726                                     if(ptr[offset11] < c_b)
   6727                                       if(ptr[offset12] < c_b)
   6728                                         if(ptr[offset13] < c_b)
   6729                                           {}
   6730                                         else
   6731                                           continue;
   6732                                       else
   6733                                         continue;
   6734                                     else
   6735                                       continue;
   6736                                   else
   6737                                     continue;
   6738                               else
   6739                                 if(ptr[offset8] < c_b)
   6740                                   if(ptr[offset9] < c_b)
   6741                                     if(ptr[offset10] < c_b)
   6742                                       if(ptr[offset11] < c_b)
   6743                                         if(ptr[offset12] < c_b)
   6744                                           if(ptr[offset13] < c_b)
   6745                                             {}
   6746                                           else
   6747                                             continue;
   6748                                         else
   6749                                           continue;
   6750                                       else
   6751                                         continue;
   6752                                     else
   6753                                       continue;
   6754                                   else
   6755                                     continue;
   6756                                 else
   6757                                   continue;
   6758                             else
   6759                               continue;
   6760                           else
   6761                             continue;
   6762                         else if(ptr[offset7] < c_b)
   6763                           if(ptr[offset3] < c_b)
   6764                             if(ptr[offset1] < c_b)
   6765                               if(ptr[offset6] < c_b)
   6766                                 if(ptr[offset8] < c_b)
   6767                                   {}
   6768                                 else
   6769                                   if(ptr[offset15] < c_b)
   6770                                     {}
   6771                                   else
   6772                                     continue;
   6773                               else
   6774                                 if(ptr[offset13] < c_b)
   6775                                   if(ptr[offset14] < c_b)
   6776                                     if(ptr[offset15] < c_b)
   6777                                       {}
   6778                                     else
   6779                                       continue;
   6780                                   else
   6781                                     continue;
   6782                                 else
   6783                                   continue;
   6784                             else
   6785                               if(ptr[offset8] < c_b)
   6786                                 if(ptr[offset9] < c_b)
   6787                                   if(ptr[offset10] < c_b)
   6788                                     if(ptr[offset6] < c_b)
   6789                                       {}
   6790                                     else
   6791                                       if(ptr[offset11] < c_b)
   6792                                         if(ptr[offset12] < c_b)
   6793                                           if(ptr[offset13] < c_b)
   6794                                             if(ptr[offset14] < c_b)
   6795                                               if(ptr[offset15] < c_b)
   6796                                                 {}
   6797                                               else
   6798                                                 continue;
   6799                                             else
   6800                                               continue;
   6801                                           else
   6802                                             continue;
   6803                                         else
   6804                                           continue;
   6805                                       else
   6806                                         continue;
   6807                                   else
   6808                                     continue;
   6809                                 else
   6810                                   continue;
   6811                               else
   6812                                 continue;
   6813                           else
   6814                             if(ptr[offset10] < c_b)
   6815                               if(ptr[offset11] < c_b)
   6816                                 if(ptr[offset12] < c_b)
   6817                                   if(ptr[offset8] < c_b)
   6818                                     if(ptr[offset9] < c_b)
   6819                                       if(ptr[offset6] < c_b)
   6820                                         {}
   6821                                       else
   6822                                         if(ptr[offset13] < c_b)
   6823                                           if(ptr[offset14] < c_b)
   6824                                             if(ptr[offset15] < c_b)
   6825                                               {}
   6826                                             else
   6827                                               continue;
   6828                                           else
   6829                                             continue;
   6830                                         else
   6831                                           continue;
   6832                                     else
   6833                                       if(ptr[offset1] < c_b)
   6834                                         if(ptr[offset13] < c_b)
   6835                                           if(ptr[offset14] < c_b)
   6836                                             if(ptr[offset15] < c_b)
   6837                                               {}
   6838                                             else
   6839                                               continue;
   6840                                           else
   6841                                             continue;
   6842                                         else
   6843                                           continue;
   6844                                       else
   6845                                         continue;
   6846                                   else
   6847                                     if(ptr[offset1] < c_b)
   6848                                       if(ptr[offset13] < c_b)
   6849                                         if(ptr[offset14] < c_b)
   6850                                           if(ptr[offset15] < c_b)
   6851                                             {}
   6852                                           else
   6853                                             continue;
   6854                                         else
   6855                                           continue;
   6856                                       else
   6857                                         continue;
   6858                                     else
   6859                                       continue;
   6860                                 else
   6861                                   continue;
   6862                               else
   6863                                 continue;
   6864                             else
   6865                               continue;
   6866                         else
   6867                           if(ptr[offset14] < c_b)
   6868                             if(ptr[offset15] < c_b)
   6869                               if(ptr[offset1] < c_b)
   6870                                 if(ptr[offset3] < c_b)
   6871                                   if(ptr[offset6] < c_b)
   6872                                     {}
   6873                                   else
   6874                                     if(ptr[offset13] < c_b)
   6875                                       {}
   6876                                     else
   6877                                       continue;
   6878                                 else
   6879                                   if(ptr[offset10] < c_b)
   6880                                     if(ptr[offset11] < c_b)
   6881                                       if(ptr[offset12] < c_b)
   6882                                         if(ptr[offset13] < c_b)
   6883                                           {}
   6884                                         else
   6885                                           continue;
   6886                                       else
   6887                                         continue;
   6888                                     else
   6889                                       continue;
   6890                                   else
   6891                                     continue;
   6892                               else
   6893                                 if(ptr[offset8] < c_b)
   6894                                   if(ptr[offset9] < c_b)
   6895                                     if(ptr[offset10] < c_b)
   6896                                       if(ptr[offset11] < c_b)
   6897                                         if(ptr[offset12] < c_b)
   6898                                           if(ptr[offset13] < c_b)
   6899                                             {}
   6900                                           else
   6901                                             continue;
   6902                                         else
   6903                                           continue;
   6904                                       else
   6905                                         continue;
   6906                                     else
   6907                                       continue;
   6908                                   else
   6909                                     continue;
   6910                                 else
   6911                                   continue;
   6912                             else
   6913                               continue;
   6914                           else
   6915                             continue;
   6916                       else
   6917                         if(ptr[offset12] > cb)
   6918                           if(ptr[offset7] > cb)
   6919                             if(ptr[offset8] > cb)
   6920                               if(ptr[offset9] > cb)
   6921                                 if(ptr[offset10] > cb)
   6922                                   if(ptr[offset11] > cb)
   6923                                     if(ptr[offset13] > cb)
   6924                                       if(ptr[offset14] > cb)
   6925                                         if(ptr[offset6] > cb)
   6926                                           {}
   6927                                         else
   6928                                           if(ptr[offset15] > cb)
   6929                                             {}
   6930                                           else
   6931                                             continue;
   6932                                       else
   6933                                         continue;
   6934                                     else
   6935                                       continue;
   6936                                   else
   6937                                     continue;
   6938                                 else
   6939                                   continue;
   6940                               else
   6941                                 continue;
   6942                             else
   6943                               continue;
   6944                           else
   6945                             continue;
   6946                         else if(ptr[offset12] < c_b)
   6947                           if(ptr[offset13] < c_b)
   6948                             if(ptr[offset14] < c_b)
   6949                               if(ptr[offset15] < c_b)
   6950                                 if(ptr[offset1] < c_b)
   6951                                   if(ptr[offset3] < c_b)
   6952                                     {}
   6953                                   else
   6954                                     if(ptr[offset10] < c_b)
   6955                                       if(ptr[offset11] < c_b)
   6956                                         {}
   6957                                       else
   6958                                         continue;
   6959                                     else
   6960                                       continue;
   6961                                 else
   6962                                   if(ptr[offset8] < c_b)
   6963                                     if(ptr[offset9] < c_b)
   6964                                       if(ptr[offset10] < c_b)
   6965                                         if(ptr[offset11] < c_b)
   6966                                           {}
   6967                                         else
   6968                                           continue;
   6969                                       else
   6970                                         continue;
   6971                                     else
   6972                                       continue;
   6973                                   else
   6974                                     continue;
   6975                               else
   6976                                 if(ptr[offset6] < c_b)
   6977                                   if(ptr[offset7] < c_b)
   6978                                     if(ptr[offset8] < c_b)
   6979                                       if(ptr[offset9] < c_b)
   6980                                         if(ptr[offset10] < c_b)
   6981                                           if(ptr[offset11] < c_b)
   6982                                             {}
   6983                                           else
   6984                                             continue;
   6985                                         else
   6986                                           continue;
   6987                                       else
   6988                                         continue;
   6989                                     else
   6990                                       continue;
   6991                                   else
   6992                                     continue;
   6993                                 else
   6994                                   continue;
   6995                             else
   6996                               continue;
   6997                           else
   6998                             continue;
   6999                         else
   7000                           continue;
   7001                     else
   7002                       if(ptr[offset11] > cb)
   7003                         if(ptr[offset7] > cb)
   7004                           if(ptr[offset8] > cb)
   7005                             if(ptr[offset9] > cb)
   7006                               if(ptr[offset10] > cb)
   7007                                 if(ptr[offset12] > cb)
   7008                                   if(ptr[offset13] > cb)
   7009                                     if(ptr[offset6] > cb)
   7010                                       if(ptr[offset5] > cb)
   7011                                         {}
   7012                                       else
   7013                                         if(ptr[offset14] > cb)
   7014                                           {}
   7015                                         else
   7016                                           continue;
   7017                                     else
   7018                                       if(ptr[offset14] > cb)
   7019                                         if(ptr[offset15] > cb)
   7020                                           {}
   7021                                         else
   7022                                           continue;
   7023                                       else
   7024                                         continue;
   7025                                   else
   7026                                     continue;
   7027                                 else
   7028                                   continue;
   7029                               else
   7030                                 continue;
   7031                             else
   7032                               continue;
   7033                           else
   7034                             continue;
   7035                         else
   7036                           continue;
   7037                       else if(ptr[offset11] < c_b)
   7038                         if(ptr[offset12] < c_b)
   7039                           if(ptr[offset13] < c_b)
   7040                             if(ptr[offset10] < c_b)
   7041                               if(ptr[offset14] < c_b)
   7042                                 if(ptr[offset15] < c_b)
   7043                                   if(ptr[offset1] < c_b)
   7044                                     {}
   7045                                   else
   7046                                     if(ptr[offset8] < c_b)
   7047                                       if(ptr[offset9] < c_b)
   7048                                         {}
   7049                                       else
   7050                                         continue;
   7051                                     else
   7052                                       continue;
   7053                                 else
   7054                                   if(ptr[offset6] < c_b)
   7055                                     if(ptr[offset7] < c_b)
   7056                                       if(ptr[offset8] < c_b)
   7057                                         if(ptr[offset9] < c_b)
   7058                                           {}
   7059                                         else
   7060                                           continue;
   7061                                       else
   7062                                         continue;
   7063                                     else
   7064                                       continue;
   7065                                   else
   7066                                     continue;
   7067                               else
   7068                                 if(ptr[offset5] < c_b)
   7069                                   if(ptr[offset6] < c_b)
   7070                                     if(ptr[offset7] < c_b)
   7071                                       if(ptr[offset8] < c_b)
   7072                                         if(ptr[offset9] < c_b)
   7073                                           {}
   7074                                         else
   7075                                           continue;
   7076                                       else
   7077                                         continue;
   7078                                     else
   7079                                       continue;
   7080                                   else
   7081                                     continue;
   7082                                 else
   7083                                   continue;
   7084                             else
   7085                               if(ptr[offset1] < c_b)
   7086                                 if(ptr[offset3] < c_b)
   7087                                   if(ptr[offset14] < c_b)
   7088                                     if(ptr[offset15] < c_b)
   7089                                       {}
   7090                                     else
   7091                                       continue;
   7092                                   else
   7093                                     continue;
   7094                                 else
   7095                                   continue;
   7096                               else
   7097                                 continue;
   7098                           else
   7099                             continue;
   7100                         else
   7101                           continue;
   7102                       else
   7103                         continue;
   7104                   else
   7105                     if(ptr[offset9] > cb)
   7106                       if(ptr[offset7] > cb)
   7107                         if(ptr[offset8] > cb)
   7108                           if(ptr[offset10] > cb)
   7109                             if(ptr[offset11] > cb)
   7110                               if(ptr[offset6] > cb)
   7111                                 if(ptr[offset5] > cb)
   7112                                   if(ptr[offset4] > cb)
   7113                                     if(ptr[offset3] > cb)
   7114                                       {}
   7115                                     else
   7116                                       if(ptr[offset12] > cb)
   7117                                         {}
   7118                                       else
   7119                                         continue;
   7120                                   else
   7121                                     if(ptr[offset12] > cb)
   7122                                       if(ptr[offset13] > cb)
   7123                                         {}
   7124                                       else
   7125                                         continue;
   7126                                     else
   7127                                       continue;
   7128                                 else
   7129                                   if(ptr[offset12] > cb)
   7130                                     if(ptr[offset13] > cb)
   7131                                       if(ptr[offset14] > cb)
   7132                                         {}
   7133                                       else
   7134                                         continue;
   7135                                     else
   7136                                       continue;
   7137                                   else
   7138                                     continue;
   7139                               else
   7140                                 if(ptr[offset12] > cb)
   7141                                   if(ptr[offset13] > cb)
   7142                                     if(ptr[offset14] > cb)
   7143                                       if(ptr[offset15] > cb)
   7144                                         {}
   7145                                       else
   7146                                         continue;
   7147                                     else
   7148                                       continue;
   7149                                   else
   7150                                     continue;
   7151                                 else
   7152                                   continue;
   7153                             else
   7154                               continue;
   7155                           else
   7156                             continue;
   7157                         else
   7158                           continue;
   7159                       else
   7160                         continue;
   7161                     else if(ptr[offset9] < c_b)
   7162                       if(ptr[offset10] < c_b)
   7163                         if(ptr[offset11] < c_b)
   7164                           if(ptr[offset8] < c_b)
   7165                             if(ptr[offset12] < c_b)
   7166                               if(ptr[offset13] < c_b)
   7167                                 if(ptr[offset14] < c_b)
   7168                                   if(ptr[offset15] < c_b)
   7169                                     {}
   7170                                   else
   7171                                     if(ptr[offset6] < c_b)
   7172                                       if(ptr[offset7] < c_b)
   7173                                         {}
   7174                                       else
   7175                                         continue;
   7176                                     else
   7177                                       continue;
   7178                                 else
   7179                                   if(ptr[offset5] < c_b)
   7180                                     if(ptr[offset6] < c_b)
   7181                                       if(ptr[offset7] < c_b)
   7182                                         {}
   7183                                       else
   7184                                         continue;
   7185                                     else
   7186                                       continue;
   7187                                   else
   7188                                     continue;
   7189                               else
   7190                                 if(ptr[offset4] < c_b)
   7191                                   if(ptr[offset5] < c_b)
   7192                                     if(ptr[offset6] < c_b)
   7193                                       if(ptr[offset7] < c_b)
   7194                                         {}
   7195                                       else
   7196                                         continue;
   7197                                     else
   7198                                       continue;
   7199                                   else
   7200                                     continue;
   7201                                 else
   7202                                   continue;
   7203                             else
   7204                               if(ptr[offset3] < c_b)
   7205                                 if(ptr[offset4] < c_b)
   7206                                   if(ptr[offset5] < c_b)
   7207                                     if(ptr[offset6] < c_b)
   7208                                       if(ptr[offset7] < c_b)
   7209                                         {}
   7210                                       else
   7211                                         continue;
   7212                                     else
   7213                                       continue;
   7214                                   else
   7215                                     continue;
   7216                                 else
   7217                                   continue;
   7218                               else
   7219                                 continue;
   7220                           else
   7221                             if(ptr[offset1] < c_b)
   7222                               if(ptr[offset12] < c_b)
   7223                                 if(ptr[offset13] < c_b)
   7224                                   if(ptr[offset14] < c_b)
   7225                                     if(ptr[offset15] < c_b)
   7226                                       {}
   7227                                     else
   7228                                       continue;
   7229                                   else
   7230                                     continue;
   7231                                 else
   7232                                   continue;
   7233                               else
   7234                                 continue;
   7235                             else
   7236                               continue;
   7237                         else
   7238                           continue;
   7239                       else
   7240                         continue;
   7241                     else
   7242                       continue;
   7243                 else
   7244                   if(ptr[offset7] > cb)
   7245                     if(ptr[offset8] > cb)
   7246                       if(ptr[offset9] > cb)
   7247                         if(ptr[offset6] > cb)
   7248                           if(ptr[offset5] > cb)
   7249                             if(ptr[offset4] > cb)
   7250                               if(ptr[offset3] > cb)
   7251                                 if(ptr[offset2] > cb)
   7252                                   if(ptr[offset1] > cb)
   7253                                     {}
   7254                                   else
   7255                                     if(ptr[offset10] > cb)
   7256                                       {}
   7257                                     else
   7258                                       continue;
   7259                                 else
   7260                                   if(ptr[offset10] > cb)
   7261                                     if(ptr[offset11] > cb)
   7262                                       {}
   7263                                     else
   7264                                       continue;
   7265                                   else
   7266                                     continue;
   7267                               else
   7268                                 if(ptr[offset10] > cb)
   7269                                   if(ptr[offset11] > cb)
   7270                                     if(ptr[offset12] > cb)
   7271                                       {}
   7272                                     else
   7273                                       continue;
   7274                                   else
   7275                                     continue;
   7276                                 else
   7277                                   continue;
   7278                             else
   7279                               if(ptr[offset10] > cb)
   7280                                 if(ptr[offset11] > cb)
   7281                                   if(ptr[offset12] > cb)
   7282                                     if(ptr[offset13] > cb)
   7283                                       {}
   7284                                     else
   7285                                       continue;
   7286                                   else
   7287                                     continue;
   7288                                 else
   7289                                   continue;
   7290                               else
   7291                                 continue;
   7292                           else
   7293                             if(ptr[offset10] > cb)
   7294                               if(ptr[offset11] > cb)
   7295                                 if(ptr[offset12] > cb)
   7296                                   if(ptr[offset13] > cb)
   7297                                     if(ptr[offset14] > cb)
   7298                                       {}
   7299                                     else
   7300                                       continue;
   7301                                   else
   7302                                     continue;
   7303                                 else
   7304                                   continue;
   7305                               else
   7306                                 continue;
   7307                             else
   7308                               continue;
   7309                         else
   7310                           if(ptr[offset10] > cb)
   7311                             if(ptr[offset11] > cb)
   7312                               if(ptr[offset12] > cb)
   7313                                 if(ptr[offset13] > cb)
   7314                                   if(ptr[offset14] > cb)
   7315                                     if(ptr[offset15] > cb)
   7316                                       {}
   7317                                     else
   7318                                       continue;
   7319                                   else
   7320                                     continue;
   7321                                 else
   7322                                   continue;
   7323                               else
   7324                                 continue;
   7325                             else
   7326                               continue;
   7327                           else
   7328                             continue;
   7329                       else
   7330                         continue;
   7331                     else
   7332                       continue;
   7333                   else if(ptr[offset7] < c_b)
   7334                     if(ptr[offset8] < c_b)
   7335                       if(ptr[offset9] < c_b)
   7336                         if(ptr[offset6] < c_b)
   7337                           if(ptr[offset5] < c_b)
   7338                             if(ptr[offset4] < c_b)
   7339                               if(ptr[offset3] < c_b)
   7340                                 if(ptr[offset2] < c_b)
   7341                                   if(ptr[offset1] < c_b)
   7342                                     {}
   7343                                   else
   7344                                     if(ptr[offset10] < c_b)
   7345                                       {}
   7346                                     else
   7347                                       continue;
   7348                                 else
   7349                                   if(ptr[offset10] < c_b)
   7350                                     if(ptr[offset11] < c_b)
   7351                                       {}
   7352                                     else
   7353                                       continue;
   7354                                   else
   7355                                     continue;
   7356                               else
   7357                                 if(ptr[offset10] < c_b)
   7358                                   if(ptr[offset11] < c_b)
   7359                                     if(ptr[offset12] < c_b)
   7360                                       {}
   7361                                     else
   7362                                       continue;
   7363                                   else
   7364                                     continue;
   7365                                 else
   7366                                   continue;
   7367                             else
   7368                               if(ptr[offset10] < c_b)
   7369                                 if(ptr[offset11] < c_b)
   7370                                   if(ptr[offset12] < c_b)
   7371                                     if(ptr[offset13] < c_b)
   7372                                       {}
   7373                                     else
   7374                                       continue;
   7375                                   else
   7376                                     continue;
   7377                                 else
   7378                                   continue;
   7379                               else
   7380                                 continue;
   7381                           else
   7382                             if(ptr[offset10] < c_b)
   7383                               if(ptr[offset11] < c_b)
   7384                                 if(ptr[offset12] < c_b)
   7385                                   if(ptr[offset13] < c_b)
   7386                                     if(ptr[offset14] < c_b)
   7387                                       {}
   7388                                     else
   7389                                       continue;
   7390                                   else
   7391                                     continue;
   7392                                 else
   7393                                   continue;
   7394                               else
   7395                                 continue;
   7396                             else
   7397                               continue;
   7398                         else
   7399                           if(ptr[offset10] < c_b)
   7400                             if(ptr[offset11] < c_b)
   7401                               if(ptr[offset12] < c_b)
   7402                                 if(ptr[offset13] < c_b)
   7403                                   if(ptr[offset14] < c_b)
   7404                                     if(ptr[offset15] < c_b)
   7405                                       {}
   7406                                     else
   7407                                       continue;
   7408                                   else
   7409                                     continue;
   7410                                 else
   7411                                   continue;
   7412                               else
   7413                                 continue;
   7414                             else
   7415                               continue;
   7416                           else
   7417                             continue;
   7418                       else
   7419                         continue;
   7420                     else
   7421                       continue;
   7422                   else
   7423                     continue;
   7424             }
   7425             if(total == nExpectedCorners)
   7426             {
   7427                 if(nExpectedCorners == 0)
   7428                 {
   7429                     nExpectedCorners = 512;
   7430                     keypoints.reserve(nExpectedCorners);
   7431                 }
   7432                 else
   7433                 {
   7434                     nExpectedCorners *= 2;
   7435                     keypoints.reserve(nExpectedCorners);
   7436                 }
   7437             }
   7438             keypoints.push_back(KeyPoint(Point2f((float)x, (float)y), 1.0f));
   7439             total++;
   7440         }
   7441     }
   7442 }
   7443 
   7444 
   7445 void AGAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool nonmax_suppression)
   7446 {
   7447     AGAST(_img, keypoints, threshold, nonmax_suppression, AgastFeatureDetector::OAST_9_16);
   7448 }
   7449 
   7450 
   7451 class AgastFeatureDetector_Impl : public AgastFeatureDetector
   7452 {
   7453 public:
   7454     AgastFeatureDetector_Impl( int _threshold, bool _nonmaxSuppression, int _type )
   7455     : threshold(_threshold), nonmaxSuppression(_nonmaxSuppression), type((short)_type)
   7456     {}
   7457 
   7458     void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask )
   7459     {
   7460         Mat mask = _mask.getMat(), grayImage;
   7461         UMat ugrayImage;
   7462         _InputArray gray = _image;
   7463         if( _image.type() != CV_8U )
   7464         {
   7465             _OutputArray ogray = _image.isUMat() ? _OutputArray(ugrayImage) : _OutputArray(grayImage);
   7466             cvtColor( _image, ogray, COLOR_BGR2GRAY );
   7467             gray = ogray;
   7468         }
   7469         AGAST( gray, keypoints, threshold, nonmaxSuppression, type );
   7470         KeyPointsFilter::runByPixelsMask( keypoints, mask );
   7471     }
   7472 
   7473     void set(int prop, double value)
   7474     {
   7475         if(prop == THRESHOLD)
   7476             threshold = cvRound(value);
   7477         else if(prop == NONMAX_SUPPRESSION)
   7478             nonmaxSuppression = value != 0;
   7479         else
   7480             CV_Error(Error::StsBadArg, "");
   7481     }
   7482 
   7483     double get(int prop) const
   7484     {
   7485         if(prop == THRESHOLD)
   7486             return threshold;
   7487         if(prop == NONMAX_SUPPRESSION)
   7488             return nonmaxSuppression;
   7489         CV_Error(Error::StsBadArg, "");
   7490         return 0;
   7491     }
   7492 
   7493     void setThreshold(int threshold_) { threshold = threshold_; }
   7494     int getThreshold() const { return threshold; }
   7495 
   7496     void setNonmaxSuppression(bool f) { nonmaxSuppression = f; }
   7497     bool getNonmaxSuppression() const { return nonmaxSuppression; }
   7498 
   7499     void setType(int type_) { type = type_; }
   7500     int getType() const { return type; }
   7501 
   7502     int threshold;
   7503     bool nonmaxSuppression;
   7504     int type;
   7505 };
   7506 
   7507 Ptr<AgastFeatureDetector> AgastFeatureDetector::create( int threshold, bool nonmaxSuppression, int type )
   7508 {
   7509     return makePtr<AgastFeatureDetector_Impl>(threshold, nonmaxSuppression, type);
   7510 }
   7511 
   7512 void AGAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool nonmax_suppression, int type)
   7513 {
   7514     // detect
   7515     switch(type) {
   7516       case AgastFeatureDetector::AGAST_5_8:
   7517         AGAST_5_8(_img, keypoints, threshold);
   7518         break;
   7519       case AgastFeatureDetector::AGAST_7_12d:
   7520         AGAST_7_12d(_img, keypoints, threshold);
   7521         break;
   7522       case AgastFeatureDetector::AGAST_7_12s:
   7523         AGAST_7_12s(_img, keypoints, threshold);
   7524         break;
   7525       case AgastFeatureDetector::OAST_9_16:
   7526         OAST_9_16(_img, keypoints, threshold);
   7527         break;
   7528     }
   7529 
   7530     cv::Mat img = _img.getMat();
   7531 
   7532     // score
   7533     int pixel_[16];
   7534     makeAgastOffsets(pixel_, (int)img.step, type);
   7535 
   7536     std::vector<KeyPoint>::iterator kpt;
   7537     for(kpt = keypoints.begin(); kpt != keypoints.end(); kpt++)
   7538     {
   7539         switch(type) {
   7540           case AgastFeatureDetector::AGAST_5_8:
   7541             kpt->response = (float)agast_cornerScore<AgastFeatureDetector::AGAST_5_8>
   7542                 (&img.at<uchar>((int)kpt->pt.y, (int)kpt->pt.x), pixel_, threshold);
   7543             break;
   7544           case AgastFeatureDetector::AGAST_7_12d:
   7545             kpt->response = (float)agast_cornerScore<AgastFeatureDetector::AGAST_7_12d>
   7546                 (&img.at<uchar>((int)kpt->pt.y, (int)kpt->pt.x), pixel_, threshold);
   7547             break;
   7548           case AgastFeatureDetector::AGAST_7_12s:
   7549             kpt->response = (float)agast_cornerScore<AgastFeatureDetector::AGAST_7_12s>
   7550                 (&img.at<uchar>((int)kpt->pt.y, (int)kpt->pt.x), pixel_, threshold);
   7551             break;
   7552           case AgastFeatureDetector::OAST_9_16:
   7553             kpt->response = (float)agast_cornerScore<AgastFeatureDetector::OAST_9_16>
   7554                 (&img.at<uchar>((int)kpt->pt.y, (int)kpt->pt.x), pixel_, threshold);
   7555             break;
   7556         }
   7557     }
   7558     // suppression
   7559     if(nonmax_suppression)
   7560     {
   7561         size_t j;
   7562         size_t curr_idx;
   7563         size_t lastRow = 0, next_lastRow = 0;
   7564         size_t num_Corners = keypoints.size();
   7565         size_t lastRowCorner_ind = 0, next_lastRowCorner_ind = 0;
   7566 
   7567         std::vector<int> nmsFlags;
   7568         std::vector<KeyPoint>::iterator currCorner_nms;
   7569         std::vector<KeyPoint>::const_iterator currCorner;
   7570 
   7571         currCorner = keypoints.begin();
   7572 
   7573         nmsFlags.resize((int)num_Corners);
   7574 
   7575         // set all flags to MAXIMUM
   7576         for(j = 0; j < num_Corners; j++)
   7577             nmsFlags[j] = -1;
   7578 
   7579         for(curr_idx = 0; curr_idx < num_Corners; curr_idx++)
   7580         {
   7581             int t;
   7582             // check above
   7583             if(lastRow + 1 < currCorner->pt.y)
   7584             {
   7585                 lastRow = next_lastRow;
   7586                 lastRowCorner_ind = next_lastRowCorner_ind;
   7587             }
   7588             if(next_lastRow != currCorner->pt.y)
   7589             {
   7590                 next_lastRow = (size_t) currCorner->pt.y;
   7591                 next_lastRowCorner_ind = curr_idx;
   7592             }
   7593             if(lastRow + 1 == currCorner->pt.y)
   7594             {
   7595                 // find the corner above the current one
   7596                 while( (keypoints[lastRowCorner_ind].pt.x < currCorner->pt.x)
   7597                     && (keypoints[lastRowCorner_ind].pt.y == lastRow) )
   7598                     lastRowCorner_ind++;
   7599 
   7600                     if( (keypoints[lastRowCorner_ind].pt.x == currCorner->pt.x)
   7601                      && (lastRowCorner_ind != curr_idx) )
   7602                     {
   7603                         size_t w = lastRowCorner_ind;
   7604                         // find the maximum in this block
   7605                         while(nmsFlags[w] != -1)
   7606                             w = nmsFlags[w];
   7607 
   7608                         if(keypoints[curr_idx].response < keypoints[w].response)
   7609                             nmsFlags[curr_idx] = (int)w;
   7610                         else
   7611                             nmsFlags[w] = (int)curr_idx;
   7612                     }
   7613             }
   7614 
   7615             // check left
   7616             t = (int)curr_idx - 1;
   7617             if( (curr_idx != 0) && (keypoints[t].pt.y == currCorner->pt.y)
   7618              && (keypoints[t].pt.x + 1 == currCorner->pt.x) )
   7619             {
   7620                 int currCornerMaxAbove_ind = nmsFlags[curr_idx];
   7621                 // find the maximum in that area
   7622                 while(nmsFlags[t] != -1)
   7623                     t = nmsFlags[t];
   7624                 // no maximum above
   7625                 if(currCornerMaxAbove_ind == -1)
   7626                 {
   7627                     if((size_t)t != curr_idx)
   7628                     {
   7629                         if ( keypoints[curr_idx].response < keypoints[t].response )
   7630                             nmsFlags[curr_idx] = t;
   7631                         else
   7632                             nmsFlags[t] = (int)curr_idx;
   7633                     }
   7634                 }
   7635                 else // maximum above
   7636                 {
   7637                     if(t != currCornerMaxAbove_ind)
   7638                     {
   7639                         if(keypoints[currCornerMaxAbove_ind].response < keypoints[t].response)
   7640                         {
   7641                             nmsFlags[currCornerMaxAbove_ind] = t;
   7642                             nmsFlags[curr_idx] = t;
   7643                         }
   7644                         else
   7645                         {
   7646                             nmsFlags[t] = currCornerMaxAbove_ind;
   7647                             nmsFlags[curr_idx] = currCornerMaxAbove_ind;
   7648                         }
   7649                     }
   7650                 }
   7651             }
   7652             currCorner++;
   7653         }
   7654 
   7655         // marks non-maximum corners
   7656         for(curr_idx = 0; curr_idx < num_Corners; curr_idx++)
   7657         {
   7658             if (nmsFlags[curr_idx] != -1)
   7659                 keypoints[curr_idx].response = -1;
   7660         }
   7661 
   7662         // erase non-maximum corners
   7663         for (j = keypoints.size(); j > 0; j--)
   7664         {
   7665             if (keypoints[j - 1].response == -1)
   7666                 keypoints.erase(keypoints.begin() + j - 1 );
   7667         }
   7668     }
   7669 }
   7670 
   7671 } // END NAMESPACE CV
   7672