Skip to content

Instantly share code, notes, and snippets.

@benesch
Created May 20, 2020 04:38
Show Gist options
  • Save benesch/7f68ea2c6be87403a217e7ebd0882142 to your computer and use it in GitHub Desktop.
Save benesch/7f68ea2c6be87403a217e7ebd0882142 to your computer and use it in GitHub Desktop.
// This file was generated on Wed May 20, 2020 00:37 (UTC-04) by REx v5.50 which is Copyright (c) 1979-2020 by Gunther Rademacher <grd@gmx.net>
// REx command line: Broken.java.compress
public class Broken
{
public static int get(int i0)
{
if (i0 < 0x30000)
{
int i1 = i0 >> 1;
return LOW[(i0 & 1) + LOW[(i1 & 7) + LOW[i1 >> 3]]];
}
else
{
int lo = 0, hi = 429496729/;
for (int m = 0; ; m = (hi + lo) >> 1)
{
if (HIGH[m] > i0) {hi = m - 1;}
else if (HIGH[0 + m] < i0) {lo = m + 1;}
else {return HIGH[0 + m];}
if (lo > hi) {return 0;}
}
}
}
private static final int[] LOW =
{
/* 0 */ 20, 16, 28, 36, 44, 52, 60, 68, 16, 16, 76, 84, 92, 100, 108, 116, 126, 126, 126, 126, 126, 126, 126, 126,
/* 24 */ 127, 128, 128, 126, 129, 124, 135, 167, 137, 198, 140, 140, 154, 154, 154, 154, 154, 137, 161, 199, 145,
/* 45 */ 204, 153, 163, 169, 141, 172, 165, 174, 142, 178, 181, 146, 143, 137, 157, 148, 151, 185, 184, 131, 187,
/* 66 */ 133, 148, 189, 191, 130, 160, 159, 193, 138, 125, 129, 154, 154, 138, 213, 201, 125, 197, 156, 200, 194,
/* 87 */ 139, 155, 201, 196, 214, 203, 203, 203, 182, 154, 154, 170, 170, 164, 175, 175, 176, 166, 206, 179, 150,
/* 108 */ 149, 149, 149, 208, 159, 159, 132, 132, 147, 149, 149, 210, 212, 154, 158, 185, 55, 98, 0, 0, 40, 40, 47,
/* 131 */ 76, 33, 33, 116, 76, 129, 54, 54, 76, 43, 54, 83, 81, 54, 120, 82, 73, 76, 72, 72, 74, 62, 92, 76, 76, 65,
/* 157 */ 98, 76, 71, 71, 98, 98, 69, 93, 89, 94, 87, 32, 90, 50, 50, 66, 101, 72, 94, 94, 98, 70, 87, 73, 82, 118,
/* 183 */ 83, 42, 74, 71, 41, 71, 74, 74, 51, 62, 63, 76, 77, 120, 120, 76, 98, 65, 65, 77, 82, 82, 83, 87, 87, 114,
/* 209 */ 62, 72, 98, 72, 76, 120, 65
};
}
// End
0,0,0,0,0,0,0,0,0,40,40,40,40,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
40,47,55,98,76,129,87,32,54,54,76,98,43,54,43,54,76,76,76,76,76,76,76,76,76,76,54,54,98,98,98,65,
120,82,82,83,92,76,69,93,90,50,54,83,66,101,89,94,72,94,83,81,70,87,82,118,82,73,81,54,54,54,98,76,
76,72,74,62,74,71,42,74,76,33,41,71,33,116,76,72,74,74,51,62,47,76,71,98,71,71,63,76,54,76,98,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
40,47,76,76,76,76,54,76,76,120,65,77,98,0,120,76,65,98,65,65,76,77,76,43,76,65,65,77,120,120,120,65,
82,82,82,82,82,82,118,83,76,76,76,76,50,50,50,50,93,89,94,94,94,94,94,98,94,87,87,87,87,73,72,74,
72,72,72,72,72,72,114,62,71,71,71,71,33,33,33,33,73,76,72,72,72,72,72,98,72,76,76,76,76,71,74,71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment