1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
/* Stuff needed by cdizy: */
typedef short Guard;

/* External functions, don't include standard libs because cdizy is weird */
extern int atoi (const char *nptr);
extern int printf(const char *format, ...);

/* In order to be able to inspect the result... */
int res, T_res;

void search(const int *O_tab, int O_length, int O_x)
{
  /* Declare guards */
  Guard T_G1101 = 1;
  Guard G1101 = 1;
  Guard T_G1101111110 = 1;
  Guard T_G110111110 = 1;
  Guard T_G11110 = 1;
  Guard T_G11011110 = 1;
  Guard G11011110 = 1;
  Guard G11110 = 1;
  Guard T_G110 = 1;
  Guard G110 = 1;
  Guard G1101111000 = 1;
  Guard G110111100000 = 1;

  /* Declare/initialize tagged params */
  const int *T_O_tab = O_tab;
  int T_O_length = O_length;
  int T_O_x = O_x;

  /* Declare other variables */
  int O_tmp;
  int O_stop;
  int O_start;
  int O_result;
  int O_i;
  int T_O_tmp;
  int T_O_stop;
  int T_O_start;
  int T_O_result;
  int T_O_i;

  /* Here is the body! */
  O_start = 0;
  T_O_start = 0;
  O_stop = O_length;
  T_O_stop = T_O_length;
  G110 = O_start != O_stop;
  T_G110 = T_O_start != T_O_stop;
G110__v__T_G110:
    if (G110) G1101 = 1;
    if (T_G110) T_G1101 = 1;
    if (G110) if (G1101) O_i = ((O_start + O_stop) / 2);
    if (T_G110) if (T_G1101) T_O_i = ((T_O_start + T_O_stop) / 2);
    if (G110) if (G1101) O_tmp = O_tab[O_i];
    if (T_G110) if (T_G1101) T_O_tmp = T_O_tab[T_O_i];
    if (G110) if (G1101) G11011110 = O_x == O_tmp;
    if (T_G110) if (T_G1101) T_G11011110 = T_O_x == T_O_tmp;
    if (G110) if (G1101) if (G11011110) O_start = O_i;
    if (T_G110) if (T_G1101) if (T_G11011110) T_O_start = T_O_i;
    if (G110) if (G1101) if (G11011110) O_stop = O_i;
    if (T_G110) if (T_G1101) if (T_G11011110) T_G110 = 0;

    if (G110) if (G1101) if (!G11011110) G1101111000 = O_x < O_tmp;
    if (G110) if (G1101) if (!G11011110) if (G1101111000) O_stop = O_i;

    if (G110) if (G1101) if (!G11011110) if (!G1101111000) G110111100000 = O_x > O_tmp;
    if (G110) if (G1101) if (!G11011110) if (!G1101111000) if (G110111100000) O_start = (O_i + 1);




    if (T_G110) if (T_G1101) T_G110111110 = T_O_x > T_O_tmp;
    if (T_G110) if (T_G1101) if (T_G110111110) T_O_start = (T_O_i + 1);
    if (T_G110) if (T_G1101) if (T_G110111110) T_G1101 = 0;


    if (T_G110) if (T_G1101) T_G1101111110 = T_O_x < T_O_tmp;
    if (T_G110) if (T_G1101) if (T_G1101111110) T_O_stop = T_O_i;



    if (G110) G110 = O_start != O_stop;
    if (T_G110) T_G110 = T_O_start != T_O_stop;
    if (G110) goto G110__v__T_G110;
    if (T_G110) goto G110__v__T_G110;
  O_tmp = O_tab[O_start];
  T_O_tmp = T_O_tab[T_O_start];
  G11110 = O_tmp == O_x;
  T_G11110 = T_O_tmp == T_O_x;
  if (G11110) O_result = O_start;
  if (T_G11110) T_O_result = T_O_start;

  if (!G11110) O_result = (0 - 1);
  if (!T_G11110) T_O_result = (0 - 1);



  /* Correlating point */
  { char *CP0; }

  /* Set the output... */
  res = O_result;
  T_res = T_O_result;
}