-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path37ED.c
57 lines (46 loc) · 1.29 KB
/
37ED.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
/*
* File - sub_37ED.c Created 09.03.2019 Last Modified 17.06.2020
*/
#include "stdio.h"
#include "cgen.h"
/*********************************************************
* sub_37ED v1 OK+ Used in: sub_387A, sub_43EF
*
* Elegantly designed function leads to the generation of
* less optimal code, unlike the second version
*********************************************************
void sub_37ED(register struct aaa * sa) {
struct bbb * l1b;
#ifdef DEBUG
printf("\tsub_37ED(%x)\n", sa);
#endif
l1b = sa->a_i14;
if(sa->a_i12 != 0) {
sa->a_i12 >>= 2;
} else {
while(l1b->b_refl == 0) l1b = l1b->b_type;
sa->a_i14 = l1b->b_type;
sa->a_i12 = (l1b->b_refl)>>2;
}
}
*/
/*********************************************************
* sub_37ED v2 OK++ Used in: sub_387A, sub_43EF
*
* This version generates code identical to binary image
*********************************************************/
void sub_37ED(register struct aaa * sa) {
struct bbb * l1b;
#ifdef DEBUG
printf("\tsub_37ED(%x)\n", sa);
#endif
l1b = sa->a_i14;
if(sa->a_i12 == 0) goto m2;
sa->a_i12 >>= 2;
return;
m1: l1b = l1b->b_type;
m2: if(l1b->b_refl == 0) goto m1;
sa->a_i14 = l1b->b_type;
sa->a_i12 = (l1b->b_refl)>>2;
}
/* End of file sub_37EDD.c */