-
Notifications
You must be signed in to change notification settings - Fork 2
/
13D.c
78 lines (65 loc) · 1.72 KB
/
13D.c
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
/*
* File - sub_13D.c Created 09.03.2019 Last Modified 30.05.2020
*/
#include "stdio.h"
#include "cgen.h"
/*********************************************************
* sub_13D v0 Used in: sub_1F4B
*********************************************************
int sub_13D(int a, int b) {
int c;
c = array_987D[b];
goto m2;
m1: c++;
m2: if(array_990D[c] != 0) goto m3;
m3: if((uchar)array_990D[c] != a) goto m5;
goto m4;
m4: goto m7;
m5: goto m6;
m6: goto m1;
m7: array_9BD4[c];
goto m8;
m8: return;
}
*/
/*********************************************************
* sub_13D v1 Used in: sub_1F4B
*********************************************************
int sub_13D(int a, int b) {
int c;
c = array_987D[b];
goto m2;
m1: c++;
m2: if(array_990D[c] == 0) goto m7;
m3: if((uchar)array_990D[c] != a) goto m1;
m7: return array_9BD4[c];
}
*/
/*********************************************************
* sub_13D v2 Used in: sub_1F4B
*********************************************************
int sub_13D(int a, int b) {
int c;
m1: for(c = array_987D[b]; ; c++) {
m2: if(array_990D[c] == 0) break;
m3: if(array_990D[c] == a) break;
}
m7: return array_9BD4[c];
}
*/
/*********************************************************
* sub_13D v3 OK++ Used in: sub_1F4B
*
* This version is closest to binary code.
* It does not create unnecessary unconditional jumps
*********************************************************/
int sub_13D(int a, int b) {
unsigned int c;
for(c = array_987D[b];(array_990D[c] == 0)||((unsigned)array_990D[c] == a); c++)
;
#ifdef DEBUG
printf("\tsub_13D(%d, %d)\tReturn %d\n", a, b, array_9BD4[c]);
#endif
return array_9BD4[c];
}
/* End of file - sub_13D.c */