ves_icall_System_Globalization_CultureInfo_construct_datetime_format (struct MonoCultureInfo * this)
{
  int D.18914;
  _Bool D.18915;
  long int D.18916;
  long int D.18917;
  unsigned char D.18920;
  struct MonoArray * * D.18921;
  const stridx_t[7] * D.18922;
  struct MonoArray * D.18923;
  struct MonoArray * * D.18924;
  const stridx_t[13] * D.18925;
  struct MonoArray * D.18926;
  struct MonoString * * D.18927;
  short unsigned int D.18928;
  sizetype D.18929;
  const char * D.18930;
  struct MonoString * D.18931;
  signed char D.18932;
  unsigned int D.18933;
  struct MonoString * * D.18934;
  short unsigned int D.18935;
  sizetype D.18936;
  const char * D.18937;
  struct MonoString * D.18938;
  struct MonoArray * * D.18939;
  const stridx_t[7] * D.18940;
  struct MonoArray * D.18941;
  struct MonoArray * * D.18942;
  const stridx_t[7] * D.18943;
  struct MonoArray * D.18944;
  signed char D.18945;
  unsigned int D.18946;
  struct MonoString * * D.18947;
  short unsigned int D.18948;
  sizetype D.18949;
  const char * D.18950;
  struct MonoString * D.18951;
  struct MonoString * * D.18952;
  short unsigned int D.18953;
  sizetype D.18954;
  const char * D.18955;
  struct MonoString * D.18956;
  struct MonoString * * D.18957;
  short unsigned int D.18958;
  sizetype D.18959;
  const char * D.18960;
  struct MonoString * D.18961;
  struct MonoArray * * D.18962;
  const stridx_t[13] * D.18963;
  struct MonoArray * D.18964;
  struct MonoString * * D.18965;
  short unsigned int D.18966;
  sizetype D.18967;
  const char * D.18968;
  struct MonoString * D.18969;
  struct MonoString * * D.18970;
  short unsigned int D.18971;
  sizetype D.18972;
  const char * D.18973;
  struct MonoString * D.18974;
  struct MonoString * * D.18975;
  short unsigned int D.18976;
  sizetype D.18977;
  const char * D.18978;
  struct MonoString * D.18979;
  struct MonoString * * D.18980;
  short unsigned int D.18981;
  sizetype D.18982;
  const char * D.18983;
  struct MonoString * D.18984;
  struct MonoString * * D.18985;
  short unsigned int D.18986;
  sizetype D.18987;
  const char * D.18988;
  struct MonoString * D.18989;
  struct MonoArray * * D.18990;
  const stridx_t[14] * D.18991;
  struct MonoArray * D.18992;
  struct MonoArray * * D.18993;
  const stridx_t[8] * D.18994;
  struct MonoArray * D.18995;
  struct MonoArray * * D.18996;
  const stridx_t[12] * D.18997;
  struct MonoArray * D.18998;
  struct MonoArray * * D.18999;
  const stridx_t[9] * D.19000;
  struct MonoArray * D.19001;
  struct MonoArray * * D.19002;
  const stridx_t[13] * D.19003;
  struct MonoArray * D.19004;
  struct MonoArray * * D.19005;
  const stridx_t[13] * D.19006;
  struct MonoArray * D.19007;
  struct MonoDomain * domain;
  struct MonoDateTimeFormatInfo * datetime;
  const struct DateTimeFormatEntry * dfe;

  D.18914 = this->datetime_index;
  D.18915 = D.18914 < 0;
  D.18916 = (long int) D.18915;
  D.18917 = __builtin_expect (D.18916, 0);
  if (D.18917 != 0) goto <D.18918>; else goto <D.18919>;
  <D.18918>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "locales.c", 169, "this->datetime_index >= 0");
  <D.18919>:
  datetime = this->datetime_format;
  D.18914 = this->datetime_index;
  dfe = &datetime_format_entries[D.18914];
  domain = mono_domain_get ();
  D.18920 = this->is_read_only;
  datetime->readOnly = D.18920;
  D.18921 = &datetime->AbbreviatedDayNames;
  D.18922 = &dfe->abbreviated_day_names;
  D.18923 = create_names_array_idx (D.18922, 7);
  mono_gc_wbarrier_set_field (datetime, D.18921, D.18923);
  D.18924 = &datetime->AbbreviatedMonthNames;
  D.18925 = &dfe->abbreviated_month_names;
  D.18926 = create_names_array_idx (D.18925, 13);
  mono_gc_wbarrier_set_field (datetime, D.18924, D.18926);
  D.18927 = &datetime->AMDesignator;
  D.18928 = dfe->am_designator;
  D.18929 = (sizetype) D.18928;
  D.18930 = &locale_strings + D.18929;
  D.18931 = mono_string_new (domain, D.18930);
  mono_gc_wbarrier_set_field (datetime, D.18927, D.18931);
  D.18932 = dfe->calendar_week_rule;
  D.18933 = (unsigned int) D.18932;
  datetime->CalendarWeekRule = D.18933;
  D.18934 = &datetime->DateSeparator;
  D.18935 = dfe->date_separator;
  D.18936 = (sizetype) D.18935;
  D.18937 = &locale_strings + D.18936;
  D.18938 = mono_string_new (domain, D.18937);
  mono_gc_wbarrier_set_field (datetime, D.18934, D.18938);
  D.18939 = &datetime->DayNames;
  D.18940 = &dfe->day_names;
  D.18941 = create_names_array_idx (D.18940, 7);
  mono_gc_wbarrier_set_field (datetime, D.18939, D.18941);
  D.18942 = &datetime->ShortestDayNames;
  D.18943 = &dfe->shortest_day_names;
  D.18944 = create_names_array_idx (D.18943, 7);
  mono_gc_wbarrier_set_field (datetime, D.18942, D.18944);
  D.18945 = dfe->first_day_of_week;
  D.18946 = (unsigned int) D.18945;
  datetime->FirstDayOfWeek = D.18946;
  D.18947 = &datetime->LongDatePattern;
  D.18948 = dfe->long_date_pattern;
  D.18949 = (sizetype) D.18948;
  D.18950 = &locale_strings + D.18949;
  D.18951 = mono_string_new (domain, D.18950);
  mono_gc_wbarrier_set_field (datetime, D.18947, D.18951);
  D.18952 = &datetime->LongTimePattern;
  D.18953 = dfe->long_time_pattern;
  D.18954 = (sizetype) D.18953;
  D.18955 = &locale_strings + D.18954;
  D.18956 = mono_string_new (domain, D.18955);
  mono_gc_wbarrier_set_field (datetime, D.18952, D.18956);
  D.18957 = &datetime->MonthDayPattern;
  D.18958 = dfe->month_day_pattern;
  D.18959 = (sizetype) D.18958;
  D.18960 = &locale_strings + D.18959;
  D.18961 = mono_string_new (domain, D.18960);
  mono_gc_wbarrier_set_field (datetime, D.18957, D.18961);
  D.18962 = &datetime->MonthNames;
  D.18963 = &dfe->month_names;
  D.18964 = create_names_array_idx (D.18963, 13);
  mono_gc_wbarrier_set_field (datetime, D.18962, D.18964);
  D.18965 = &datetime->PMDesignator;
  D.18966 = dfe->pm_designator;
  D.18967 = (sizetype) D.18966;
  D.18968 = &locale_strings + D.18967;
  D.18969 = mono_string_new (domain, D.18968);
  mono_gc_wbarrier_set_field (datetime, D.18965, D.18969);
  D.18970 = &datetime->ShortDatePattern;
  D.18971 = dfe->short_date_pattern;
  D.18972 = (sizetype) D.18971;
  D.18973 = &locale_strings + D.18972;
  D.18974 = mono_string_new (domain, D.18973);
  mono_gc_wbarrier_set_field (datetime, D.18970, D.18974);
  D.18975 = &datetime->ShortTimePattern;
  D.18976 = dfe->short_time_pattern;
  D.18977 = (sizetype) D.18976;
  D.18978 = &locale_strings + D.18977;
  D.18979 = mono_string_new (domain, D.18978);
  mono_gc_wbarrier_set_field (datetime, D.18975, D.18979);
  D.18980 = &datetime->TimeSeparator;
  D.18981 = dfe->time_separator;
  D.18982 = (sizetype) D.18981;
  D.18983 = &locale_strings + D.18982;
  D.18984 = mono_string_new (domain, D.18983);
  mono_gc_wbarrier_set_field (datetime, D.18980, D.18984);
  D.18985 = &datetime->YearMonthPattern;
  D.18986 = dfe->year_month_pattern;
  D.18987 = (sizetype) D.18986;
  D.18988 = &locale_strings + D.18987;
  D.18989 = mono_string_new (domain, D.18988);
  mono_gc_wbarrier_set_field (datetime, D.18985, D.18989);
  D.18990 = &datetime->ShortDatePatterns;
  D.18991 = &dfe->short_date_patterns;
  D.18992 = create_names_array_idx_dynamic (D.18991, 14);
  mono_gc_wbarrier_set_field (datetime, D.18990, D.18992);
  D.18993 = &datetime->LongDatePatterns;
  D.18994 = &dfe->long_date_patterns;
  D.18995 = create_names_array_idx_dynamic (D.18994, 8);
  mono_gc_wbarrier_set_field (datetime, D.18993, D.18995);
  D.18996 = &datetime->ShortTimePatterns;
  D.18997 = &dfe->short_time_patterns;
  D.18998 = create_names_array_idx_dynamic (D.18997, 12);
  mono_gc_wbarrier_set_field (datetime, D.18996, D.18998);
  D.18999 = &datetime->LongTimePatterns;
  D.19000 = &dfe->long_time_patterns;
  D.19001 = create_names_array_idx_dynamic (D.19000, 9);
  mono_gc_wbarrier_set_field (datetime, D.18999, D.19001);
  D.19002 = &datetime->GenitiveMonthNames;
  D.19003 = &dfe->month_genitive_names;
  D.19004 = create_names_array_idx (D.19003, 13);
  mono_gc_wbarrier_set_field (datetime, D.19002, D.19004);
  D.19005 = &datetime->GenitiveAbbreviatedMonthNames;
  D.19006 = &dfe->abbreviated_month_genitive_names;
  D.19007 = create_names_array_idx (D.19006, 13);
  mono_gc_wbarrier_set_field (datetime, D.19005, D.19007);
}


create_names_array_idx_dynamic (const guint16 * names, int ml)
{
  struct MonoArray * D.19010;
  unsigned int i.0;
  unsigned int D.19012;
  const guint16 * D.19013;
  short unsigned int D.19014;
  struct MonoDomain * D.19016;
  struct MonoClass * D.18658;
  struct MonoClass * tmp_klass.1;
  struct MonoClass * D.19020;
  struct MonoClass * tmp_klass.2;
  _Bool D.19022;
  long int D.19023;
  long int D.19024;
  struct MonoVTable * D.19027;
  unsigned int len.3;
  unsigned int i.4;
  sizetype D.19030;
  const char * D.19031;
  struct MonoString * D.19032;
  struct MonoArray * ret;
  struct MonoDomain * domain;
  int i;
  int len;

  len = 0;
  if (names == 0B) goto <D.19008>; else goto <D.19009>;
  <D.19008>:
  D.19010 = 0B;
  return D.19010;
  <D.19009>:
  domain = mono_domain_get ();
  i = 0;
  goto <D.18656>;
  <D.18655>:
  i.0 = (unsigned int) i;
  D.19012 = i.0 * 2;
  D.19013 = names + D.19012;
  D.19014 = *D.19013;
  if (D.19014 == 0) goto <D.18654>; else goto <D.19015>;
  <D.19015>:
  len = len + 1;
  i = i + 1;
  <D.18656>:
  if (i < ml) goto <D.18655>; else goto <D.18654>;
  <D.18654>:
  D.19016 = mono_domain_get ();
  {
    static struct MonoClass * tmp_klass;

    {
      tmp_klass.1 = tmp_klass;
      if (tmp_klass.1 == 0B) goto <D.19018>; else goto <D.19019>;
      <D.19018>:
      D.19020 = mono_get_string_class ();
      tmp_klass.2 = mono_array_class_get (D.19020, 1);
      tmp_klass = tmp_klass.2;
      tmp_klass.1 = tmp_klass;
      D.19022 = tmp_klass.1 == 0B;
      D.19023 = (long int) D.19022;
      D.19024 = __builtin_expect (D.19023, 0);
      if (D.19024 != 0) goto <D.19025>; else goto <D.19026>;
      <D.19025>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "locales.c", 152, "tmp_klass");
      <D.19026>:
      <D.19019>:
    }
    D.18658 = tmp_klass;
  }
  D.19027 = mono_class_vtable (D.19016, D.18658);
  len.3 = (unsigned int) len;
  ret = mono_array_new_specific (D.19027, len.3);
  i = 0;
  goto <D.18661>;
  <D.18660>:
  {
    void * * __p;

    i.4 = (unsigned int) i;
    __p = mono_array_addr_with_size (ret, 4, i.4);
    i.0 = (unsigned int) i;
    D.19012 = i.0 * 2;
    D.19013 = names + D.19012;
    D.19014 = *D.19013;
    D.19030 = (sizetype) D.19014;
    D.19031 = &locale_strings + D.19030;
    D.19032 = mono_string_new (domain, D.19031);
    mono_gc_wbarrier_set_arrayref (ret, __p, D.19032);
  }
  i = i + 1;
  <D.18661>:
  if (i < len) goto <D.18660>; else goto <D.18662>;
  <D.18662>:
  D.19010 = ret;
  return D.19010;
}


create_names_array_idx (const guint16 * names, int ml)
{
  struct MonoArray * D.19036;
  struct MonoDomain * D.19037;
  struct MonoClass * D.18641;
  struct MonoClass * tmp_klass.5;
  struct MonoClass * D.19041;
  struct MonoClass * tmp_klass.6;
  _Bool D.19043;
  long int D.19044;
  long int D.19045;
  struct MonoVTable * D.19048;
  unsigned int ml.7;
  unsigned int i.8;
  unsigned int i.9;
  unsigned int D.19052;
  const guint16 * D.19053;
  short unsigned int D.19054;
  sizetype D.19055;
  const char * D.19056;
  struct MonoString * D.19057;
  struct MonoArray * ret;
  struct MonoDomain * domain;
  int i;

  if (names == 0B) goto <D.19034>; else goto <D.19035>;
  <D.19034>:
  D.19036 = 0B;
  return D.19036;
  <D.19035>:
  domain = mono_domain_get ();
  D.19037 = mono_domain_get ();
  {
    static struct MonoClass * tmp_klass;

    {
      tmp_klass.5 = tmp_klass;
      if (tmp_klass.5 == 0B) goto <D.19039>; else goto <D.19040>;
      <D.19039>:
      D.19041 = mono_get_string_class ();
      tmp_klass.6 = mono_array_class_get (D.19041, 1);
      tmp_klass = tmp_klass.6;
      tmp_klass.5 = tmp_klass;
      D.19043 = tmp_klass.5 == 0B;
      D.19044 = (long int) D.19043;
      D.19045 = __builtin_expect (D.19044, 0);
      if (D.19045 != 0) goto <D.19046>; else goto <D.19047>;
      <D.19046>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "locales.c", 126, "tmp_klass");
      <D.19047>:
      <D.19040>:
    }
    D.18641 = tmp_klass;
  }
  D.19048 = mono_class_vtable (D.19037, D.18641);
  ml.7 = (unsigned int) ml;
  ret = mono_array_new_specific (D.19048, ml.7);
  i = 0;
  goto <D.18644>;
  <D.18643>:
  {
    void * * __p;

    i.8 = (unsigned int) i;
    __p = mono_array_addr_with_size (ret, 4, i.8);
    i.9 = (unsigned int) i;
    D.19052 = i.9 * 2;
    D.19053 = names + D.19052;
    D.19054 = *D.19053;
    D.19055 = (sizetype) D.19054;
    D.19056 = &locale_strings + D.19055;
    D.19057 = mono_string_new (domain, D.19056);
    mono_gc_wbarrier_set_arrayref (ret, __p, D.19057);
  }
  i = i + 1;
  <D.18644>:
  if (i < ml) goto <D.18643>; else goto <D.18645>;
  <D.18645>:
  D.19036 = ret;
  return D.19036;
}


ves_icall_System_Globalization_CultureInfo_construct_number_format (struct MonoCultureInfo * this)
{
  struct MonoNumberFormatInfo * D.19059;
  _Bool D.19060;
  long int D.19061;
  long int D.19062;
  int D.19065;
  unsigned char D.19068;
  signed char D.19069;
  int D.19070;
  struct MonoString * * D.19071;
  short unsigned int D.19072;
  sizetype D.19073;
  const char * D.19074;
  struct MonoString * D.19075;
  struct MonoString * * D.19076;
  short unsigned int D.19077;
  sizetype D.19078;
  const char * D.19079;
  struct MonoString * D.19080;
  struct MonoArray * * D.19081;
  const gint[2] * D.19082;
  struct MonoArray * D.19083;
  signed char D.19084;
  int D.19085;
  signed char D.19086;
  int D.19087;
  struct MonoString * * D.19088;
  short unsigned int D.19089;
  sizetype D.19090;
  const char * D.19091;
  struct MonoString * D.19092;
  struct MonoString * * D.19093;
  short unsigned int D.19094;
  sizetype D.19095;
  const char * D.19096;
  struct MonoString * D.19097;
  struct MonoString * * D.19098;
  short unsigned int D.19099;
  sizetype D.19100;
  const char * D.19101;
  struct MonoString * D.19102;
  struct MonoString * * D.19103;
  short unsigned int D.19104;
  sizetype D.19105;
  const char * D.19106;
  struct MonoString * D.19107;
  signed char D.19108;
  unsigned int D.19109;
  struct MonoString * * D.19110;
  short unsigned int D.19111;
  sizetype D.19112;
  const char * D.19113;
  struct MonoString * D.19114;
  struct MonoString * * D.19115;
  short unsigned int D.19116;
  sizetype D.19117;
  const char * D.19118;
  struct MonoString * D.19119;
  struct MonoArray * * D.19120;
  const gint[2] * D.19121;
  struct MonoArray * D.19122;
  signed char D.19123;
  int D.19124;
  signed char D.19125;
  int D.19126;
  struct MonoString * * D.19127;
  short unsigned int D.19128;
  sizetype D.19129;
  const char * D.19130;
  struct MonoString * D.19131;
  struct MonoString * * D.19132;
  short unsigned int D.19133;
  sizetype D.19134;
  const char * D.19135;
  struct MonoString * D.19136;
  struct MonoArray * * D.19137;
  const gint[2] * D.19138;
  struct MonoArray * D.19139;
  signed char D.19140;
  int D.19141;
  signed char D.19142;
  int D.19143;
  struct MonoString * * D.19144;
  short unsigned int D.19145;
  sizetype D.19146;
  const char * D.19147;
  struct MonoString * D.19148;
  struct MonoString * * D.19149;
  short unsigned int D.19150;
  sizetype D.19151;
  const char * D.19152;
  struct MonoString * D.19153;
  struct MonoString * * D.19154;
  short unsigned int D.19155;
  sizetype D.19156;
  const char * D.19157;
  struct MonoString * D.19158;
  struct MonoString * * D.19159;
  short unsigned int D.19160;
  sizetype D.19161;
  const char * D.19162;
  struct MonoString * D.19163;
  struct MonoDomain * domain;
  struct MonoNumberFormatInfo * number;
  const struct NumberFormatEntry * nfe;

  D.19059 = this->number_format;
  D.19060 = D.19059 == 0B;
  D.19061 = (long int) D.19060;
  D.19062 = __builtin_expect (D.19061, 0);
  if (D.19062 != 0) goto <D.19063>; else goto <D.19064>;
  <D.19063>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "locales.c", 217, "this->number_format != 0");
  <D.19064>:
  D.19065 = this->number_index;
  if (D.19065 < 0) goto <D.19066>; else goto <D.19067>;
  <D.19066>:
  return;
  <D.19067>:
  number = this->number_format;
  D.19065 = this->number_index;
  nfe = &number_format_entries[D.19065];
  domain = mono_domain_get ();
  D.19068 = this->is_read_only;
  number->readOnly = D.19068;
  D.19069 = nfe->currency_decimal_digits;
  D.19070 = (int) D.19069;
  number->currencyDecimalDigits = D.19070;
  D.19071 = &number->currencyDecimalSeparator;
  D.19072 = nfe->currency_decimal_separator;
  D.19073 = (sizetype) D.19072;
  D.19074 = &locale_strings + D.19073;
  D.19075 = mono_string_new (domain, D.19074);
  mono_gc_wbarrier_set_field (number, D.19071, D.19075);
  D.19076 = &number->currencyGroupSeparator;
  D.19077 = nfe->currency_group_separator;
  D.19078 = (sizetype) D.19077;
  D.19079 = &locale_strings + D.19078;
  D.19080 = mono_string_new (domain, D.19079);
  mono_gc_wbarrier_set_field (number, D.19076, D.19080);
  D.19081 = &number->currencyGroupSizes;
  D.19082 = &nfe->currency_group_sizes;
  D.19083 = create_group_sizes_array (D.19082, 2);
  mono_gc_wbarrier_set_field (number, D.19081, D.19083);
  D.19084 = nfe->currency_negative_pattern;
  D.19085 = (int) D.19084;
  number->currencyNegativePattern = D.19085;
  D.19086 = nfe->currency_positive_pattern;
  D.19087 = (int) D.19086;
  number->currencyPositivePattern = D.19087;
  D.19088 = &number->currencySymbol;
  D.19089 = nfe->currency_symbol;
  D.19090 = (sizetype) D.19089;
  D.19091 = &locale_strings + D.19090;
  D.19092 = mono_string_new (domain, D.19091);
  mono_gc_wbarrier_set_field (number, D.19088, D.19092);
  D.19093 = &number->naNSymbol;
  D.19094 = nfe->nan_symbol;
  D.19095 = (sizetype) D.19094;
  D.19096 = &locale_strings + D.19095;
  D.19097 = mono_string_new (domain, D.19096);
  mono_gc_wbarrier_set_field (number, D.19093, D.19097);
  D.19098 = &number->negativeInfinitySymbol;
  D.19099 = nfe->negative_infinity_symbol;
  D.19100 = (sizetype) D.19099;
  D.19101 = &locale_strings + D.19100;
  D.19102 = mono_string_new (domain, D.19101);
  mono_gc_wbarrier_set_field (number, D.19098, D.19102);
  D.19103 = &number->negativeSign;
  D.19104 = nfe->negative_sign;
  D.19105 = (sizetype) D.19104;
  D.19106 = &locale_strings + D.19105;
  D.19107 = mono_string_new (domain, D.19106);
  mono_gc_wbarrier_set_field (number, D.19103, D.19107);
  D.19108 = nfe->number_decimal_digits;
  D.19109 = (unsigned int) D.19108;
  number->numberDecimalDigits = D.19109;
  D.19110 = &number->numberDecimalSeparator;
  D.19111 = nfe->number_decimal_separator;
  D.19112 = (sizetype) D.19111;
  D.19113 = &locale_strings + D.19112;
  D.19114 = mono_string_new (domain, D.19113);
  mono_gc_wbarrier_set_field (number, D.19110, D.19114);
  D.19115 = &number->numberGroupSeparator;
  D.19116 = nfe->number_group_separator;
  D.19117 = (sizetype) D.19116;
  D.19118 = &locale_strings + D.19117;
  D.19119 = mono_string_new (domain, D.19118);
  mono_gc_wbarrier_set_field (number, D.19115, D.19119);
  D.19120 = &number->numberGroupSizes;
  D.19121 = &nfe->number_group_sizes;
  D.19122 = create_group_sizes_array (D.19121, 2);
  mono_gc_wbarrier_set_field (number, D.19120, D.19122);
  D.19123 = nfe->number_negative_pattern;
  D.19124 = (int) D.19123;
  number->numberNegativePattern = D.19124;
  D.19125 = nfe->percent_decimal_digits;
  D.19126 = (int) D.19125;
  number->percentDecimalDigits = D.19126;
  D.19127 = &number->percentDecimalSeparator;
  D.19128 = nfe->percent_decimal_separator;
  D.19129 = (sizetype) D.19128;
  D.19130 = &locale_strings + D.19129;
  D.19131 = mono_string_new (domain, D.19130);
  mono_gc_wbarrier_set_field (number, D.19127, D.19131);
  D.19132 = &number->percentGroupSeparator;
  D.19133 = nfe->percent_group_separator;
  D.19134 = (sizetype) D.19133;
  D.19135 = &locale_strings + D.19134;
  D.19136 = mono_string_new (domain, D.19135);
  mono_gc_wbarrier_set_field (number, D.19132, D.19136);
  D.19137 = &number->percentGroupSizes;
  D.19138 = &nfe->percent_group_sizes;
  D.19139 = create_group_sizes_array (D.19138, 2);
  mono_gc_wbarrier_set_field (number, D.19137, D.19139);
  D.19140 = nfe->percent_negative_pattern;
  D.19141 = (int) D.19140;
  number->percentNegativePattern = D.19141;
  D.19142 = nfe->percent_positive_pattern;
  D.19143 = (int) D.19142;
  number->percentPositivePattern = D.19143;
  D.19144 = &number->percentSymbol;
  D.19145 = nfe->percent_symbol;
  D.19146 = (sizetype) D.19145;
  D.19147 = &locale_strings + D.19146;
  D.19148 = mono_string_new (domain, D.19147);
  mono_gc_wbarrier_set_field (number, D.19144, D.19148);
  D.19149 = &number->perMilleSymbol;
  D.19150 = nfe->per_mille_symbol;
  D.19151 = (sizetype) D.19150;
  D.19152 = &locale_strings + D.19151;
  D.19153 = mono_string_new (domain, D.19152);
  mono_gc_wbarrier_set_field (number, D.19149, D.19153);
  D.19154 = &number->positiveInfinitySymbol;
  D.19155 = nfe->positive_infinity_symbol;
  D.19156 = (sizetype) D.19155;
  D.19157 = &locale_strings + D.19156;
  D.19158 = mono_string_new (domain, D.19157);
  mono_gc_wbarrier_set_field (number, D.19154, D.19158);
  D.19159 = &number->positiveSign;
  D.19160 = nfe->positive_sign;
  D.19161 = (sizetype) D.19160;
  D.19162 = &locale_strings + D.19161;
  D.19163 = mono_string_new (domain, D.19162);
  mono_gc_wbarrier_set_field (number, D.19159, D.19163);
}


create_group_sizes_array (const gint * gs, gint ml)
{
  unsigned int i.10;
  unsigned int D.19166;
  const gint * D.19167;
  int D.19168;
  struct MonoDomain * D.19170;
  struct MonoClass * D.18628;
  struct MonoClass * tmp_klass.11;
  struct MonoClass * D.19174;
  struct MonoClass * tmp_klass.12;
  _Bool D.19176;
  long int D.19177;
  long int D.19178;
  struct MonoVTable * D.19181;
  unsigned int len.13;
  unsigned int i.14;
  struct MonoArray * D.19184;
  struct MonoArray * ret;
  int i;
  int len;

  len = 0;
  i = 0;
  goto <D.18626>;
  <D.18625>:
  i.10 = (unsigned int) i;
  D.19166 = i.10 * 4;
  D.19167 = gs + D.19166;
  D.19168 = *D.19167;
  if (D.19168 == -1) goto <D.18624>; else goto <D.19169>;
  <D.19169>:
  len = len + 1;
  i = i + 1;
  <D.18626>:
  if (i < ml) goto <D.18625>; else goto <D.18624>;
  <D.18624>:
  D.19170 = mono_domain_get ();
  {
    static struct MonoClass * tmp_klass;

    {
      tmp_klass.11 = tmp_klass;
      if (tmp_klass.11 == 0B) goto <D.19172>; else goto <D.19173>;
      <D.19172>:
      D.19174 = mono_get_int32_class ();
      tmp_klass.12 = mono_array_class_get (D.19174, 1);
      tmp_klass = tmp_klass.12;
      tmp_klass.11 = tmp_klass;
      D.19176 = tmp_klass.11 == 0B;
      D.19177 = (long int) D.19176;
      D.19178 = __builtin_expect (D.19177, 0);
      if (D.19178 != 0) goto <D.19179>; else goto <D.19180>;
      <D.19179>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "locales.c", 106, "tmp_klass");
      <D.19180>:
      <D.19173>:
    }
    D.18628 = tmp_klass;
  }
  D.19181 = mono_class_vtable (D.19170, D.18628);
  len.13 = (unsigned int) len;
  ret = mono_array_new_specific (D.19181, len.13);
  i = 0;
  goto <D.18631>;
  <D.18630>:
  {
    gint32 * __p;

    i.14 = (unsigned int) i;
    __p = mono_array_addr_with_size (ret, 4, i.14);
    i.10 = (unsigned int) i;
    D.19166 = i.10 * 4;
    D.19167 = gs + D.19166;
    D.19168 = *D.19167;
    *__p = D.19168;
  }
  i = i + 1;
  <D.18631>:
  if (i < len) goto <D.18630>; else goto <D.18632>;
  <D.18632>:
  D.19184 = ret;
  return D.19184;
}


ves_icall_System_Globalization_CultureInfo_get_current_locale_name ()
{
  struct MonoString * D.19188;
  gchar * locale;
  struct MonoString * ret;
  struct MonoDomain * domain;

  locale = get_current_locale_name ();
  if (locale == 0B) goto <D.19186>; else goto <D.19187>;
  <D.19186>:
  D.19188 = 0B;
  return D.19188;
  <D.19187>:
  domain = mono_domain_get ();
  ret = mono_string_new (domain, locale);
  monoeg_g_free (locale);
  D.19188 = ret;
  return D.19188;
}


get_current_locale_name ()
{
  gchar * D.19192;
  char * locale;
  char * p;
  char * ret;

  locale = get_posix_locale ();
  if (locale == 0B) goto <D.19190>; else goto <D.19191>;
  <D.19190>:
  D.19192 = 0B;
  return D.19192;
  <D.19191>:
  p = __builtin_strchr (locale, 46);
  if (p != 0B) goto <D.19193>; else goto <D.19194>;
  <D.19193>:
  *p = 0;
  <D.19194>:
  p = __builtin_strchr (locale, 64);
  if (p != 0B) goto <D.19195>; else goto <D.19196>;
  <D.19195>:
  *p = 0;
  <D.19196>:
  p = __builtin_strchr (locale, 95);
  if (p != 0B) goto <D.19197>; else goto <D.19198>;
  <D.19197>:
  *p = 45;
  <D.19198>:
  ret = monoeg_g_ascii_strdown (locale, -1);
  monoeg_g_free (locale);
  D.19192 = ret;
  return D.19192;
}


get_posix_locale ()
{
  char * D.19206;
  int D.18706;
  int iftmp.15;
  int D.18705;
  const char[2] * D.19210;
  unsigned char D.19211;
  int D.19212;
  unsigned char D.19213;
  int D.19214;
  _Bool D.19215;
  _Bool D.19216;
  _Bool D.19217;
  const unsigned char * D.19220;
  unsigned char D.19221;
  int D.19222;
  const unsigned char * D.19223;
  unsigned char D.19224;
  int D.19225;
  _Bool D.19226;
  _Bool D.19227;
  const unsigned char * D.19230;
  unsigned char D.19231;
  int D.19232;
  const unsigned char * D.19233;
  unsigned char D.19234;
  int D.19235;
  _Bool D.19236;
  _Bool D.19237;
  const unsigned char * D.19240;
  unsigned char D.19241;
  int D.19242;
  const unsigned char * D.19243;
  unsigned char D.19244;
  int D.19245;
  const char * locale;

  locale = monoeg_g_getenv ("LC_ALL");
  if (locale == 0B) goto <D.19200>; else goto <D.19201>;
  <D.19200>:
  locale = monoeg_g_getenv ("LANG");
  if (locale == 0B) goto <D.19202>; else goto <D.19203>;
  <D.19202>:
  locale = setlocale (6, 0B);
  <D.19203>:
  <D.19201>:
  if (locale == 0B) goto <D.19204>; else goto <D.19205>;
  <D.19204>:
  D.19206 = 0B;
  return D.19206;
  <D.19205>:
  {
    size_t __s1_len;
    size_t __s2_len;

    __s2_len = 1;
    if (__s2_len <= 3) goto <D.19208>; else goto <D.19209>;
    <D.19208>:
    {
      const unsigned char * __s2;
      int __result;

      __s2 = locale;
      D.19210 = "C";
      D.19211 = MEM[(const unsigned char *)D.19210];
      D.19212 = (int) D.19211;
      D.19213 = *__s2;
      D.19214 = (int) D.19213;
      __result = D.19212 - D.19214;
      {
        D.19215 = __s2_len != 0;
        D.19216 = __result == 0;
        D.19217 = D.19215 & D.19216;
        if (D.19217 != 0) goto <D.19218>; else goto <D.19219>;
        <D.19218>:
        D.19220 = &MEM[(void *)"C" + 1B];
        D.19221 = *D.19220;
        D.19222 = (int) D.19221;
        D.19223 = __s2 + 1;
        D.19224 = *D.19223;
        D.19225 = (int) D.19224;
        __result = D.19222 - D.19225;
        D.19226 = __s2_len > 1;
        D.19216 = __result == 0;
        D.19227 = D.19226 & D.19216;
        if (D.19227 != 0) goto <D.19228>; else goto <D.19229>;
        <D.19228>:
        D.19230 = &MEM[(void *)"C" + 2B];
        D.19231 = *D.19230;
        D.19232 = (int) D.19231;
        D.19233 = __s2 + 2;
        D.19234 = *D.19233;
        D.19235 = (int) D.19234;
        __result = D.19232 - D.19235;
        D.19236 = __s2_len > 2;
        D.19216 = __result == 0;
        D.19237 = D.19236 & D.19216;
        if (D.19237 != 0) goto <D.19238>; else goto <D.19239>;
        <D.19238>:
        D.19240 = &MEM[(void *)"C" + 3B];
        D.19241 = *D.19240;
        D.19242 = (int) D.19241;
        D.19243 = __s2 + 3;
        D.19244 = *D.19243;
        D.19245 = (int) D.19244;
        __result = D.19242 - D.19245;
        <D.19239>:
        <D.19229>:
        <D.19219>:
      }
      D.18705 = __result;
    }
    iftmp.15 = -D.18705;
    goto <D.19246>;
    <D.19209>:
    iftmp.15 = __builtin_strcmp (locale, "C");
    <D.19246>:
    D.18706 = iftmp.15;
  }
  if (D.18706 == 0) goto <D.19247>; else goto <D.19248>;
  <D.19247>:
  D.19206 = 0B;
  return D.19206;
  <D.19248>:
  D.19206 = monoeg_strdup (locale);
  return D.19206;
}


monoeg_strdup (const gchar * str)
{
  gchar * D.19252;

  if (str != 0B) goto <D.19250>; else goto <D.19251>;
  <D.19250>:
  D.19252 = __strdup (str);
  return D.19252;
  <D.19251>:
  D.19252 = 0B;
  return D.19252;
}


ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_lcid (struct MonoCultureInfo * this, gint lcid)
{
  MonoBoolean D.19256;
  const struct CultureInfoEntry * ci;

  ci = culture_info_entry_from_lcid (lcid);
  if (ci == 0B) goto <D.19254>; else goto <D.19255>;
  <D.19254>:
  D.19256 = 0;
  return D.19256;
  <D.19255>:
  D.19256 = construct_culture (this, ci);
  return D.19256;
}


culture_info_entry_from_lcid (int lcid)
{
  const struct CultureInfoEntry * D.19258;
  const struct CultureInfoEntry * ci;

  ci = mono_binary_search (&lcid, &culture_entries, 283, 56, culture_lcid_locator);
  D.19258 = ci;
  return D.19258;
}


culture_lcid_locator (const void * a, const void * b)
{
  int D.19260;
  int D.19261;
  short int D.19262;
  int D.19263;
  const int * lcid;
  const struct CultureInfoEntry * bb;

  lcid = a;
  bb = b;
  D.19261 = *lcid;
  D.19262 = bb->lcid;
  D.19263 = (int) D.19262;
  D.19260 = D.19261 - D.19263;
  return D.19260;
}


construct_culture (struct MonoCultureInfo * this, const struct CultureInfoEntry * ci)
{
  short int D.19265;
  int D.19266;
  struct MonoString * * D.19267;
  short unsigned int D.19268;
  sizetype D.19269;
  const char * D.19270;
  struct MonoString * D.19271;
  struct MonoString * * D.19272;
  short unsigned int D.19273;
  sizetype D.19274;
  const char * D.19275;
  struct MonoString * D.19276;
  struct MonoString * * D.19277;
  short unsigned int D.19278;
  sizetype D.19279;
  const char * D.19280;
  struct MonoString * D.19281;
  struct MonoString * * D.19282;
  short unsigned int D.19283;
  sizetype D.19284;
  const char * D.19285;
  struct MonoString * D.19286;
  struct MonoString * * D.19287;
  short unsigned int D.19288;
  sizetype D.19289;
  const char * D.19290;
  struct MonoString * D.19291;
  struct MonoString * * D.19292;
  short unsigned int D.19293;
  sizetype D.19294;
  const char * D.19295;
  struct MonoString * D.19296;
  short unsigned int D.19297;
  struct MonoString * * D.19300;
  sizetype D.19301;
  const char * D.19302;
  struct MonoString * D.19303;
  struct MonoArray * * D.19304;
  const stridx_t[4] * D.19305;
  struct MonoArray * D.19306;
  short int D.19307;
  int D.19308;
  short int D.19309;
  int D.19310;
  short int D.19311;
  int D.19312;
  short int D.19313;
  int D.19314;
  const struct TextInfoEntry * D.19315;
  MonoBoolean D.19316;
  struct MonoDomain * domain;

  domain = mono_domain_get ();
  D.19265 = ci->lcid;
  D.19266 = (int) D.19265;
  this->lcid = D.19266;
  D.19267 = &this->name;
  D.19268 = ci->name;
  D.19269 = (sizetype) D.19268;
  D.19270 = &locale_strings + D.19269;
  D.19271 = mono_string_new (domain, D.19270);
  mono_gc_wbarrier_set_field (this, D.19267, D.19271);
  D.19272 = &this->englishname;
  D.19273 = ci->englishname;
  D.19274 = (sizetype) D.19273;
  D.19275 = &locale_strings + D.19274;
  D.19276 = mono_string_new (domain, D.19275);
  mono_gc_wbarrier_set_field (this, D.19272, D.19276);
  D.19277 = &this->nativename;
  D.19278 = ci->nativename;
  D.19279 = (sizetype) D.19278;
  D.19280 = &locale_strings + D.19279;
  D.19281 = mono_string_new (domain, D.19280);
  mono_gc_wbarrier_set_field (this, D.19277, D.19281);
  D.19282 = &this->win3lang;
  D.19283 = ci->win3lang;
  D.19284 = (sizetype) D.19283;
  D.19285 = &locale_strings + D.19284;
  D.19286 = mono_string_new (domain, D.19285);
  mono_gc_wbarrier_set_field (this, D.19282, D.19286);
  D.19287 = &this->iso3lang;
  D.19288 = ci->iso3lang;
  D.19289 = (sizetype) D.19288;
  D.19290 = &locale_strings + D.19289;
  D.19291 = mono_string_new (domain, D.19290);
  mono_gc_wbarrier_set_field (this, D.19287, D.19291);
  D.19292 = &this->iso2lang;
  D.19293 = ci->iso2lang;
  D.19294 = (sizetype) D.19293;
  D.19295 = &locale_strings + D.19294;
  D.19296 = mono_string_new (domain, D.19295);
  mono_gc_wbarrier_set_field (this, D.19292, D.19296);
  D.19297 = ci->territory;
  if (D.19297 != 0) goto <D.19298>; else goto <D.19299>;
  <D.19298>:
  D.19300 = &this->territory;
  D.19297 = ci->territory;
  D.19301 = (sizetype) D.19297;
  D.19302 = &locale_strings + D.19301;
  D.19303 = mono_string_new (domain, D.19302);
  mono_gc_wbarrier_set_field (this, D.19300, D.19303);
  <D.19299>:
  D.19304 = &this->native_calendar_names;
  D.19305 = &ci->native_calendar_names;
  D.19306 = create_names_array_idx (D.19305, 4);
  mono_gc_wbarrier_set_field (this, D.19304, D.19306);
  D.19307 = ci->parent_lcid;
  D.19308 = (int) D.19307;
  this->parent_lcid = D.19308;
  D.19309 = ci->datetime_format_index;
  D.19310 = (int) D.19309;
  this->datetime_index = D.19310;
  D.19311 = ci->number_format_index;
  D.19312 = (int) D.19311;
  this->number_index = D.19312;
  D.19313 = ci->calendar_type;
  D.19314 = (int) D.19313;
  this->calendar_type = D.19314;
  D.19315 = &ci->text_info;
  this->text_info_data = D.19315;
  D.19316 = 1;
  return D.19316;
}


ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_name (struct MonoCultureInfo * this, struct MonoString * name)
{
  MonoBoolean D.19320;
  short int D.19321;
  int D.19322;
  const struct CultureInfoEntry * D.19323;
  const struct CultureInfoNameEntry * ne;
  char * n;

  n = mono_string_to_utf8 (name);
  ne = mono_binary_search (n, &culture_name_entries, 283, 4, culture_name_locator);
  if (ne == 0B) goto <D.19318>; else goto <D.19319>;
  <D.19318>:
  monoeg_g_free (n);
  D.19320 = 0;
  return D.19320;
  <D.19319>:
  monoeg_g_free (n);
  D.19321 = ne->culture_entry_index;
  D.19322 = (int) D.19321;
  D.19323 = &culture_entries[D.19322];
  D.19320 = construct_culture (this, D.19323);
  return D.19320;
}


culture_name_locator (const void * a, const void * b)
{
  int ret.16;
  short unsigned int D.19325;
  sizetype D.19326;
  const char * D.19327;
  int D.19328;
  const char * aa;
  const struct CultureInfoNameEntry * bb;
  int ret;

  aa = a;
  bb = b;
  {
    size_t __s1_len;
    size_t __s2_len;

    D.19325 = bb->name;
    D.19326 = (sizetype) D.19325;
    D.19327 = &locale_strings + D.19326;
    ret.16 = __builtin_strcmp (aa, D.19327);
  }
  ret = ret.16;
  D.19328 = ret;
  return D.19328;
}


ves_icall_System_Globalization_RegionInfo_construct_internal_region_from_lcid (struct MonoRegionInfo * this, gint lcid)
{
  MonoBoolean D.19332;
  const struct RegionInfoEntry * ri;

  ri = region_info_entry_from_lcid (lcid);
  if (ri == 0B) goto <D.19330>; else goto <D.19331>;
  <D.19330>:
  D.19332 = 0;
  return D.19332;
  <D.19331>:
  D.19332 = construct_region (this, ri);
  return D.19332;
}


region_info_entry_from_lcid (int lcid)
{
  const struct RegionInfoEntry * D.19336;
  short int D.19337;
  int D.19338;
  const struct RegionInfoEntry * entry;
  const struct CultureInfoEntry * ne;

  ne = mono_binary_search (&lcid, &culture_entries, 283, 56, culture_lcid_locator);
  if (ne == 0B) goto <D.19334>; else goto <D.19335>;
  <D.19334>:
  D.19336 = 0B;
  return D.19336;
  <D.19335>:
  D.19337 = ne->region_entry_index;
  D.19338 = (int) D.19337;
  entry = &region_entries[D.19338];
  D.19336 = entry;
  return D.19336;
}


construct_region (struct MonoRegionInfo * this, const struct RegionInfoEntry * ri)
{
  short int D.19340;
  int D.19341;
  struct MonoString * * D.19342;
  short unsigned int D.19343;
  sizetype D.19344;
  const char * D.19345;
  struct MonoString * D.19346;
  struct MonoString * * D.19347;
  short unsigned int D.19348;
  sizetype D.19349;
  const char * D.19350;
  struct MonoString * D.19351;
  struct MonoString * * D.19352;
  short unsigned int D.19353;
  sizetype D.19354;
  const char * D.19355;
  struct MonoString * D.19356;
  struct MonoString * * D.19357;
  short unsigned int D.19358;
  sizetype D.19359;
  const char * D.19360;
  struct MonoString * D.19361;
  struct MonoString * * D.19362;
  short unsigned int D.19363;
  sizetype D.19364;
  const char * D.19365;
  struct MonoString * D.19366;
  struct MonoString * * D.19367;
  short unsigned int D.19368;
  sizetype D.19369;
  const char * D.19370;
  struct MonoString * D.19371;
  struct MonoString * * D.19372;
  short unsigned int D.19373;
  sizetype D.19374;
  const char * D.19375;
  struct MonoString * D.19376;
  struct MonoString * * D.19377;
  short unsigned int D.19378;
  sizetype D.19379;
  const char * D.19380;
  struct MonoString * D.19381;
  struct MonoString * * D.19382;
  short unsigned int D.19383;
  sizetype D.19384;
  const char * D.19385;
  struct MonoString * D.19386;
  MonoBoolean D.19387;
  struct MonoDomain * domain;

  domain = mono_domain_get ();
  D.19340 = ri->geo_id;
  D.19341 = (int) D.19340;
  this->geo_id = D.19341;
  D.19342 = &this->iso2name;
  D.19343 = ri->iso2name;
  D.19344 = (sizetype) D.19343;
  D.19345 = &locale_strings + D.19344;
  D.19346 = mono_string_new (domain, D.19345);
  mono_gc_wbarrier_set_field (this, D.19342, D.19346);
  D.19347 = &this->iso3name;
  D.19348 = ri->iso3name;
  D.19349 = (sizetype) D.19348;
  D.19350 = &locale_strings + D.19349;
  D.19351 = mono_string_new (domain, D.19350);
  mono_gc_wbarrier_set_field (this, D.19347, D.19351);
  D.19352 = &this->win3name;
  D.19353 = ri->win3name;
  D.19354 = (sizetype) D.19353;
  D.19355 = &locale_strings + D.19354;
  D.19356 = mono_string_new (domain, D.19355);
  mono_gc_wbarrier_set_field (this, D.19352, D.19356);
  D.19357 = &this->english_name;
  D.19358 = ri->english_name;
  D.19359 = (sizetype) D.19358;
  D.19360 = &locale_strings + D.19359;
  D.19361 = mono_string_new (domain, D.19360);
  mono_gc_wbarrier_set_field (this, D.19357, D.19361);
  D.19362 = &this->native_name;
  D.19363 = ri->native_name;
  D.19364 = (sizetype) D.19363;
  D.19365 = &locale_strings + D.19364;
  D.19366 = mono_string_new (domain, D.19365);
  mono_gc_wbarrier_set_field (this, D.19362, D.19366);
  D.19367 = &this->currency_symbol;
  D.19368 = ri->currency_symbol;
  D.19369 = (sizetype) D.19368;
  D.19370 = &locale_strings + D.19369;
  D.19371 = mono_string_new (domain, D.19370);
  mono_gc_wbarrier_set_field (this, D.19367, D.19371);
  D.19372 = &this->iso_currency_symbol;
  D.19373 = ri->iso_currency_symbol;
  D.19374 = (sizetype) D.19373;
  D.19375 = &locale_strings + D.19374;
  D.19376 = mono_string_new (domain, D.19375);
  mono_gc_wbarrier_set_field (this, D.19372, D.19376);
  D.19377 = &this->currency_english_name;
  D.19378 = ri->currency_english_name;
  D.19379 = (sizetype) D.19378;
  D.19380 = &locale_strings + D.19379;
  D.19381 = mono_string_new (domain, D.19380);
  mono_gc_wbarrier_set_field (this, D.19377, D.19381);
  D.19382 = &this->currency_native_name;
  D.19383 = ri->currency_native_name;
  D.19384 = (sizetype) D.19383;
  D.19385 = &locale_strings + D.19384;
  D.19386 = mono_string_new (domain, D.19385);
  mono_gc_wbarrier_set_field (this, D.19382, D.19386);
  D.19387 = 1;
  return D.19387;
}


ves_icall_System_Globalization_RegionInfo_construct_internal_region_from_name (struct MonoRegionInfo * this, struct MonoString * name)
{
  MonoBoolean D.19391;
  short int D.19392;
  int D.19393;
  const struct RegionInfoEntry * D.19394;
  const struct RegionInfoNameEntry * ne;
  char * n;

  n = mono_string_to_utf8 (name);
  ne = mono_binary_search (n, &region_name_entries, 120, 4, region_name_locator);
  if (ne == 0B) goto <D.19389>; else goto <D.19390>;
  <D.19389>:
  monoeg_g_free (n);
  D.19391 = 0;
  return D.19391;
  <D.19390>:
  monoeg_g_free (n);
  D.19392 = ne->region_entry_index;
  D.19393 = (int) D.19392;
  D.19394 = &region_entries[D.19393];
  D.19391 = construct_region (this, D.19394);
  return D.19391;
}


region_name_locator (const void * a, const void * b)
{
  int ret.17;
  short unsigned int D.19396;
  sizetype D.19397;
  const char * D.19398;
  int D.19399;
  const char * aa;
  const struct RegionInfoNameEntry * bb;
  int ret;

  aa = a;
  bb = b;
  {
    size_t __s1_len;
    size_t __s2_len;

    D.19396 = bb->name;
    D.19397 = (sizetype) D.19396;
    D.19398 = &locale_strings + D.19397;
    ret.17 = __builtin_strcmp (aa, D.19398);
  }
  ret = ret.17;
  D.19399 = ret;
  return D.19399;
}


ves_icall_System_Globalization_CultureInfo_internal_get_cultures (MonoBoolean neutral, MonoBoolean specific, MonoBoolean installed)
{
  short unsigned int D.19401;
  _Bool D.19402;
  _Bool D.19405;
  _Bool D.19406;
  _Bool D.19407;
  _Bool D.19409;
  _Bool D.19410;
  _Bool D.19411;
  struct MonoImage * D.19412;
  unsigned int len.18;
  struct MonoArray * D.19418;
  int len.19;
  unsigned int len.20;
  int len.21;
  unsigned int len.22;
  struct MonoArray * ret;
  struct MonoClass * class;
  struct MonoCultureInfo * culture;
  struct MonoDomain * domain;
  const struct CultureInfoEntry * ci;
  gint i;
  gint len;
  gboolean is_neutral;

  domain = mono_domain_get ();
  len = 0;
  i = 0;
  goto <D.18755>;
  <D.18754>:
  ci = &culture_entries[i];
  D.19401 = ci->territory;
  D.19402 = D.19401 == 0;
  is_neutral = (gboolean) D.19402;
  D.19405 = neutral != 0;
  D.19406 = is_neutral != 0;
  D.19407 = D.19405 & D.19406;
  if (D.19407 != 0) goto <D.19403>; else goto <D.19408>;
  <D.19408>:
  D.19409 = specific != 0;
  D.19410 = is_neutral == 0;
  D.19411 = D.19409 & D.19410;
  if (D.19411 != 0) goto <D.19403>; else goto <D.19404>;
  <D.19403>:
  len = len + 1;
  <D.19404>:
  i = i + 1;
  <D.18755>:
  if (i <= 282) goto <D.18754>; else goto <D.18756>;
  <D.18756>:
  D.19412 = mono_get_corlib ();
  class = mono_class_from_name (D.19412, "System.Globalization", "CultureInfo");
  if (neutral != 0) goto <D.19413>; else goto <D.19414>;
  <D.19413>:
  len = len + 1;
  <D.19414>:
  len.18 = (unsigned int) len;
  ret = mono_array_new (domain, class, len.18);
  if (len == 0) goto <D.19416>; else goto <D.19417>;
  <D.19416>:
  D.19418 = ret;
  return D.19418;
  <D.19417>:
  len = 0;
  if (neutral != 0) goto <D.19419>; else goto <D.19420>;
  <D.19419>:
  {
    void * * __p;

    len.19 = len;
    len = len.19 + 1;
    len.20 = (unsigned int) len.19;
    __p = mono_array_addr_with_size (ret, 4, len.20);
    mono_gc_wbarrier_set_arrayref (ret, __p, 0B);
  }
  <D.19420>:
  i = 0;
  goto <D.18760>;
  <D.18759>:
  ci = &culture_entries[i];
  D.19401 = ci->territory;
  D.19402 = D.19401 == 0;
  is_neutral = (gboolean) D.19402;
  D.19405 = neutral != 0;
  D.19406 = is_neutral != 0;
  D.19407 = D.19405 & D.19406;
  if (D.19407 != 0) goto <D.19423>; else goto <D.19425>;
  <D.19425>:
  D.19409 = specific != 0;
  D.19410 = is_neutral == 0;
  D.19411 = D.19409 & D.19410;
  if (D.19411 != 0) goto <D.19423>; else goto <D.19424>;
  <D.19423>:
  culture = mono_object_new (domain, class);
  mono_runtime_object_init (culture);
  construct_culture (culture, ci);
  culture->use_user_override = 1;
  {
    void * * __p;

    len.21 = len;
    len = len.21 + 1;
    len.22 = (unsigned int) len.21;
    __p = mono_array_addr_with_size (ret, 4, len.22);
    mono_gc_wbarrier_set_arrayref (ret, __p, culture);
  }
  <D.19424>:
  i = i + 1;
  <D.18760>:
  if (i <= 282) goto <D.18759>; else goto <D.18761>;
  <D.18761>:
  D.19418 = ret;
  return D.19418;
}


ves_icall_System_Globalization_CompareInfo_construct_compareinfo (struct MonoCompareInfo * comp, struct MonoString * locale)
{

}


ves_icall_System_Globalization_CompareInfo_internal_compare (struct MonoCompareInfo * this, struct MonoString * str1, gint32 off1, gint32 len1, struct MonoString * str2, gint32 off2, gint32 len2, gint32 options)
{
  int D.19429;

  D.19429 = string_invariant_compare (str1, off1, len1, str2, off2, len2, options);
  return D.19429;
}


string_invariant_compare (struct MonoString * str1, gint32 off1, gint32 len1, struct MonoString * str2, gint32 off2, gint32 len2, gint32 options)
{
  mono_unichar2 * D.19434;
  unsigned int off1.23;
  unsigned int D.19436;
  mono_unichar2 * D.19437;
  unsigned int off2.24;
  unsigned int D.19439;
  _Bool D.19440;
  _Bool D.19441;
  _Bool D.19442;
  unsigned int pos.25;
  unsigned int D.19445;
  gunichar2 * D.19446;
  short unsigned int D.19447;
  gunichar2 * D.19448;
  short unsigned int D.19449;
  gint32 D.19452;
  sizetype pos.26;
  sizetype D.19456;
  sizetype D.19457;
  gunichar2 * D.19458;
  short unsigned int D.19459;
  gunichar2 * D.19460;
  short unsigned int D.19461;
  gint32 length;
  gint32 charcmp;
  gunichar2 * ustr1;
  gunichar2 * ustr2;
  gint32 pos;

  if (len1 >= len2) goto <D.19431>; else goto <D.19432>;
  <D.19431>:
  length = len1;
  goto <D.19433>;
  <D.19432>:
  length = len2;
  <D.19433>:
  D.19434 = mono_string_chars (str1);
  off1.23 = (unsigned int) off1;
  D.19436 = off1.23 * 2;
  ustr1 = D.19434 + D.19436;
  D.19437 = mono_string_chars (str2);
  off2.24 = (unsigned int) off2;
  D.19439 = off2.24 * 2;
  ustr2 = D.19437 + D.19439;
  pos = 0;
  pos = 0;
  goto <D.18843>;
  <D.18842>:
  D.19440 = pos >= len1;
  D.19441 = pos >= len2;
  D.19442 = D.19440 | D.19441;
  if (D.19442 != 0) goto <D.18841>; else goto <D.19443>;
  <D.19443>:
  pos.25 = (unsigned int) pos;
  D.19445 = pos.25 * 2;
  D.19446 = ustr1 + D.19445;
  D.19447 = *D.19446;
  pos.25 = (unsigned int) pos;
  D.19445 = pos.25 * 2;
  D.19448 = ustr2 + D.19445;
  D.19449 = *D.19448;
  charcmp = string_invariant_compare_char (D.19447, D.19449, options);
  if (charcmp != 0) goto <D.19450>; else goto <D.19451>;
  <D.19450>:
  D.19452 = charcmp;
  return D.19452;
  <D.19451>:
  pos = pos + 1;
  <D.18843>:
  if (pos != length) goto <D.18842>; else goto <D.18841>;
  <D.18841>:
  if (pos == length) goto <D.19453>; else goto <D.19454>;
  <D.19453>:
  pos.26 = (sizetype) pos;
  D.19456 = pos.26 + 2147483647;
  D.19457 = D.19456 * 2;
  D.19458 = ustr1 + D.19457;
  D.19459 = *D.19458;
  pos.26 = (sizetype) pos;
  D.19456 = pos.26 + 2147483647;
  D.19457 = D.19456 * 2;
  D.19460 = ustr2 + D.19457;
  D.19461 = *D.19460;
  D.19452 = string_invariant_compare_char (D.19459, D.19461, options);
  return D.19452;
  <D.19454>:
  if (pos >= len1) goto <D.19462>; else goto <D.19463>;
  <D.19462>:
  if (pos >= len2) goto <D.19464>; else goto <D.19465>;
  <D.19464>:
  D.19452 = 0;
  return D.19452;
  <D.19465>:
  D.19452 = -1;
  return D.19452;
  <D.19463>:
  if (pos >= len2) goto <D.19466>; else goto <D.19467>;
  <D.19466>:
  D.19452 = 1;
  return D.19452;
  <D.19467>:
  pos.25 = (unsigned int) pos;
  D.19445 = pos.25 * 2;
  D.19446 = ustr1 + D.19445;
  D.19447 = *D.19446;
  pos.25 = (unsigned int) pos;
  D.19445 = pos.25 * 2;
  D.19448 = ustr2 + D.19445;
  D.19449 = *D.19448;
  D.19452 = string_invariant_compare_char (D.19447, D.19449, options);
  return D.19452;
}


string_invariant_compare_char (gunichar2 c1, gunichar2 c2, gint32 options)
{
  int D.19469;
  gint32 D.19472;
  int D.19473;
  int D.19474;
  int D.19475;
  unsigned int D.19478;
  unsigned int D.19479;
  gunichar iftmp.27;
  gunichar iftmp.28;
  unsigned int D.19488;
  gint32 iftmp.29;
  _Bool D.19493;
  gint32 result;

  D.19469 = options & 1073741824;
  if (D.19469 != 0) goto <D.19470>; else goto <D.19471>;
  <D.19470>:
  D.19473 = (int) c1;
  D.19474 = (int) c2;
  D.19472 = D.19473 - D.19474;
  return D.19472;
  <D.19471>:
  D.19475 = options & 1;
  if (D.19475 != 0) goto <D.19476>; else goto <D.19477>;
  <D.19476>:
  {
    GUnicodeType c1type;
    GUnicodeType c2type;

    D.19478 = (unsigned int) c1;
    c1type = monoeg_g_unichar_type (D.19478);
    D.19479 = (unsigned int) c2;
    c2type = monoeg_g_unichar_type (D.19479);
    if (c1type != 5) goto <D.19481>; else goto <D.19482>;
    <D.19481>:
    D.19478 = (unsigned int) c1;
    iftmp.27 = monoeg_g_unichar_tolower (D.19478);
    goto <D.19483>;
    <D.19482>:
    iftmp.27 = (gunichar) c1;
    <D.19483>:
    if (c2type != 5) goto <D.19485>; else goto <D.19486>;
    <D.19485>:
    D.19479 = (unsigned int) c2;
    iftmp.28 = monoeg_g_unichar_tolower (D.19479);
    goto <D.19487>;
    <D.19486>:
    iftmp.28 = (gunichar) c2;
    <D.19487>:
    D.19488 = iftmp.27 - iftmp.28;
    result = (gint32) D.19488;
  }
  goto <D.19489>;
  <D.19477>:
  D.19473 = (int) c1;
  D.19474 = (int) c2;
  result = D.19473 - D.19474;
  <D.19489>:
  if (result >= 0) goto <D.19491>; else goto <D.19492>;
  <D.19491>:
  D.19493 = result > 0;
  iftmp.29 = (gint32) D.19493;
  goto <D.19494>;
  <D.19492>:
  iftmp.29 = -1;
  <D.19494>:
  D.19472 = iftmp.29;
  return D.19472;
}


ves_icall_System_Globalization_CompareInfo_free_internal_collator (struct MonoCompareInfo * this)
{

}


ves_icall_System_Globalization_CompareInfo_assign_sortkey (struct MonoCompareInfo * this, struct MonoSortKey * key, struct MonoString * source, gint32 options)
{
  struct MonoDomain * D.19496;
  struct MonoClass * D.19497;
  unsigned int keylen.30;
  unsigned int i.31;
  mono_unichar2 * D.19500;
  unsigned int i.32;
  unsigned int D.19502;
  mono_unichar2 * D.19503;
  short unsigned int D.19504;
  unsigned char D.19505;
  struct MonoArray * * D.19506;
  struct MonoArray * arr;
  gint32 keylen;
  gint32 i;

  keylen = mono_string_length (source);
  D.19496 = mono_domain_get ();
  D.19497 = mono_get_byte_class ();
  keylen.30 = (unsigned int) keylen;
  arr = mono_array_new (D.19496, D.19497, keylen.30);
  i = 0;
  goto <D.18790>;
  <D.18789>:
  {
    guint8 * __p;

    i.31 = (unsigned int) i;
    __p = mono_array_addr_with_size (arr, 1, i.31);
    D.19500 = mono_string_chars (source);
    i.32 = (unsigned int) i;
    D.19502 = i.32 * 2;
    D.19503 = D.19500 + D.19502;
    D.19504 = *D.19503;
    D.19505 = (unsigned char) D.19504;
    *__p = D.19505;
  }
  i = i + 1;
  <D.18790>:
  if (i < keylen) goto <D.18789>; else goto <D.18791>;
  <D.18791>:
  D.19506 = &key->key;
  mono_gc_wbarrier_set_field (key, D.19506, arr);
}


ves_icall_System_Globalization_CompareInfo_internal_index (struct MonoCompareInfo * this, struct MonoString * source, gint32 sindex, gint32 count, struct MonoString * value, gint32 options, MonoBoolean first)
{
  int D.19507;

  D.19507 = string_invariant_indexof (source, sindex, count, value, first);
  return D.19507;
}


string_invariant_indexof (struct MonoString * source, gint32 sindex, gint32 count, struct MonoString * value, MonoBoolean first)
{
  gint32 D.19513;
  int D.19514;
  unsigned int D.19515;
  unsigned int D.19516;
  gunichar2 * D.19517;
  short unsigned int D.19518;
  unsigned int i.33;
  unsigned int D.19520;
  gunichar2 * D.19521;
  short unsigned int D.19522;
  int D.19523;
  int D.19524;
  unsigned int pos.34;
  unsigned int D.19526;
  const void * D.19527;
  unsigned int lencmpstr.35;
  unsigned int D.19529;
  int D.19530;
  int D.19533;
  gint32 lencmpstr;
  gunichar2 * src;
  gunichar2 * cmpstr;
  gint32 pos;
  gint32 i;

  lencmpstr = mono_string_length (value);
  src = mono_string_chars (source);
  cmpstr = mono_string_chars (value);
  if (first != 0) goto <D.19509>; else goto <D.19510>;
  <D.19509>:
  count = count - lencmpstr;
  pos = sindex;
  goto <D.18883>;
  <D.18882>:
  i = 0;
  goto <D.18880>;
  <D.18879>:
  i = i + 1;
  if (i == lencmpstr) goto <D.19511>; else goto <D.19512>;
  <D.19511>:
  D.19513 = pos;
  return D.19513;
  <D.19512>:
  <D.18880>:
  D.19514 = pos + i;
  D.19515 = (unsigned int) D.19514;
  D.19516 = D.19515 * 2;
  D.19517 = src + D.19516;
  D.19518 = *D.19517;
  i.33 = (unsigned int) i;
  D.19520 = i.33 * 2;
  D.19521 = cmpstr + D.19520;
  D.19522 = *D.19521;
  if (D.19518 == D.19522) goto <D.18879>; else goto <D.18881>;
  <D.18881>:
  pos = pos + 1;
  <D.18883>:
  D.19523 = sindex + count;
  if (D.19523 >= pos) goto <D.18882>; else goto <D.18884>;
  <D.18884>:
  D.19513 = -1;
  return D.19513;
  <D.19510>:
  D.19524 = sindex - lencmpstr;
  pos = D.19524 + 1;
  goto <D.18886>;
  <D.18885>:
  pos.34 = (unsigned int) pos;
  D.19526 = pos.34 * 2;
  D.19527 = src + D.19526;
  lencmpstr.35 = (unsigned int) lencmpstr;
  D.19529 = lencmpstr.35 * 2;
  D.19530 = memcmp (D.19527, cmpstr, D.19529);
  if (D.19530 == 0) goto <D.19531>; else goto <D.19532>;
  <D.19531>:
  D.19513 = pos;
  return D.19513;
  <D.19532>:
  pos = pos + -1;
  <D.18886>:
  D.19533 = sindex - count;
  if (D.19533 < pos) goto <D.18885>; else goto <D.18887>;
  <D.18887>:
  D.19513 = -1;
  return D.19513;
}


ves_icall_System_Globalization_CompareInfo_internal_index_char (struct MonoCompareInfo * this, struct MonoString * source, gint32 sindex, gint32 count, gunichar2 value, gint32 options, MonoBoolean first)
{
  int D.19535;

  D.19535 = string_invariant_indexof_char (source, sindex, count, value, first);
  return D.19535;
}


string_invariant_indexof_char (struct MonoString * source, gint32 sindex, gint32 count, gunichar2 value, MonoBoolean first)
{
  unsigned int pos.36;
  unsigned int D.19540;
  gunichar2 * D.19541;
  short unsigned int D.19542;
  gint32 D.19545;
  int D.19546;
  int D.19549;
  gint32 pos;
  gunichar2 * src;

  src = mono_string_chars (source);
  if (first != 0) goto <D.19537>; else goto <D.19538>;
  <D.19537>:
  pos = sindex;
  goto <D.18898>;
  <D.18897>:
  pos.36 = (unsigned int) pos;
  D.19540 = pos.36 * 2;
  D.19541 = src + D.19540;
  D.19542 = *D.19541;
  if (D.19542 == value) goto <D.19543>; else goto <D.19544>;
  <D.19543>:
  D.19545 = pos;
  return D.19545;
  <D.19544>:
  pos = pos + 1;
  <D.18898>:
  D.19546 = count + sindex;
  if (D.19546 != pos) goto <D.18897>; else goto <D.18899>;
  <D.18899>:
  D.19545 = -1;
  return D.19545;
  <D.19538>:
  pos = sindex;
  goto <D.18901>;
  <D.18900>:
  pos.36 = (unsigned int) pos;
  D.19540 = pos.36 * 2;
  D.19541 = src + D.19540;
  D.19542 = *D.19541;
  if (D.19542 == value) goto <D.19547>; else goto <D.19548>;
  <D.19547>:
  D.19545 = pos;
  return D.19545;
  <D.19548>:
  pos = pos + -1;
  <D.18901>:
  D.19549 = sindex - count;
  if (D.19549 < pos) goto <D.18900>; else goto <D.18902>;
  <D.18902>:
  D.19545 = -1;
  return D.19545;
}


ves_icall_System_Threading_Thread_current_lcid ()
{
  int D.19551;

  D.19551 = 127;
  return D.19551;
}


ves_icall_System_String_InternalReplace_Str_Comp (struct MonoString * this, struct MonoString * old, struct MonoString * new, struct MonoCompareInfo * comp)
{
  struct MonoString * D.19553;

  D.19553 = string_invariant_replace (this, old, new);
  return D.19553;
}


string_invariant_replace (struct MonoString * me, struct MonoString * oldValue, struct MonoString * newValue)
{
  unsigned int i.37;
  unsigned int D.19561;
  const void * D.19562;
  unsigned int oldstrlen.38;
  unsigned int D.19564;
  int D.19565;
  int D.19569;
  struct MonoString * D.19572;
  int D.19573;
  int D.19574;
  int D.19576;
  struct MonoDomain * D.19581;
  unsigned int destpos.39;
  unsigned int D.19585;
  gunichar2 * D.19586;
  unsigned int newstrlen.40;
  unsigned int D.19588;
  gunichar2 * D.19591;
  short unsigned int D.19592;
  struct MonoString * ret;
  gunichar2 * src;
  gunichar2 * dest;
  gunichar2 * oldstr;
  gunichar2 * newstr;
  gint32 i;
  gint32 destpos;
  gint32 occurr;
  gint32 newsize;
  gint32 oldstrlen;
  gint32 newstrlen;
  gint32 srclen;

  dest = 0B;
  newstr = 0B;
  occurr = 0;
  destpos = 0;
  oldstr = mono_string_chars (oldValue);
  oldstrlen = mono_string_length (oldValue);
  if (newValue != 0B) goto <D.19555>; else goto <D.19556>;
  <D.19555>:
  newstr = mono_string_chars (newValue);
  newstrlen = mono_string_length (newValue);
  goto <D.19557>;
  <D.19556>:
  newstrlen = 0;
  <D.19557>:
  src = mono_string_chars (me);
  srclen = mono_string_length (me);
  if (oldstrlen != newstrlen) goto <D.19558>; else goto <D.19559>;
  <D.19558>:
  i = 0;
  goto <D.18862>;
  <D.18861>:
  i.37 = (unsigned int) i;
  D.19561 = i.37 * 2;
  D.19562 = src + D.19561;
  oldstrlen.38 = (unsigned int) oldstrlen;
  D.19564 = oldstrlen.38 * 2;
  D.19565 = memcmp (D.19562, oldstr, D.19564);
  if (D.19565 == 0) goto <D.19566>; else goto <D.19567>;
  <D.19566>:
  occurr = occurr + 1;
  i = i + oldstrlen;
  goto <D.19568>;
  <D.19567>:
  i = i + 1;
  <D.19568>:
  <D.18862>:
  D.19569 = srclen - oldstrlen;
  if (D.19569 >= i) goto <D.18861>; else goto <D.18863>;
  <D.18863>:
  if (occurr == 0) goto <D.19570>; else goto <D.19571>;
  <D.19570>:
  D.19572 = me;
  return D.19572;
  <D.19571>:
  D.19573 = newstrlen - oldstrlen;
  D.19574 = D.19573 * occurr;
  newsize = D.19574 + srclen;
  goto <D.19575>;
  <D.19559>:
  newsize = srclen;
  <D.19575>:
  ret = 0B;
  i = 0;
  goto <D.18864>;
  <D.18865>:
  i.37 = (unsigned int) i;
  D.19561 = i.37 * 2;
  D.19562 = src + D.19561;
  oldstrlen.38 = (unsigned int) oldstrlen;
  D.19564 = oldstrlen.38 * 2;
  D.19576 = memcmp (D.19562, oldstr, D.19564);
  if (D.19576 == 0) goto <D.19577>; else goto <D.19578>;
  <D.19577>:
  if (ret == 0B) goto <D.19579>; else goto <D.19580>;
  <D.19579>:
  D.19581 = mono_domain_get ();
  ret = mono_string_new_size (D.19581, newsize);
  dest = mono_string_chars (ret);
  i.37 = (unsigned int) i;
  D.19561 = i.37 * 2;
  memcpy (dest, src, D.19561);
  <D.19580>:
  if (newstrlen > 0) goto <D.19582>; else goto <D.19583>;
  <D.19582>:
  destpos.39 = (unsigned int) destpos;
  D.19585 = destpos.39 * 2;
  D.19586 = dest + D.19585;
  newstrlen.40 = (unsigned int) newstrlen;
  D.19588 = newstrlen.40 * 2;
  memcpy (D.19586, newstr, D.19588);
  destpos = destpos + newstrlen;
  <D.19583>:
  i = i + oldstrlen;
  // predicted unlikely by continue predictor.
  goto <D.18864>;
  <D.19578>:
  if (ret != 0B) goto <D.19589>; else goto <D.19590>;
  <D.19589>:
  destpos.39 = (unsigned int) destpos;
  D.19585 = destpos.39 * 2;
  D.19586 = dest + D.19585;
  i.37 = (unsigned int) i;
  D.19561 = i.37 * 2;
  D.19591 = src + D.19561;
  D.19592 = *D.19591;
  *D.19586 = D.19592;
  <D.19590>:
  destpos = destpos + 1;
  i = i + 1;
  <D.18864>:
  if (i < srclen) goto <D.18865>; else goto <D.18866>;
  <D.18866>:
  if (ret == 0B) goto <D.19593>; else goto <D.19594>;
  <D.19593>:
  D.19572 = me;
  return D.19572;
  <D.19594>:
  D.19572 = ret;
  return D.19572;
}


memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.19596;
  unsigned int D.19597;

  D.19597 = __builtin_object_size (__dest, 0);
  D.19596 = __builtin___memcpy_chk (__dest, __src, __len, D.19597);
  return D.19596;
}


load_normalization_resource (guint8 * * argProps, guint8 * * argMappedChars, guint8 * * argCharMapIndex, guint8 * * argHelperIndex, guint8 * * argMapIdxToComposite, guint8 * * argCombiningClass)
{
  *argProps = &props;
  *argMappedChars = &mappedChars;
  *argCharMapIndex = &charMapIndex;
  *argHelperIndex = &helperIndex;
  *argMapIdxToComposite = &mapIdxToComposite;
  *argCombiningClass = &combiningClass;
}


