<?php
/**
 * @file
 * Auto Generated Code - DO NOT EDIT
 *
 * See http://51degrees.mobi/Support/Documentation/PHP#AutoGeneratedSourceCode for more details.*
 */

/**
 * This Source Code Form is subject to the terms of the Mozilla Public License,
 * v. 2.0.
 *
 * If a copy of the MPL was not distributed with this file, You can obtain one
 * at http://mozilla.org/MPL/2.0/.
 *
 * This Source Code Form is "Incompatible With Secondary Licenses", as defined
 * by the Mozilla Public License, v. 2.0.
 */

/**
 * Calculates the edit distance between the two strings.
 *
 * &$target string
 *   The string we're trying to find the closest value to.
 * $test string
 *   The string that we're testing against.
 * $ls integer
 *   The lowest score we've found so far.
 * return integer
 *   The edit distance between the two strings.
 */
function E1($target, $test, $ls) {
  return fiftyone_degrees_edit_distance($target, $test, $ls);
}

/**
 * Returns the details of the devices that are closest to the useragent string provided.
 *
 * $useragent string
 *   The useragent we're trying to find.
 * return array
 *   An array of device details for the closest devices.
 */
function _H1($useragent) {
  $ls = PHP_INT_MAX;
  $dl = array();
  $ua = 'Amoi-A518/(2008.12.24)SW1.0.2/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Amoi-A636/(2006.10.21)SW1.0.2/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Amoi-M600/(2006.10.21)SW1.0.2/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Amoi-M515/(2006.10.21)SW1.0.2/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Amoi-E5/(2006.10.21)SW1.0.2/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Amoi-F90/Plat-F/WAP2.0/MIDP1.0/CLDC1.0 UP.Browser/6.2.2.6.f.1.100 (GUI) MMP/1.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3625,18092, $ua);
  }
  $ua = 'Amoi-A310/Plat-F-VIM/WAP2.0/MIDP1.0/CLDC1.0 UP.Browser/6.2.2.7.c.1.102 (GUI) MMP/1.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3625,18092, $ua);
  }
  $ua = 'Amoi-A320/Plat-F-VIM/WAP2.0 UP.Browser/6.2.2.7.c.1.102 (GUI) MMP/1.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3625,18092, $ua);
  }
  $ua = 'Amoi-F8/Plat-F/WAP2.0/MIDP1.0/CLDC1.0 UP.Browser/6.2.2.7.c.1.101 (GUI) MMP/1.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3625,18092, $ua);
  }
  $ua = 'Amoi-F8/Plat-F/WAP2.0/MIDP1.0/CLDC1.0 UP.Browser/6.2.2.7.c.1.102 (GUI) MMP/1.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3625,18092, $ua);
  }
  $ua = 'Amoisonic-F9/1.0 UP.Browser/6.2.2.1.250 (GUI) MMP/1.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3625,18092, $ua);
  }
  $ua = 'Amoi-F90/Plat-F/WAP2.0/MIDP1.0/CLDC1.0 UP.Browser/6.2.2.7.c.1.101 (GUI) MMP/1.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3625,18092, $ua);
  }
  $ua = 'Amoi-A9B/1.0 UP.Browser/6.2.2.6.f.1.100 (GUI) MMP/1.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3625,18092, $ua);
  }
  $ua = 'Amoi-CS6/1.0 UP.Browser/6.2.2.6.f.1.100 (GUI) MMP/1.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3625,18092, $ua);
  }
  $ua = 'Amoi-M636/Plat-V-VIM/WAP2.0 UP.Browser/6.2.3.8.c.1.101 (GUI) MMP/2.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3625,18092, $ua);
  }
  $ua = 'Amoi-M630/Plat-V-VIM/WAP2.0/MIDP2.0/CLDC1.0 UP.Browser/6.2.3.8.c.1.100 (GUI) MMP/2.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3625,18092, $ua);
  }
  $ua = 'Amoi 8512/R23.0 NF-Browser/3.3';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3601,18092, $ua);
  }
  $ua = 'Amoi 8512/R21.0 NF-Browser/3.3';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3601,18092, $ua);
  }
  $ua = 'Amoi 8512/R18.0 NF-Browser/3.3';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3601,18092, $ua);
  }
  $ua = 'Amoi 8512/R22.0 NF-Browser/3.3';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3601,18092, $ua);
  }
  $ua = 'Amoi 8512/R10.0 NF-Browser/3.3';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3601,18092, $ua);
  }
  $ua = 'Amoi 8512/R18.7 NF-Browser/3.3 Novarra-Vision/8.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3601,18092, $ua);
  }
  $ua = 'Amoi 8512/R20.0 NF-Browser/3.3';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3601,18092, $ua);
  }
  $ua = 'Amoi 8512/R18.5 NF-Browser/3.3';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3601,18092, $ua);
  }
  $ua = 'Amoi 8512/R18.7 NF-Browser/3.3';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3601,18092, $ua);
  }
  $ua = 'Amoi 8512/R28.0 NF-Browser/3.3';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3601,18092, $ua);
  }
  $ua = 'Amoi 8512/R18.6 NF-Browser/3.3';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,3601,18092, $ua);
  }
  $ua = 'Amoisonic-F99/1.0 UP.Browser/5.0.3.2 (GUI)';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,4948,18092, $ua);
  }
  $ua = 'Amoi-V600/Plat-EMP/WAP2.0/MIDP2.0/CLDC1.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(12200,17017,17470,18092, $ua);
  }
  $ua = 'Amoi-V600';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(12200,17017,17470,18092, $ua);
  }
  $ua = 'Amoi8709/Brew/V3.1.5 Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,6190,17470,18092, $ua);
  }
  $ua = 'Amoi-V100/Plat-EMP/WAP2.0/MIDP2.0/CLDC1.0';
  $ns = E1($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(12202,17017,17470,18092, $ua);
  }
  return $dl;
}
