#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ aEntry;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int sqlite3Fts5UnicodeIsalnum(int c) {
  static const unsigned int aEntry[] = {
      0x00000030, 0x0000E807, 0x00016C06, 0x0001EC2F, 0x0002AC07, 0x0002D001,
      0x0002D803, 0x0002EC01, 0x0002FC01, 0x00035C01, 0x0003DC01, 0x000B0804,
      0x000B480E, 0x000B9407, 0x000BB401, 0x000BBC81, 0x000DD401, 0x000DF801,
      0x000E1002, 0x000E1C01, 0x000FD801, 0x00120808, 0x00156806, 0x00162402,
      0x00163C01, 0x00164437, 0x0017CC02, 0x00180005, 0x00181816, 0x00187802,
      0x00192C15, 0x0019A804, 0x0019C001, 0x001B5001, 0x001B580F, 0x001B9C07,
      0x001BF402, 0x001C000E, 0x001C3C01, 0x001C4401, 0x001CC01B, 0x001E980B,
      0x001FAC09, 0x001FD804, 0x00205804, 0x00206C09, 0x00209403, 0x0020A405,
      0x0020C00F, 0x00216403, 0x00217801, 0x0023901B, 0x00240004, 0x0024E803,
      0x0024F812, 0x00254407, 0x00258804, 0x0025C001, 0x00260403, 0x0026F001,
      0x0026F807, 0x00271C02, 0x00272C03, 0x00275C01, 0x00278802, 0x0027C802,
      0x0027E802, 0x00280403, 0x0028F001, 0x0028F805, 0x00291C02, 0x00292C03,
      0x00294401, 0x0029C002, 0x0029D401, 0x002A0403, 0x002AF001, 0x002AF808,
      0x002B1C03, 0x002B2C03, 0x002B8802, 0x002BC002, 0x002C0403, 0x002CF001,
      0x002CF807, 0x002D1C02, 0x002D2C03, 0x002D5802, 0x002D8802, 0x002DC001,
      0x002E0801, 0x002EF805, 0x002F1803, 0x002F2804, 0x002F5C01, 0x002FCC08,
      0x00300403, 0x0030F807, 0x00311803, 0x00312804, 0x00315402, 0x00318802,
      0x0031FC01, 0x00320802, 0x0032F001, 0x0032F807, 0x00331803, 0x00332804,
      0x00335402, 0x00338802, 0x00340802, 0x0034F807, 0x00351803, 0x00352804,
      0x00355C01, 0x00358802, 0x0035E401, 0x00360802, 0x00372801, 0x00373C06,
      0x00375801, 0x00376008, 0x0037C803, 0x0038C401, 0x0038D007, 0x0038FC01,
      0x00391C09, 0x00396802, 0x003AC401, 0x003AD006, 0x003AEC02, 0x003B2006,
      0x003C041F, 0x003CD00C, 0x003DC417, 0x003E340B, 0x003E6424, 0x003EF80F,
      0x003F380D, 0x0040AC14, 0x00412806, 0x00415804, 0x00417803, 0x00418803,
      0x00419C07, 0x0041C404, 0x0042080C, 0x00423C01, 0x00426806, 0x0043EC01,
      0x004D740C, 0x004E400A, 0x00500001, 0x0059B402, 0x005A0001, 0x005A6C02,
      0x005BAC03, 0x005C4803, 0x005CC805, 0x005D4802, 0x005DC802, 0x005ED023,
      0x005F6004, 0x005F7401, 0x0060000F, 0x0062A401, 0x0064800C, 0x0064C00C,
      0x00650001, 0x00651002, 0x0066C011, 0x00672002, 0x00677822, 0x00685C05,
      0x00687802, 0x0069540A, 0x0069801D, 0x0069FC01, 0x006A8007, 0x006AA006,
      0x006C0005, 0x006CD011, 0x006D6823, 0x006E0003, 0x006E840D, 0x006F980E,
      0x006FF004, 0x00709014, 0x0070EC05, 0x0071F802, 0x00730008, 0x00734019,
      0x0073B401, 0x0073C803, 0x00770027, 0x0077F004, 0x007EF401, 0x007EFC03,
      0x007F3403, 0x007F7403, 0x007FB403, 0x007FF402, 0x00800065, 0x0081A806,
      0x0081E805, 0x00822805, 0x0082801A, 0x00834021, 0x00840002, 0x00840C04,
      0x00842002, 0x00845001, 0x00845803, 0x00847806, 0x00849401, 0x00849C01,
      0x0084A401, 0x0084B801, 0x0084E802, 0x00850005, 0x00852804, 0x00853C01,
      0x00864264, 0x00900027, 0x0091000B, 0x0092704E, 0x00940200, 0x009C0475,
      0x009E53B9, 0x00AD400A, 0x00B39406, 0x00B3BC03, 0x00B3E404, 0x00B3F802,
      0x00B5C001, 0x00B5FC01, 0x00B7804F, 0x00B8C00C, 0x00BA001A, 0x00BA6C59,
      0x00BC00D6, 0x00BFC00C, 0x00C00005, 0x00C02019, 0x00C0A807, 0x00C0D802,
      0x00C0F403, 0x00C26404, 0x00C28001, 0x00C3EC01, 0x00C64002, 0x00C6580A,
      0x00C70024, 0x00C8001F, 0x00C8A81E, 0x00C94001, 0x00C98020, 0x00CA2827,
      0x00CB003F, 0x00CC0100, 0x01370040, 0x02924037, 0x0293F802, 0x02983403,
      0x0299BC10, 0x029A7C01, 0x029BC008, 0x029C0017, 0x029C8002, 0x029E2402,
      0x02A00801, 0x02A01801, 0x02A02C01, 0x02A08C09, 0x02A0D804, 0x02A1D004,
      0x02A20002, 0x02A2D011, 0x02A33802, 0x02A38012, 0x02A3E003, 0x02A4980A,
      0x02A51C0D, 0x02A57C01, 0x02A60004, 0x02A6CC1B, 0x02A77802, 0x02A8A40E,
      0x02A90C01, 0x02A93002, 0x02A97004, 0x02A9DC03, 0x02A9EC01, 0x02AAC001,
      0x02AAC803, 0x02AADC02, 0x02AAF802, 0x02AB0401, 0x02AB7802, 0x02ABAC07,
      0x02ABD402, 0x02AF8C0B, 0x03600001, 0x036DFC02, 0x036FFC02, 0x037FFC01,
      0x03EC7801, 0x03ECA401, 0x03EEC810, 0x03F4F802, 0x03F7F002, 0x03F8001A,
      0x03F88007, 0x03F8C023, 0x03F95013, 0x03F9A004, 0x03FBFC01, 0x03FC040F,
      0x03FC6807, 0x03FCEC06, 0x03FD6C0B, 0x03FF8007, 0x03FFA007, 0x03FFE405,
      0x04040003, 0x0404DC09, 0x0405E411, 0x0406400C, 0x0407402E, 0x040E7C01,
      0x040F4001, 0x04215C01, 0x04247C01, 0x0424FC01, 0x04280403, 0x04281402,
      0x04283004, 0x0428E003, 0x0428FC01, 0x04294009, 0x0429FC01, 0x042CE407,
      0x04400003, 0x0440E016, 0x04420003, 0x0442C012, 0x04440003, 0x04449C0E,
      0x04450004, 0x04460003, 0x0446CC0E, 0x04471404, 0x045AAC0D, 0x0491C004,
      0x05BD442E, 0x05BE3C04, 0x074000F6, 0x07440027, 0x0744A4B5, 0x07480046,
      0x074C0057, 0x075B0401, 0x075B6C01, 0x075BEC01, 0x075C5401, 0x075CD401,
      0x075D3C01, 0x075DBC01, 0x075E2401, 0x075EA401, 0x075F0C01, 0x07BBC002,
      0x07C0002C, 0x07C0C064, 0x07C2800F, 0x07C2C40E, 0x07C3040F, 0x07C3440F,
      0x07C4401F, 0x07C4C03C, 0x07C5C02B, 0x07C7981D, 0x07C8402B, 0x07C90009,
      0x07C94002, 0x07CC0021, 0x07CCC006, 0x07CCDC46, 0x07CE0014, 0x07CE8025,
      0x07CF1805, 0x07CF8011, 0x07D0003F, 0x07D10001, 0x07D108B6, 0x07D3E404,
      0x07D4003E, 0x07D50004, 0x07D54018, 0x07D7EC46, 0x07D9140B, 0x07DA0046,
      0x07DC0074, 0x38000401, 0x38008060, 0x380400F0,
  };
  static const unsigned int aAscii[4] = {
      0xFFFFFFFF,
      0xFC00FFFF,
      0xF8000001,
      0xF8000001,
  };
  if ((unsigned int)c < 128) {
    return ((aAscii[c >> 5] & (1 << (c & 0x001F))) == 0);
  } else if ((unsigned int)c < (1 << 22)) {
    unsigned int key = (((unsigned int)c) << 10) | 0x000003FF;
    int iRes = 0;
    int iHi = sizeof(aEntry) / sizeof(aEntry[0]) - 1;
    int iLo = 0;
    while (iHi >= iLo) {
      int iTest = (iHi + iLo) / 2;
      if (key >= aEntry[iTest]) {
        iRes = iTest;
        iLo = iTest + 1;
      } else {
        iHi = iTest - 1;
      }
    }
    assert(aEntry[0] < key);
    assert(key >= aEntry[iRes]);
    return (((unsigned int)c) >=
            ((aEntry[iRes] >> 10) + (aEntry[iRes] & 0x3FF)));
  }
  return 1;
}


x86 assembly (clang, -O0):
<sqlite3Fts5UnicodeIsalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jae    115f <sqlite3Fts5UnicodeIsalnum+0x4f>
mov    -0x8(%rbp),%eax
sar    $0x5,%eax
movslq %eax,%rcx
lea    0x1528(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    -0x8(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1261 <sqlite3Fts5UnicodeIsalnum+0x151>
cmpl   $0x400000,-0x8(%rbp)
jae    1255 <sqlite3Fts5UnicodeIsalnum+0x145>
mov    -0x8(%rbp),%eax
shl    $0xa,%eax
or     $0x3ff,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x195,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jl     11e5 <sqlite3Fts5UnicodeIsalnum+0xd5>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
movslq -0x1c(%rbp),%rdx
lea    0xe46(%rip),%rcx
cmp    (%rcx,%rdx,4),%eax
jb     11d7 <sqlite3Fts5UnicodeIsalnum+0xc7>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11e0 <sqlite3Fts5UnicodeIsalnum+0xd0>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118f <sqlite3Fts5UnicodeIsalnum+0x7f>
mov    0xe15(%rip),%eax
cmp    -0xc(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0xc(%rbp),%eax
movslq -0x10(%rbp),%rdx
lea    0xdf7(%rip),%rcx
cmp    (%rcx,%rdx,4),%eax
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
movslq -0x10(%rbp),%rdx
lea    0xdd9(%rip),%rcx
mov    (%rcx,%rdx,4),%ecx
shr    $0xa,%ecx
movslq -0x10(%rbp),%rsi
lea    0xdc8(%rip),%rdx
mov    (%rdx,%rsi,4),%edx
and    $0x3ff,%edx
add    %edx,%ecx
cmp    %ecx,%eax
setae  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1261 <sqlite3Fts5UnicodeIsalnum+0x151>
jmp    125a <sqlite3Fts5UnicodeIsalnum+0x14a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlite3Fts5UnicodeIsalnum>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
cmp    $0x7f,%edi
ja     113b <sqlite3Fts5UnicodeIsalnum+0x2b>
mov    %r14d,%eax
shr    $0x5,%eax
lea    0x1534(%rip),%rcx
mov    (%rcx,%rax,4),%eax
bt     %r14d,%eax
setae  %al
jmp    11c8 <sqlite3Fts5UnicodeIsalnum+0xb8>
mov    $0x1,%al
cmp    $0x3fffff,%r14d
ja     11c8 <sqlite3Fts5UnicodeIsalnum+0xb8>
mov    %r14d,%ebp
shl    $0xa,%ebp
or     $0x3ff,%ebp
mov    $0x195,%ecx
xor    %eax,%eax
lea    0xe9c(%rip),%r15
xor    %ebx,%ebx
jmp    1179 <sqlite3Fts5UnicodeIsalnum+0x69>
nopl   0x0(%rax,%rax,1)
lea    0x1(%rdx),%eax
mov    %edx,%ebx
cmp    %eax,%ecx
jl     1197 <sqlite3Fts5UnicodeIsalnum+0x87>
lea    (%rax,%rcx,1),%esi
mov    %esi,%edx
shr    $0x1f,%edx
add    %esi,%edx
sar    %edx
movslq %edx,%rsi
cmp    (%r15,%rsi,4),%ebp
jae    1170 <sqlite3Fts5UnicodeIsalnum+0x60>
add    $0xffffffff,%edx
mov    %edx,%ecx
cmp    %eax,%ecx
jge    1179 <sqlite3Fts5UnicodeIsalnum+0x69>
mov    $0x1,%edi
call   1030 <assert@plt>
movslq %ebx,%rax
mov    (%r15,%rax,4),%ebx
xor    %edi,%edi
cmp    %ebx,%ebp
setae  %dil
call   1030 <assert@plt>
mov    %ebx,%eax
shr    $0xa,%eax
and    $0x3ff,%ebx
add    %eax,%ebx
cmp    %r14d,%ebx
setbe  %al
movzbl %al,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@sqlite3Fts5UnicodeIsalnum.aEntry = internal constant [406 x i32] [i32 48, i32 59399, i32 93190, i32 125999, i32 175111, i32 184321, i32 186371, i32 191489, i32 195585, i32 220161, i32 252929, i32 722948, i32 739342, i32 758791, i32 766977, i32 769153, i32 906241, i32 915457, i32 921602, i32 924673, i32 1038337, i32 1181704, i32 1402886, i32 1451010, i32 1457153, i32 1459255, i32 1559554, i32 1572869, i32 1579030, i32 1603586, i32 1649685, i32 1681412, i32 1687553, i32 1789953, i32 1792015, i32 1809415, i32 1831938, i32 1835022, i32 1850369, i32 1852417, i32 1884187, i32 2005003, i32 2075657, i32 2086916, i32 2119684, i32 2124809, i32 2135043, i32 2139141, i32 2146319, i32 2188291, i32 2193409, i32 2330651, i32 2359300, i32 2418691, i32 2422802, i32 2442247, i32 2459652, i32 2473985, i32 2491395, i32 2551809, i32 2553863, i32 2563074, i32 2567171, i32 2579457, i32 2590722, i32 2607106, i32 2615298, i32 2622467, i32 2682881, i32 2684933, i32 2694146, i32 2698243, i32 2704385, i32 2736130, i32 2741249, i32 2753539, i32 2813953, i32 2816008, i32 2825219, i32 2829315, i32 2852866, i32 2867202, i32 2884611, i32 2945025, i32 2947079, i32 2956290, i32 2960387, i32 2971650, i32 2983938, i32 2998273, i32 3016705, i32 3078149, i32 3086339, i32 3090436, i32 3103745, i32 3132424, i32 3146755, i32 3209223, i32 3217411, i32 3221508, i32 3232770, i32 3246082, i32 3275777, i32 3278850, i32 3338241, i32 3340295, i32 3348483, i32 3352580, i32 3363842, i32 3377154, i32 3409922, i32 3471367, i32 3479555, i32 3483652, i32 3496961, i32 3508226, i32 3531777, i32 3540994, i32 3614721, i32 3619846, i32 3627009, i32 3629064, i32 3655683, i32 3720193, i32 3723271, i32 3734529, i32 3742729, i32 3762178, i32 3851265, i32 3854342, i32 3861506, i32 3874822, i32 3933215, i32 3985420, i32 4047895, i32 4076555, i32 4088868, i32 4126735, i32 4143117, i32 4238356, i32 4270086, i32 4282372, i32 4290563, i32 4294659, i32 4299783, i32 4310020, i32 4327436, i32 4340737, i32 4352006, i32 4451329, i32 5075980, i32 5128202, i32 5242881, i32 5878786, i32 5898241, i32 5925890, i32 6007811, i32 6047747, i32 6080517, i32 6113282, i32 6146050, i32 6213667, i32 6250500, i32 6255617, i32 6291471, i32 6464513, i32 6586380, i32 6602764, i32 6619137, i32 6623234, i32 6733841, i32 6758402, i32 6780962, i32 6839301, i32 6846466, i32 6902794, i32 6914077, i32 6945793, i32 6979591, i32 6987782, i32 7077893, i32 7131153, i32 7170083, i32 7208963, i32 7242765, i32 7313422, i32 7335940, i32 7376916, i32 7400453, i32 7469058, i32 7536648, i32 7553049, i32 7582721, i32 7587843, i32 7798823, i32 7860228, i32 8320001, i32 8322051, i32 8336387, i32 8352771, i32 8369155, i32 8385538, i32 8388709, i32 8497158, i32 8513541, i32 8529925, i32 8552474, i32 8601633, i32 8650754, i32 8653828, i32 8658946, i32 8671233, i32 8673283, i32 8681478, i32 8688641, i32 8690689, i32 8692737, i32 8697857, i32 8710146, i32 8716293, i32 8726532, i32 8731649, i32 8798820, i32 9437223, i32 9502731, i32 9597006, i32 9699840, i32 10224757, i32 10376121, i32 11354122, i32 11768838, i32 11779075, i32 11789316, i32 11794434, i32 11911169, i32 11926529, i32 12025935, i32 12107788, i32 12189722, i32 12217433, i32 12320982, i32 12566540, i32 12582917, i32 12591129, i32 12625927, i32 12638210, i32 12645379, i32 12739588, i32 12746753, i32 12839937, i32 12992514, i32 12998666, i32 13041700, i32 13107231, i32 13150238, i32 13189121, i32 13205536, i32 13248551, i32 13303871, i32 13369600, i32 20381760, i32 43139127, i32 43251714, i32 43529219, i32 43629584, i32 43678721, i32 43761672, i32 43778071, i32 43810818, i32 43918338, i32 44042241, i32 44046337, i32 44051457, i32 44076041, i32 44095492, i32 44158980, i32 44171266, i32 44224529, i32 44251138, i32 44269586, i32 44294147, i32 44341258, i32 44375053, i32 44399617, i32 44433412, i32 44485659, i32 44529666, i32 44606478, i32 44633089, i32 44642306, i32 44658692, i32 44686339, i32 44690433, i32 44744705, i32 44746755, i32 44751874, i32 44759042, i32 44762113, i32 44791810, i32 44805127, i32 44815362, i32 45059083, i32 56623105, i32 57539586, i32 57670658, i32 58719233, i32 65828865, i32 65840129, i32 65980432, i32 66385922, i32 66580482, i32 66584602, i32 66617351, i32 66633763, i32 66670611, i32 66691076, i32 66845697, i32 66847759, i32 66873351, i32 66907142, i32 66939915, i32 67076103, i32 67084295, i32 67101701, i32 67371011, i32 67427337, i32 67494929, i32 67518476, i32 67584046, i32 68058113, i32 68108289, i32 69295105, i32 69499905, i32 69532673, i32 69731331, i32 69735426, i32 69742596, i32 69787651, i32 69794817, i32 69812233, i32 69860353, i32 70050823, i32 71303171, i32 71360534, i32 71434243, i32 71483410, i32 71565315, i32 71605262, i32 71630852, i32 71696387, i32 71748622, i32 71767044, i32 73051149, i32 76660740, i32 96289838, i32 96353284, i32 121635062, i32 121896999, i32 121939125, i32 122159174, i32 122421335, i32 123405313, i32 123431937, i32 123464705, i32 123491329, i32 123524097, i32 123550721, i32 123583489, i32 123610113, i32 123642881, i32 123669505, i32 129744898, i32 130023468, i32 130072676, i32 130187279, i32 130204686, i32 130221071, i32 130237455, i32 130301983, i32 130334780, i32 130400299, i32 130521117, i32 130564139, i32 130613257, i32 130629634, i32 130809889, i32 130859014, i32 130866246, i32 130940948, i32 130973733, i32 131012613, i32 131039249, i32 131072063, i32 131137537, i32 131139766, i32 131326980, i32 131334206, i32 131399684, i32 131416088, i32 131591238, i32 131666955, i32 131727430, i32 131858548, i32 939525121, i32 939556960, i32 939786480]
@sqlite3Fts5UnicodeIsalnum.aAscii = internal constant [4 x i32] [i32 -1, i32 -67043329, i32 -134217727, i32 -134217727]
define i32 @sqlite3Fts5UnicodeIsalnum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
%9 = load i32, i32* %3
%10 = icmp ult i32 %9, 128
br i1 %10, label %11, label %23
11: ; preds = %1
%12 = load i32, i32* %3
%13 = ashr i32 %12, 5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [4 x i32], [4 x i32]* @sqlite3Fts5UnicodeIsalnum.aAscii, i64 0, i64 %14
%16 = load i32, i32* %15
%17 = load i32, i32* %3
%18 = and i32 %17, 31
%19 = shl i32 1, %18
%20 = and i32 %16, %19
%21 = icmp eq i32 %20, 0
%22 = zext i1 %21 to i32
store i32 %22, i32* %2
br label %83
23: ; preds = %1
%24 = load i32, i32* %3
%25 = icmp ult i32 %24, 4194304
br i1 %25, label %26, label %81
26: ; preds = %23
%27 = load i32, i32* %3
%28 = shl i32 %27, 10
%29 = or i32 %28, 1023
store i32 %29, i32* %4
store i32 0, i32* %5
store i32 405, i32* %6
store i32 0, i32* %7
br label %30
30: ; preds = %52, %26
%31 = load i32, i32* %6
%32 = load i32, i32* %7
%33 = icmp sge i32 %31, %32
br i1 %33, label %34, label %53
34: ; preds = %30
%35 = load i32, i32* %6
%36 = load i32, i32* %7
%37 = add nsw i32 %35, %36
%38 = sdiv i32 %37, 2
store i32 %38, i32* %8
%39 = load i32, i32* %4
%40 = load i32, i32* %8
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [406 x i32], [406 x i32]* @sqlite3Fts5UnicodeIsalnum.aEntry, i64 0, i64 %41
%43 = load i32, i32* %42
%44 = icmp uge i32 %39, %43
br i1 %44, label %45, label %49
45: ; preds = %34
%46 = load i32, i32* %8
store i32 %46, i32* %5
%47 = load i32, i32* %8
%48 = add nsw i32 %47, 1
store i32 %48, i32* %7
br label %52
49: ; preds = %34
%50 = load i32, i32* %8
%51 = sub nsw i32 %50, 1
store i32 %51, i32* %6
br label %52
52: ; preds = %49, %45
br label %30
53: ; preds = %30
%54 = load i32, i32* getelementptr inbounds ([406 x i32], [406 x i32]* @sqlite3Fts5UnicodeIsalnum.aEntry, i64 0, i64 0)
%55 = load i32, i32* %4
%56 = icmp ult i32 %54, %55
%57 = zext i1 %56 to i32
%58 = call i32 @assert(i32 %57)
%59 = load i32, i32* %4
%60 = load i32, i32* %5
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [406 x i32], [406 x i32]* @sqlite3Fts5UnicodeIsalnum.aEntry, i64 0, i64 %61
%63 = load i32, i32* %62
%64 = icmp uge i32 %59, %63
%65 = zext i1 %64 to i32
%66 = call i32 @assert(i32 %65)
%67 = load i32, i32* %3
%68 = load i32, i32* %5
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [406 x i32], [406 x i32]* @sqlite3Fts5UnicodeIsalnum.aEntry, i64 0, i64 %69
%71 = load i32, i32* %70
%72 = lshr i32 %71, 10
%73 = load i32, i32* %5
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [406 x i32], [406 x i32]* @sqlite3Fts5UnicodeIsalnum.aEntry, i64 0, i64 %74
%76 = load i32, i32* %75
%77 = and i32 %76, 1023
%78 = add i32 %72, %77
%79 = icmp uge i32 %67, %78
%80 = zext i1 %79 to i32
store i32 %80, i32* %2
br label %83
81: ; preds = %23
br label %82
82: ; preds = %81
store i32 1, i32* %2
br label %83
83: ; preds = %82, %53, %11
%84 = load i32, i32* %2
ret i32 %84
}

LLVM IR (-O2):
@sqlite3Fts5UnicodeIsalnum.aEntry = internal unnamed_addr constant [406 x i32] [i32 48, i32 59399, i32 93190, i32 125999, i32 175111, i32 184321, i32 186371, i32 191489, i32 195585, i32 220161, i32 252929, i32 722948, i32 739342, i32 758791, i32 766977, i32 769153, i32 906241, i32 915457, i32 921602, i32 924673, i32 1038337, i32 1181704, i32 1402886, i32 1451010, i32 1457153, i32 1459255, i32 1559554, i32 1572869, i32 1579030, i32 1603586, i32 1649685, i32 1681412, i32 1687553, i32 1789953, i32 1792015, i32 1809415, i32 1831938, i32 1835022, i32 1850369, i32 1852417, i32 1884187, i32 2005003, i32 2075657, i32 2086916, i32 2119684, i32 2124809, i32 2135043, i32 2139141, i32 2146319, i32 2188291, i32 2193409, i32 2330651, i32 2359300, i32 2418691, i32 2422802, i32 2442247, i32 2459652, i32 2473985, i32 2491395, i32 2551809, i32 2553863, i32 2563074, i32 2567171, i32 2579457, i32 2590722, i32 2607106, i32 2615298, i32 2622467, i32 2682881, i32 2684933, i32 2694146, i32 2698243, i32 2704385, i32 2736130, i32 2741249, i32 2753539, i32 2813953, i32 2816008, i32 2825219, i32 2829315, i32 2852866, i32 2867202, i32 2884611, i32 2945025, i32 2947079, i32 2956290, i32 2960387, i32 2971650, i32 2983938, i32 2998273, i32 3016705, i32 3078149, i32 3086339, i32 3090436, i32 3103745, i32 3132424, i32 3146755, i32 3209223, i32 3217411, i32 3221508, i32 3232770, i32 3246082, i32 3275777, i32 3278850, i32 3338241, i32 3340295, i32 3348483, i32 3352580, i32 3363842, i32 3377154, i32 3409922, i32 3471367, i32 3479555, i32 3483652, i32 3496961, i32 3508226, i32 3531777, i32 3540994, i32 3614721, i32 3619846, i32 3627009, i32 3629064, i32 3655683, i32 3720193, i32 3723271, i32 3734529, i32 3742729, i32 3762178, i32 3851265, i32 3854342, i32 3861506, i32 3874822, i32 3933215, i32 3985420, i32 4047895, i32 4076555, i32 4088868, i32 4126735, i32 4143117, i32 4238356, i32 4270086, i32 4282372, i32 4290563, i32 4294659, i32 4299783, i32 4310020, i32 4327436, i32 4340737, i32 4352006, i32 4451329, i32 5075980, i32 5128202, i32 5242881, i32 5878786, i32 5898241, i32 5925890, i32 6007811, i32 6047747, i32 6080517, i32 6113282, i32 6146050, i32 6213667, i32 6250500, i32 6255617, i32 6291471, i32 6464513, i32 6586380, i32 6602764, i32 6619137, i32 6623234, i32 6733841, i32 6758402, i32 6780962, i32 6839301, i32 6846466, i32 6902794, i32 6914077, i32 6945793, i32 6979591, i32 6987782, i32 7077893, i32 7131153, i32 7170083, i32 7208963, i32 7242765, i32 7313422, i32 7335940, i32 7376916, i32 7400453, i32 7469058, i32 7536648, i32 7553049, i32 7582721, i32 7587843, i32 7798823, i32 7860228, i32 8320001, i32 8322051, i32 8336387, i32 8352771, i32 8369155, i32 8385538, i32 8388709, i32 8497158, i32 8513541, i32 8529925, i32 8552474, i32 8601633, i32 8650754, i32 8653828, i32 8658946, i32 8671233, i32 8673283, i32 8681478, i32 8688641, i32 8690689, i32 8692737, i32 8697857, i32 8710146, i32 8716293, i32 8726532, i32 8731649, i32 8798820, i32 9437223, i32 9502731, i32 9597006, i32 9699840, i32 10224757, i32 10376121, i32 11354122, i32 11768838, i32 11779075, i32 11789316, i32 11794434, i32 11911169, i32 11926529, i32 12025935, i32 12107788, i32 12189722, i32 12217433, i32 12320982, i32 12566540, i32 12582917, i32 12591129, i32 12625927, i32 12638210, i32 12645379, i32 12739588, i32 12746753, i32 12839937, i32 12992514, i32 12998666, i32 13041700, i32 13107231, i32 13150238, i32 13189121, i32 13205536, i32 13248551, i32 13303871, i32 13369600, i32 20381760, i32 43139127, i32 43251714, i32 43529219, i32 43629584, i32 43678721, i32 43761672, i32 43778071, i32 43810818, i32 43918338, i32 44042241, i32 44046337, i32 44051457, i32 44076041, i32 44095492, i32 44158980, i32 44171266, i32 44224529, i32 44251138, i32 44269586, i32 44294147, i32 44341258, i32 44375053, i32 44399617, i32 44433412, i32 44485659, i32 44529666, i32 44606478, i32 44633089, i32 44642306, i32 44658692, i32 44686339, i32 44690433, i32 44744705, i32 44746755, i32 44751874, i32 44759042, i32 44762113, i32 44791810, i32 44805127, i32 44815362, i32 45059083, i32 56623105, i32 57539586, i32 57670658, i32 58719233, i32 65828865, i32 65840129, i32 65980432, i32 66385922, i32 66580482, i32 66584602, i32 66617351, i32 66633763, i32 66670611, i32 66691076, i32 66845697, i32 66847759, i32 66873351, i32 66907142, i32 66939915, i32 67076103, i32 67084295, i32 67101701, i32 67371011, i32 67427337, i32 67494929, i32 67518476, i32 67584046, i32 68058113, i32 68108289, i32 69295105, i32 69499905, i32 69532673, i32 69731331, i32 69735426, i32 69742596, i32 69787651, i32 69794817, i32 69812233, i32 69860353, i32 70050823, i32 71303171, i32 71360534, i32 71434243, i32 71483410, i32 71565315, i32 71605262, i32 71630852, i32 71696387, i32 71748622, i32 71767044, i32 73051149, i32 76660740, i32 96289838, i32 96353284, i32 121635062, i32 121896999, i32 121939125, i32 122159174, i32 122421335, i32 123405313, i32 123431937, i32 123464705, i32 123491329, i32 123524097, i32 123550721, i32 123583489, i32 123610113, i32 123642881, i32 123669505, i32 129744898, i32 130023468, i32 130072676, i32 130187279, i32 130204686, i32 130221071, i32 130237455, i32 130301983, i32 130334780, i32 130400299, i32 130521117, i32 130564139, i32 130613257, i32 130629634, i32 130809889, i32 130859014, i32 130866246, i32 130940948, i32 130973733, i32 131012613, i32 131039249, i32 131072063, i32 131137537, i32 131139766, i32 131326980, i32 131334206, i32 131399684, i32 131416088, i32 131591238, i32 131666955, i32 131727430, i32 131858548, i32 939525121, i32 939556960, i32 939786480]
@sqlite3Fts5UnicodeIsalnum.aAscii = internal unnamed_addr constant [4 x i32] [i32 -1, i32 -67043329, i32 -134217727, i32 -134217727]
define i32 @sqlite3Fts5UnicodeIsalnum(i32 %0) {
%2 = icmp ult i32 %0, 128
br i1 %2, label %3, label %12
3: ; preds = %1
%4 = lshr i32 %0, 5
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds [4 x i32], [4 x i32]* @sqlite3Fts5UnicodeIsalnum.aAscii, i64 0, i64 %5
%7 = load i32, i32* %6
%8 = and i32 %0, 31
%9 = shl nuw i32 1, %8
%10 = and i32 %7, %9
%11 = icmp eq i32 %10, 0
br label %45
12: ; preds = %1
%13 = icmp ult i32 %0, 4194304
br i1 %13, label %14, label %45
14: ; preds = %12
%15 = shl nuw i32 %0, 10
%16 = or i32 %15, 1023
br label %17
17: ; preds = %14, %17
%18 = phi i32 [ 0, %14 ], [ %31, %17 ]
%19 = phi i32 [ 405, %14 ], [ %30, %17 ]
%20 = phi i32 [ 0, %14 ], [ %29, %17 ]
%21 = add nsw i32 %18, %19
%22 = sdiv i32 %21, 2
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [406 x i32], [406 x i32]* @sqlite3Fts5UnicodeIsalnum.aEntry, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = icmp ult i32 %16, %25
%27 = add nsw i32 %22, 1
%28 = add nsw i32 %22, -1
%29 = select i1 %26, i32 %20, i32 %22
%30 = select i1 %26, i32 %28, i32 %19
%31 = select i1 %26, i32 %18, i32 %27
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %17
33: ; preds = %17
%34 = tail call i32 @assert(i32 1)
%35 = sext i32 %29 to i64
%36 = getelementptr inbounds [406 x i32], [406 x i32]* @sqlite3Fts5UnicodeIsalnum.aEntry, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = icmp uge i32 %16, %37
%39 = zext i1 %38 to i32
%40 = tail call i32 @assert(i32 %39)
%41 = lshr i32 %37, 10
%42 = and i32 %37, 1023
%43 = add nuw nsw i32 %41, %42
%44 = icmp ule i32 %43, %0
br label %45
45: ; preds = %12, %33, %3
%46 = phi i1 [ %11, %3 ], [ %44, %33 ], [ true, %12 ]
%47 = zext i1 %46 to i32
ret i32 %47
}