Skip to content

Commit c7cf62a

Browse files
committed
decomp: 6 more asm_stubs matched — 4-way / 5-case switches
- ov042 (529B): 4-way switch (0x14/0x15/0x16 → 0xa3/0xa4/0xa5, def 0xa2) - ov098 (372B): same 4-way pattern - ov044/063/082/099 (658B ×4): 5-case switch with `case: return v + const` default: { 0x1a: 0x6b; 0x1b: 0x56; 0: 0x55; 1: 0x55; default: v + 0x55 } Case ordering in C source matters for mwcc binary-tree comparisons — the compiled body order matches the case listing order.
1 parent 0c594e3 commit c7cf62a

12 files changed

Lines changed: 56 additions & 197 deletions

File tree

src/overlays/ov042/asm_stubs/calls/func_ov042_020b34bc.c

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
int func_ov042_020b34bc(unsigned char *p) {
2+
switch (p[0x918]) {
3+
case 0x14: return 0xa3;
4+
case 0x15: return 0xa4;
5+
case 0x16: return 0xa5;
6+
default: return 0xa2;
7+
}
8+
}

src/overlays/ov044/asm_stubs/calls/func_ov044_020b35fc.c

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
int func_ov044_020b35fc(unsigned char *p) {
2+
unsigned char v = p[0x918];
3+
switch (v) {
4+
case 0x1a: return 0x6b;
5+
case 0x1b: return 0x56;
6+
case 0: return 0x55;
7+
case 1: return 0x55;
8+
default: return v + 0x55;
9+
}
10+
}

src/overlays/ov063/asm_stubs/calls/func_ov063_020b5dfc.c

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
int func_ov063_020b5dfc(unsigned char *p) {
2+
unsigned char v = p[0x918];
3+
switch (v) {
4+
case 0x1a: return 0x6b;
5+
case 0x1b: return 0x56;
6+
case 0: return 0x55;
7+
case 1: return 0x55;
8+
default: return v + 0x55;
9+
}
10+
}

src/overlays/ov082/asm_stubs/calls/func_ov082_020b84dc.c

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
int func_ov082_020b84dc(unsigned char *p) {
2+
unsigned char v = p[0x918];
3+
switch (v) {
4+
case 0x1a: return 0x6b;
5+
case 0x1b: return 0x56;
6+
case 0: return 0x55;
7+
case 1: return 0x55;
8+
default: return v + 0x55;
9+
}
10+
}

src/overlays/ov098/asm_stubs/calls/func_ov098_020baa5c.c

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
int func_ov098_020baa5c(unsigned char *p) {
2+
switch (p[0x918]) {
3+
case 0x14: return 0xa3;
4+
case 0x15: return 0xa4;
5+
case 0x16: return 0xa5;
6+
default: return 0xa2;
7+
}
8+
}

0 commit comments

Comments
 (0)