<?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 E39($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 _H39($useragent) {
  $ls = PHP_INT_MAX;
  $dl = array();
  $ua = 'FLY-MX230/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'FLY-MX330/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'FLY-SX300/2.0 (03.15) Profile/MIDP-2.0 Configuration/CLDC-1.1 FLY-SX300/2.0 (03.15) Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'FLY-SX310/2.0 (03.15) Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Fly-SX100/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'FLY-MX300/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'FLY-SL399e/2.0 (03.15) Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Fly MC100/S120 Release/2008.02.26 Profile/MIDP2.0 Configuration/CLDC1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Fly-LX610/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Fly-SX200/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Fly-LX600/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'FLY M130 Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Fly-SX315/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Fly-E105/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Fly-DS500/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,17470,18092, $ua);
  }
  $ua = 'Fly_E190 Wi-Fi    Opera/9.80 (MTK; Nucleus; U; ru-RU) Presto/2.4.18 Version/10.00';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,4812,18092, $ua);
  }
  $ua = 'FLY-MP500/BSI AU.Browser/2.0 QO3C1 MMP/1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,4970,18092, $ua);
  }
  $ua = 'FLY-MX200i/BSI AU.Browser/2.0 QO3C1 MMP/1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,4970,18092, $ua);
  }
  $ua = 'FLY-SL500m/BSI AU.Browser/2.0 QO3C1 MMP/1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,4970,18092, $ua);
  }
  $ua = 'FLY-SL300m/BSI AU.Browser/2.0 QO3C1 MMP/1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,4970,18092, $ua);
  }
  $ua = 'FLY-SX205/BSI AU.Browser/2.0 QO3C1 MMP/1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15364,17017,4970,18092, $ua);
  }
  $ua = 'Fly_E135/MAUIBrowser/Configuration/WAP2.0 Novarra-Vision/8.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(17540,17017,18246,18092, $ua);
  }
  $ua = 'Fly_E135/MAUIBrowser/Configuration/WAP2.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(17540,17017,18246,18092, $ua);
  }
  $ua = 'Fly DS160, Fly DS160';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(17542,17017,17470,18092, $ua);
  }
  $ua = 'Fly DS160';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(17542,17017,17470,18092, $ua);
  }
  $ua = 'Fly_DS160/Configuration/WapBrowser2.0 Novarra-Vision/8.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(17542,17017,17470,18092, $ua);
  }
  $ua = 'Fly_DS170 Configuration/WAP2.0/Browser';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(17542,17017,17470,18092, $ua);
  }
  $ua = 'Fly_Q400/WapBrowserprofile/WIFIprofile/MIDP2.0Configuration/CLDC1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15608,17017,17470,18092, $ua);
  }
  $ua = 'Fly_E140_India/WAPBrowser2.0Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(12552,17017,17470,18092, $ua);
  }
  $ua = 'Fly_E140/WAPBrowser2.0Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(12552,17017,17470,18092, $ua);
  }
  $ua = 'Fly_E140/WAPBrowser2.0Profile/MIDP-2.0 Configuration/CLDC-1.1, Fly_E140/WAPBrowser2.0Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(12552,17017,17470,18092, $ua);
  }
  $ua = 'FLY-SX210/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(13713,17017,17470,18092, $ua);
  }
  $ua = 'FLY-SX210/Profile/MIDP.2.0Configuration/CLDC.1.0, FLY-SX210/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(13713,17017,17470,18092, $ua);
  }
  $ua = 'FLY-SX210/Profile/MIDP.2.0Configuration/CLDC.1.0 FLY-SX210/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(13713,17017,17470,18092, $ua);
  }
  $ua = 'FLY-B720 DUO/1.0 RTKE_OS/01.00 Dragonfly6120/1.0 TMSS-Browser/1.0.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(12109,17017,17470,18092, $ua);
  }
  $ua = 'Fly_DS150/MAUIBrowser/Configuration/WAP2.0, Fly_DS150/MAUIBrowser/Configuration/WAP2.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(17546,17017,18246,18092, $ua);
  }
  $ua = 'Fly_DS150/MAUIBrowser/Configuration/WAP2.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(17546,17017,18246,18092, $ua);
  }
  $ua = 'Fly_DS100/WAP2.0Configuration/Browser';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(13983,17017,17470,18092, $ua);
  }
  $ua = 'FLY-SL600/BSI AU.Browser/2.0 QO3C1 MMP/1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(14095,17017,4970,18092, $ua);
  }
  $ua = 'FLY-SL600/BSI AU.Browser/2.0 QO3C1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(14095,17017,4970,18092, $ua);
  }
  $ua = 'FLY_SL400m/(06.11.27)Ver01.06/WAP2.0, FLY_SL400m/(06.11.27)Ver01.06/WAP2.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(17986,17017,17470,18092, $ua);
  }
  $ua = 'FLY_SL400m/(07.05.14)Ver00.06/WAP2.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(17986,17017,17470,18092, $ua);
  }
  $ua = 'Fly-E300/Profile/MIDP.2.0Configuration/CLDC.1.0, Fly-E300/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15286,17017,17470,18092, $ua);
  }
  $ua = 'Fly-E300/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15286,17017,17470,18092, $ua);
  }
  $ua = 'FLY-SX390/2.0 (03.15) Profile/MIDP-2.0 Configuration/CLDC-1.1, FLY-SX390/2.0 (03.15) Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15337,17017,17470,18092, $ua);
  }
  $ua = 'FLY-SX390/2.0 (03.15) Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15337,17017,17470,18092, $ua);
  }
  $ua = 'FLY-2040L/BSI AU.Browser/2.0 QO3C1 MMP/1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(14003,17017,4970,18092, $ua);
  }
  $ua = 'FLY-2040i/BSI AU.Browser/2.0 QO3C1 MMP/1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(14003,17017,4970,18092, $ua);
  }
  $ua = 'Fly_DS185/WAP2.0Configuration/Browser';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(13539,17017,17470,18092, $ua);
  }
  $ua = 'FLY-SX305/2.0 (03.15) Profile/MIDP-2.0 Configuration/CLDC-1.1, FLY-SX305/2.0 (03.15) Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15421,17017,17470,18092, $ua);
  }
  $ua = 'FLY-SX305/2.0 (03.15) Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15421,17017,17470,18092, $ua);
  }
  $ua = 'Fly-HT2_i08 ObigoInternetBrowser/QO3C Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(14530,17017,17470,18092, $ua);
  }
  $ua = 'Fly V180 DS/2.0 (5.0614.0) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0Configuration/CLDC-1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(17697,5776,3756,18092, $ua);
  }
  $ua = 'Fly-SX225/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(15717,17017,17470,18092, $ua);
  }
  $ua = 'Fly_DS210 ObigoInternetBrowser/QO3C Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(13845,17017,17470,18092, $ua);
  }
  $ua = 'Fly_MC150ds/WAP2.0Configuration/Browser';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(12984,17017,17470,18092, $ua);
  }
  $ua = 'Fly-B400/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(13140,17017,17470,18092, $ua);
  }
  $ua = 'FLY-SL500i/BSI AU.Browser/2.0 QO3C1 MMP/1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(14094,17017,4970,18092, $ua);
  }
  $ua = 'Fly-V130/Profile/MIDP.2.0Configuration/CLDC.1.0';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(14109,17017,17470,18092, $ua);
  }
  $ua = 'Fly_2040';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(14003,17017,17470,18092, $ua);
  }
  $ua = 'FLY-2040/2.0 (03.15) Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(14003,17017,17470,18092, $ua);
  }
  $ua = 'FLY B700 WAP Browser';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(17696,17017,17470,18092, $ua);
  }
  $ua = 'FLY-SL600';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(14095,17017,17470,18092, $ua);
  }
  $ua = 'Fly_SL500i';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(14094,17017,17470,18092, $ua);
  }
  $ua = 'Fly SX240/Teleca/Q03C1.22 Profile/MIDP-2.0 Configuration/CLDC-1.1';
  $ns = E39($useragent, $ua, $ls);
  if ($ns <= $ls) {
    if ($ns < $ls) {
      unset($dl);
      $ls = $ns;
    }
    $dl[] = array(17548,17017,3807,18092, $ua);
  }
  return $dl;
}
